- 0 Talk
-
Automatic LaTeX compile and XDVI refresh
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
Edit
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). Its web page is here ATP, and here is its feature list.