7 Inserting a Reference

A necessary part of LaTeX editing is referencing equations, figures, bibliographic entries etc. This is done with the \ref and the \cite commands. Latex-Suite provides an easy way to do this. Somewhere in the body of the document, type in the following sentence

This is a reference to (\ref{}).

With the cursor between the {} press <F9> in insert mode. Your vim session will sprout a new windows showing all the \labels found in all the .tex files of your current project. To insert the reference, just position the cursor on the relevant line and press <enter>. The line which you were editing will change to:

This is a reference to (\ref{eqn:euler})

and the bottom window closes automatically.

The <F9> key also works for inserting \cite commands to reference bibliographic entries, inserting file names for the \inputgraphics command and just plain searching for words. Click here for more information.