[Vim-latex-devel] Viewing pdf
Brought to you by:
srinathava,
tmaas
From: Mario D <eg...@gm...> - 2016-02-23 08:21:21
|
In my ~/.vim/ftplugin/tex.vim I defined the following: function! Set_PDF() let g:Tex_DefaultTargetFormat = 'pdf' let g:Tex_CompileRule_pdf = 'pdflatex --synctex=1 -interaction=nonstopmode -file-line-error-style $*' let g:Tex_CompileRule_dvi = 'pdflatex --synctex=1 -interaction=nonstopmode -file-line-error-style $*' let g:Tex_ViewRule_pdf = 'okular --unique 2>/dev/null 1>&2 ' let g:Tex_ViewRule_dvi = 'okular --unique 2>/dev/null 1>&2 ' let g:Tex_MultipleCompileFormats = '' endfunction function! Set_LaTeX() let g:Tex_DefaultTargetFormat = 'dvi' let g:Tex_CompileRule_dvi = 'latex -src-specials -interaction=nonstopmode -file-line-error-style $*' let g:Tex_ViewRule_dvi = 'xdvi 2>/dev/null 1>&2 ' let g:Tex_MultipleCompileFormats = '' endfunction noremap <leader>latex :call Set_LaTeX() noremap <leader>pdf :call Set_PDF() My intention is the following: if I use ,pdf (my leader is ,), then vim should be set up to produce pdf whereas if I use ,latex then it should produce dvi. Now I open a latex file which should produce pdf, I call ,pdf and I compile using ,ll Everything is fine. My problem is when I try see the resulting pdf: if I use ,lv then what I get is the dvi file displayed by xdvi whereas if I use ,ls then I get again the dvi file but this time it is displayed by okular. What I would like is that by either I should get displayed the pdf by means of okular. What am I doing wrong? Thanks |