I have Mac OS X Lion, vim 7.3, and latex-suite. With a minimal .tex file I can compile a pdf from within vim using \ll. However I can't view the pdf with \lv. The FAQ suggests that I check whether or not I can open my pdf viewer from inside vim with
!start Preview
However when I do this I get the message
shell returned 127.
Can anyone help me with this?
You can use !open -a Preview
to open Preview.
Here is my settings to make <leader>lv
work for me:
let g:tex_flavor='latex'
let g:Tex_TreatMacViewerAsUNIX = 1
let g:Tex_ExecuteUNIXViewerInForeground = 1
let g:Tex_ViewRule_ps = 'open -a Skim'
let g:Tex_ViewRule_pdf = 'open -a /Applications/Skim.app'
let g:Tex_ViewRule_dvi = 'open -a /Applications/texniscope.app'
Note that I am using Skim instead of Preview as PDF viewer here. You can simply put:
let g:Tex_ViewRule_ps = 'open -a Preview'
let g:Tex_ViewRule_pdf = 'open -a Preview'
to view the resulting postscript or PDF file with Preview.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With