Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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.

share|improve this question
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

1 Answer 1

up vote 7 down vote accepted

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

-reuse-instance

will do the trick


The final modification that made it works is this:

let g:Tex_ViewRule_pdf = 'SumatraPDF -reuse-instance'
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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