Re: [Vim-latex-devel] Set TTarget automatically for specific files
Brought to you by:
srinathava,
tmaas
From: Gary J. <gar...@sp...> - 2010-03-23 20:43:20
|
On 2010-03-23, Udo Hortian <udo...@we...> wrote: > Hello, > > Normally I compile my LaTeX documents with latex, but some I need to > compile with pdflatex. I would like to store this setting in the .tex > file like one can store other vim specific settings like the following: > > /* ex: set tabstop=8 expandtab: */ > > I would like to set TTarget this way, but this seems not to be possible. > Or am I missing some possibility here? According to :help modeline Vim allows only certain options to be set in a modeline, for security reasons. Here's something you might try. Put one of the following lines at the bottom of each of your .tex files: % TTarget latex or % TTarget pdflatex Put the following in your ~/.vim/after/ftplugin/tex.vim file. let compiler = matchstr(getline("$"), '^% TTarget \zs.*') if compiler != '' " Execute whatever command will set TTarget according to the " value of compiler. I don't understand vim-latex-suite " well enough to know what goes here. endif HTH, Gary |