From 303837b5be695ea56a45c9e508abf3dbaefa7ca0 Mon Sep 17 00:00:00 2001 From: Adam Stankiewicz Date: Fri, 13 Sep 2013 17:28:18 +0200 Subject: Add latex support --- ftplugin/latex-suite/main.vim | 1042 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 1042 insertions(+) create mode 100644 ftplugin/latex-suite/main.vim (limited to 'ftplugin/latex-suite/main.vim') diff --git a/ftplugin/latex-suite/main.vim b/ftplugin/latex-suite/main.vim new file mode 100644 index 00000000..ad27b917 --- /dev/null +++ b/ftplugin/latex-suite/main.vim @@ -0,0 +1,1042 @@ +" LaTeX filetype +" Language: LaTeX (ft=tex) +" Maintainer: Srinath Avadhanula +" URL: + +" line continuation used here. +let s:save_cpo = &cpo +set cpo&vim + +" avoiding re-inclusion {{{ +" the avoiding re-inclusion statement is not provided here because the files +" which call this file should in the normal course of events handle the +" re-inclusion stuff. + +" we definitely dont want to run through the entire file each and every time. +" only once to define the functions. for successive latex files, just set up +" the folding and mappings and quit. +if exists('s:doneFunctionDefinitions') && !exists('b:forceRedoLocalTex') + call s:SetTeXOptions() + finish +endif + +let s:doneFunctionDefinitions = 1 + +" get the place where this plugin resides for setting cpt and dict options. +" these lines need to be outside the function. +let s:path = expand(':p:h') +" set up personal defaults. +runtime ftplugin/tex/texrc +" set up global defaults. +exe "so ".fnameescape(s:path.'/texrc') + +" }}} + +nmap