Blog 1

Random Talk on Random Thoughts

Vim-$\rm \LaTeX$'s \lv Command With Sumatra PDF

| Comments |

Why do I switch my PDF viewer?

  • Ado* Read* is proprietary. (EULA)
  • Sumatra PDF is free. (GPLv3)

Go for FLOSS! Go for freedom!

Actual process

Original settings for Ado* Read*: let g:Tex_ViewRuleComplete_dvi='C:/.../AcroRd32' in _vimrc (No extension name)

Problem

How to change Vim-$\rm \LaTeX$'s setting of \lv?

Trial 1

Set g:Tex_ViewRuleComplete_dvi='C:/.../SumatraPDF' in _vimrc (No effect)

Trial 2

Set g:Tex_ViewRule_dvi='C:/.../SumatraPDF' and disable g:Tex_ViewRuleComplete_dvi in _vimrc (No effect)

Trial 3

Set g:Tex_ViewRule_pdf='C:/.../SumatraPDF' and keep g:Tex_ViewRuleComplete_dvi='C:/.../AcroRd32' in _vimrc (Ado* Read* launched instead)

Trial n

Set g:Tex_ViewRule_pdf='C:/.../SumatraPDF' and disable g:Tex_ViewRuleComplete_dvi='C:/.../AcroRd32' in _vimrc (No effect)

Solution

  1. Change PATH environment variable. (You can change it for Vim runtime and keep the original one in other programs. See my newer post for details.)
  2. Set g:Tex_ViewRule_pdf='SumatraPDF'
  3. Disable g:Tex_ViewRuleComplete_dvi in _vimrc

Comments