2

I sometimes use a Windows 7 laptop and I'm trying to set up Vim and latexsuite. I can compile with \ll and then go view the PDF by manually opening it. I would like to set it up like I've done with Mac and Ubuntu where \lv opens the file in the viewer. preferably in sumatra pdf, but only because I hear that it is light weight and refreshes open compile.

I've tried suggestions on Google without luck. Is there something major that I'm missing? I don't typically use Windows. I tried to manually set it to sumatra pdf, also. I don't get errors, I just see the latex viewer call in the menu bar (:call Tex_ViewLaTeX). Here's my _vimrc:

" general
set columns=80
set lines=40
set nu
set expandtab
set smartindent
set tabstop=4
set shiftwidth=4

" for vim-R-plugin2
set nocompatible 
syntax enable 
let vimrplugin_conqueplugin = 0
let vimrplugin_conquevsplit = 0
let vimrplugin_vimpager = "no"

" for vimlatexsuite (and Vim-R-plugin)
" REQUIRED. This makes vim invoke Latex-Suite when you open a tex file.
set shellslash
filetype plugin on

" IMPORTANT: grep will sometimes skip displaying the file name if you
" search in a singe file. This will confuse Latex-Suite. Set your grep
" program to always generate a file-name.
set grepprg=grep\ -nH\ $*

" OPTIONAL: This enables automatic indentation as you type.
filetype indent on

" OPTIONAL: Starting with Vim 7, the filetype of empty .tex files defaults to
" 'plaintex' instead of 'tex', which results in vim-latex not being loaded.
" The following changes the default filetype back to 'tex':
let g:tex_flavor='latex'

" to get default compile to pdf
let g:Tex_DefaultTargetFormat = 'pdf'
let g:Tex_MultipleCompileFormats='pdf, aux'

" ser pdf viewer (for windows only)
" let g:Tex_ViewRule_pdf = 'c:/Program Files\ (x86)/SumatraPDF/SumatraPDF'

2 Answers 2

2

Have you tried this site: http://william.famille-blum.org/blog/static.php?page=static081010-000413 ?

It has various editors and how to configure them, and at the end of the page there is a link for a zipped package for vim. This is what I m using. Just follow the instructions inside the zip and you'll be good to go!

2
2

PATH should be set. Or write the full path for a pdf viewer, e.g., 'c:\Program Files\Adobe\Reader 9.0\Reader\AcroRd32.exe'

1
  • Seven years and this still works for me! Leaving backslashes and not escaping spaces is what worked for me.
    – user123375
    Commented Feb 16, 2017 at 1:10

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .