I'm trying to setup vim-latex plugin to do default compile and view using PDF, with SumatraPDF as the default reader. Here's the configuration I made in .vimrc:

let g:tex_flavor='latex'
let g:Tex_DefaultTargetFormat = 'pdf'
let g:Tex_CompileRule_pdf = 'pdflatex -synctex=1 -interaction=nonstopmode $*'
let g:Tex_ViewRule_pdf = 'SumatraPDF'

I've set the PATH variable to points to SumatraPDF installation directory. At this point, \ll and \lv worked perfectly. The only thing that bugged me is that everytime I do \lv, vim-latex automatically open a new instance of SumatraPDF. I use other editor like TexStudio or TeXnicCenter with no problem (view PDF only open one instance). What am I doing wrong? Is there something I have to add in the .vimrc?

I've search everywhere with no result, but if I'm wrong, please just point me to the link.

  • 2
    In the SumatraPDF help file you will see the command line option -reuse-instance. – Danie Els Feb 22 '12 at 5:15
  • @DanieEls It works wonderfully now. Thank you. Could you post your comment as anwer so I can accept it? – bertzzie Feb 22 '12 at 5:25

SumatraPDF can be called with commandline options, see help manual. The option


will do the trick

The final modification that made it works is this:

let g:Tex_ViewRule_pdf = 'SumatraPDF -reuse-instance'

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.