我有Mac OS X Lion、vim 7.3和latex-suite。使用一个最小的.tex文件,我可以使用\ll从vim中编译一个pdf。但是,我不能用\lv查看pdf。FAQ建议我检查是否可以从vim内部打开我的pdf查看器。
!开始预览
然而,当我这样做时,我得到了这样的信息
shell返回127。
有人能帮我吗?
发布于 2012-09-29 15:01:00
可以使用!open -a Preview打开预览。
以下是我让<leader>lv为我工作的设置:
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'请注意,我在这里使用Skim而不是Preview作为PDF浏览器。你可以简单地说:
let g:Tex_ViewRule_ps = 'open -a Preview'
let g:Tex_ViewRule_pdf = 'open -a Preview'要使用预览查看生成的postscript或PDF文件,请执行以下操作。
发布于 2019-06-27 00:02:52
将以下代码放入此文件中~/.vim/ftplugin/tex.vim适用于我
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'https://stackoverflow.com/questions/12650528
复制相似问题