I'm using a mac with latex-suite. Everything is working well, except that after hitting
\lv to view my pdf output, if I made additional changes to my tex file, I must first close the pdf before these additional changes are displayed by hitting
\lv a second time.
Here are some changes I introduced to my latex-suite environment. Perhaps they (though I don't see how) account for this fix?
In compiler.vim (which is under the following directory)
/Users/Muno/.vim/ftplugin/latex-suite, I extended the regex in a conditional of the forward search function. The regex matches the
viewer variable (which is really
g:Tex_ViewRule_pdf) with potential file viewers (in this case Skim, PDFView or Texniscope).
elseif (has('macunix') && (viewer =~ '^ *\(Skim\|PDFView\|TeXniscope\)\( \|$\)')) 376 " We're on a Mac using a traditional Mac viewer 377 378 379 if viewer =~ '^ *\(Skim\)' 380 381 let execString .= '/Applications/Skim.app/Contents/SharedSupport/displayline ' 382 let execString .= join([linenr, target_file, sourcefileFull])
elseif (has('macunix') && (viewer =~ '^ *\(Skim\|PDFView\|TeXniscope\|open -a Skim\)\( \|$\)')) 376 " We're on a Mac using a traditional Mac viewer 377 378 echo viewer 379 if viewer =~ '^ *\(Skim\|open -a Skim\)' 380 381 let execString .= '/Applications/Skim.app/Contents/SharedSupport/displayline ' 382 let execString .= join([linenr, target_file, sourcefileFull])
And my .vimrc is as follows:
" REQUIRED. This makes vim invoke Latex-Suite when you open a tex file. filetype plugin on " IMPORTANT: win32 users will need to have 'shellslash' set so that latex " can be called correctly. set shellslash " 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' " This changes the pdf viewer from some other viewer to Preview.app let g:Tex_TreatMacViewerAsUNIX = 1 let g:Tex_DefaultTargetFormat = 'pdf' let g:Tex_CompileRule_pdf = 'pdflatex -synctex=1 --interaction=nonstopmode $*' let g:Tex_ViewRule_pdf = "open -a Skim" let g:Tex_ViewRule_ps = "open -a Preview.app" " Command-R will write, compile, and forward search--thanks to " http://reference-man.blogspot.com/2011/09/fully-integrated-latex-in-macvim.html " preview, switch back to main window map <D-r> :w<cr><leader>ll<leader>ls imap <D-r> <ESC><D-r> "Coloration colorscheme darkblue set number "Line numbers are good "let mapleader=","