Vim Tips Wiki
Line 25: Line 25:
 
You should replace the Tex_CompileLatex() command with Tex_RunLaTeX() if you are using *tex.latexmain files.
 
You should replace the Tex_CompileLatex() command with Tex_RunLaTeX() if you are using *tex.latexmain files.
   
There is '''AutomaticLaTeXPlugin''' (''ATP'') which is another ''versatile Latex plugin'' for vim. It implements ''background compilation'' and also a ''progress bar'' (see this [http://vimeo.com/25359008 video]) (this works under ''Linux'' and ''MacOS'', but not under ''Windows''). Here link to its web page [http://atp-vim.sourceforge.net '''ATP'''].
+
There is '''AutomaticLaTeXPlugin''' (''ATP'') which is another ''versatile Latex plugin'' for vim. It implements ''background compilation'' and also a ''progress bar'' (see this [http://vimeo.com/25359008 video]) (this works under ''Linux'' and ''MacOS'', but not under ''Windows''). Here link to its web page [http://atp-vim.sourceforge.net '''ATP'''], here is its [http://atp-vim.sourceforge.net/features.shtml feature list].

Revision as of 13:42, 26 January 2012


Tip 1605 Printable Monobook Previous Next

created September 16, 2008 · complexity basic · version 7.0


This tip is for users of latex-suite. It lets latex-suite compile the file automatically when the buffer is saved and refreshes the xdvi viewer immediately. This is particularly useful when you have a wide-screen monitor with Vim on the left and xdvi on the right.

Just put the following two lines in your vimrc. The first simply calls LaTeX-Compile at ":w", and the second lets xdvi redraw the screen.

au BufWritePost *.tex silent call Tex_CompileLatex()
au BufWritePost *.tex silent !pkill -USR1 xdvi.bin

The behaviour is taken from Eclipse's "incremental build" feature and can be adapted to other languages than latex as well.

Comments

You should replace the Tex_CompileLatex() command with Tex_RunLaTeX() if you are using *tex.latexmain files.

There is AutomaticLaTeXPlugin (ATP) which is another versatile Latex plugin for vim. It implements background compilation and also a progress bar (see this video) (this works under Linux and MacOS, but not under Windows). Here link to its web page ATP, here is its feature list.