Update on the usage of gvim + xdvi

This is an update to the entry about gvim + xdvi. I found out why the forward search did not work: It was as always a trivial reason… I forgot to set the viewer for dvi to xdvi. So, the following lines in .vimrc will enable forward and inverse search with gvim and xdvi

let g:Tex_CompileRule_dvi = 'latex --interaction=nonstopmode --src-specials $*'
let g:Tex_ViewRule_dvi = 'xdvi'
let g:Tex_ViewRuleComplete_dvi = 'xdvi -editor "gvim --servername xdvi --remote +\%l \%f" $* &'

(I forgot the second line last time)

You have to launch gvim and xdvi using

gvim --servername xdvi file.tex
xdvi -editor "gvim --servername xdvi --remote +%l %f" file.dvi

These days, I’m using latexmk and it’s great! Next time, I’ll write down how to use it with gvim and xdvi.

Tags: ,

Leave a Reply