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