2

I get this error after typing lv for viewing the pdf file in macVim. Note: after compiling it (with ll) without any problem:

Error detected while processing function Tex_ViewLaTeX: line 34: E121: Undefined variable: s:viewer E116: Invalid arguments for function strlen(s:viewer) E15: Invalid expression: strlen(s:viewer) line 39: E121: Undefined variable: appOpt E15: Invalid expression: 'open '.appOpt.s:viewer.' $.'.s:target line 79: E121: Undefined variable: execString E116: Invalid arguments for function substitute(execString, '\V$', mainfname, 'g ') E15: Invalid expression: substitute(execString, '\V$*', mainfname, 'g') line 80: E121: Undefined variable: execString E116: Invalid arguments for function Tex_Debug line 82: E121: Undefined variable: execString E15: Invalid expression: 'silent! !'.execString

I already defined the pdf viewer in the .vimrc file with let g:Tex_ViewRule_pdf = 'open -a Preview'

Also tried treating macUnix as Unix with let g:Tex_TreatMacViewerAsUNIX = 1

4

1 回答 1

1

查看源代码,该lv函数似乎启动了 dvi 查看器,而不是pdf-viewer。

如果你想预览一个 dvi 文件,你应该安装XQuartz,然后你可以定义

let g:Tex_ViewRule_dvi = 'open -a xdvi' 

如果你想用 MacVim 预览 pdf 文件,你应该完全定义一个新的查看器命令,我认为如果不更改源代码就无法完成。

于 2015-08-12T14:08:03.183 回答