Vim Tips Wiki
Advertisement
Tip 1468 Printable Monobook Previous Next

created 2007 · complexity intermediate · version 


When editing LaTeX with Vim and previewing the pdf with a pdf viewer, you would like to be able to click on a word in the pdf viewer and have vim automatically jump to the location in the source file you clicked on. This is called backwards search, since clicking in the pdf viewer updates the vim location. To update the pdf viewer to a page containing the current location in Vim, see Open pdf to the current location in a LaTeX file.

Linux[]

 TO DO 
There are some instructions here, but they should be copied into this page.

Windows[]

 TO DO 
Find how to do this on Windows.

Mac[]

Mac OS has a package called pdfsync and a supporting viewer (I strongly recommend PDFView) can be configured to run a custom script when the user command-clicks inside the document.

To enable backwards search, install and configure the gvim-pdfsync plugin.

Plugins[]

  • Automatic LaTeX plugin has forward and backward search which works for quite a few viewers: xpdf (v3.03), evince, okular, xdvi, open (on MacOs). Unfortunatelly, the plugin doesn't officially support Windows.
  • LaTeX Suite also support forward and reverse searching.
Advertisement