Using latexmk with gvim + xdvi
Tuesday, December 22nd, 2009To use latexmk with gvim + xdvi, I have the following lines in my .Xdefaults file:
xdvi.editor: gvim --servername xdvi --remote +%l %f
xdvi.watchFile: 1
One has to issue
xrdb -merge .Xdefaults
after changing the .Xdefaults file. The second line lets xdvi check every one second whether the dvi file has been updated and reloads it. Probably it’s not necessary because latexmk is updating the viewer anyway, but why not? Now, one only needs
latexmk -pvc -dvi latex-file.tex
Every time the tex file gets saved, latexmk will latex the file and update the viewer. Used with the forward and inverse search, you can save hours. Great!
