9.1 Performing forward searches

If you are using a modern DVI viewer, then it is possible to do what is called forward and inverse searching. However, you will need to customize the standard Latex-Suite distribution in order to utilize this functionality. Type in the following on the command line:

:let g:Tex_CompileRule_dvi = 'latex -src-specials -interaction=nonstopmode $*'
:TCTarget dvi

Now recompile the latex file by pressing \ll. This time, instead of pressing \lv to view the file, press \ls from within the tex file. If the DVI viewer supports forward searching (most of them do), then the viewer will actually display the portion of the DVI file corresponding to the location where you were editing the tex file.

Note

The reason Latex-Suite does not have this setting by default is that on some systems this causes unpredictable results in the DVI output. If you find the DVI output satisfactory, then you can insert the first of the 2 lines above into your $VIM/ftplugin/tex.vim file. $VIM is ~/vimfiles for windows and ~/.vim for *nix machines.