我尝试为vim安装latex-suite插件,并在〜/ .vim / plugin / vim-latex中提取它。我将推荐的行(如here所述)添加到我的.vimrc中,但仍有一些问题。我不想使用gvim,但我不确定该插件是否适用于vim。 自从我安装了插件后,每当我打开vim时都会出现以下错误:
E121: Undefined variable: g:Tex_FontMaps
E15: Invalid expression: !exists('s:doneOnce') && g:Tex_FontMaps
line 11:
E121: Undefined variable: g:Tex_Menus
E15: Invalid expression: g:Tex_Menus && g:Tex_FontMenus
line 4:
E121: Undefined variable: g:Tex_FontMaps
E15: Invalid expression: !exists('s:doneOnce') && g:Tex_FontMaps
line 11:
E121: Undefined variable: g:Tex_Menus
E15: Invalid expression: g:Tex_Menus && g:Tex_FontMenus
line 4:
E121: Undefined variable: g:Tex_FontMaps
E15: Invalid expression: !exists('s:doneOnce') && g:Tex_FontMaps
line 11:
E121: Undefined variable: g:Tex_Menus
E15: Invalid expression: g:Tex_Menus && g:Tex_FontMenus
line 4:
E121: Undefined variable: g:Tex_FontMaps
E15: Invalid expression: !exists('s:doneOnce') && g:Tex_FontMaps
line 11:
E121: Undefined variable: g:Tex_Menus
E15: Invalid expression: g:Tex_Menus && g:Tex_FontMenus
line 4:
E121: Undefined variable: g:Tex_FontMaps
E15: Invalid expression: !exists('s:doneOnce') && g:Tex_FontMaps
line 11:
E121: Undefined variable: g:Tex_Menus
E15: Invalid expression: g:Tex_Menus && g:Tex_FontMenus
line 4:
E121: Undefined variable: g:Tex_FontMaps
E15: Invalid expression: !exists('s:doneOnce') && g:Tex_FontMaps
line 11:
E121: Undefined variable: g:Tex_Menus
E15: Invalid expression: g:Tex_Menus && g:Tex_FontMenus
Error detected while processing /Users/fs/.vim/plugin/vim-latex/ftplugin/latex-suite/elementmacros.vim:
line 124:
E121: Undefined variable: g:Tex_FontMaps
E15: Invalid expression: g:Tex_FontMaps | exe ``vnoremap <silent> ''.g:Tex_Leader.``em \<C-\\>\<C-N>:call VEnclose('\\emph{', '}', '{\\em', '\\/}')<CR>'' | endif
line 125:
E121: Undefined variable: g:Tex_FontMaps
E15: Invalid expression: g:Tex_FontMaps | exe 'call IMAP (``FEM'', ``\\emph{<++>}<++>'', ``tex'')' | endif
line 128:
E121: Undefined variable: g:Tex_Menus
E15: Invalid expression: g:Tex_Menus && g:Tex_FontMenus
line 171:
E121: Undefined variable: g:Tex_Menus
E15: Invalid expression: g:Tex_Menus
line 248:
E121: Undefined variable: g:Tex_Menus
E15: Invalid expression: g:Tex_Menus
line 311:
E121: Undefined variable: g:Tex_Menus
E15: Invalid expression: g:Tex_Menus
line 324:
E121: Undefined variable: g:Tex_CatchVisMapErrors
E15: Invalid expression: g:Tex_CatchVisMapErrors
Error detected while processing /Users/fs/.vim/plugin/vim-latex/ftplugin/latex-suite/envmacros.vim:
line 9:
E121: Undefined variable: g:Tex_EnvironmentMaps
E15: Invalid expression: !g:Tex_EnvironmentMaps && !g:Tex_EnvironmentMenus
Error detected while processing /Users/fs/.vim/plugin/vim-latex/ftplugin/latex-suite/wizardfuncs.vim:
line 209:
E117: Unknown function: Tex_MakeMap
line 210:
E117: Unknown function: Tex_MakeMap
line 306:
E121: Undefined variable: g:Tex_Leader2
E15: Invalid expression: ''.``\n Environment shortcuts''.``\n <mapleader> is a value of g:Tex_Leader2''.``\n I v&V I v&V''.``\n ELI ''.g:Tex_Leader2.``li list EQN ''.g:Tex_Leader2.``qn quotation''.``\n EDE ''.g:Tex_Leader2.``de description ESP ''.g:Tex_Leader2.``sb sloppypar''.``\n EEN ''.g:Tex_Leader2.``en enumerate ETI ''.g:Tex_Leader2.``ti theindex''.``\n EIT ''.g:Tex_Leader2.``it itemize ETP ''.g:Tex_Leader2.``tp titlepage''.``\n ETI ''.g:Tex_Leader2.``ti theindex EVM ''.g:Tex_Leader2.``vm verbatim''.``\n ETL ''.g:Tex_Leader2.``tl trivlist EVE ''.g:Tex_Leader2.``ve verse''.``\n ETE ''.g:Tex_Leader2.``te table ETB ''.g:Tex_Leader2.``tb thebibliography''.``\n ETG ''.g:Tex_Leader2.``tg tabbing ENO ''.g:Tex_Leader2.``no note''.``\n ETR ''.g:Tex_Leader2.``tr tabular EOV ''.g:Tex_Leader2.``ov overlay''.``\n EAR ''.g:Tex_Leader2.``ar array ESL ''.g:Tex
line 324:
E121: Undefined variable: g:Tex_Leader
E15: Invalid expression: ''.``\n Font shortcuts''.``\n <mapleader> is a value of g:Tex_Leader''.``\n Shortcuts Effects''.``\n I v&V I&v V''.``\n FBF ''.g:Tex_Leader.``bf \\textbf{} {\\bfseries }''.``\n FMD ''.g:Tex_Leader.``md \\textmd{} {\\mdseries }''.``\n''.``\n FTT ''.g:Tex_Leader.``tt \\texttt{} {\\ttfamily }''.``\n FSF ''.g:Tex_Leader.``sf \\textsf{} {\\sffamily }''.``\n FRM ''.g:Tex_Leader.``rm \\textrm{} {\\rmfamily }''.``\n''.``\n FUP ''.g:Tex_Leader.``up \\textup{} {\\upshape }''.``\n FSL ''.g:Tex_Leader.``sl \\textsl{} {\\slshape }''.``\n FSC ''.g:Tex_Leader.``sc \\textsc{} {\\scshape }''.``\n FIT ''.g:Tex_Leader.``it \\textit{} {\\itshape }''
line 337:
E121: Undefined variable: g:Tex_Leader2
E15: Invalid expression: ''.``\n Section shortcuts''.``\n <mapleader> is a value of g:Tex_Leader2''.``\n I v&V''.``\n SPA ''.g:Tex_Leader2.``pa part''.``\n SCH ''.g:Tex_Leader2.``ch chapter''.``\n SSE ''.g:Tex_Leader2.``se section''.``\n SSS ''.g:Tex_Leader2.``ss subsection''.``\n SS2 ''.g:Tex_Leader2.``s2 subsubsection''.``\n SPG ''.g:Tex_Leader2.``pg paragraph''.``\n SSP ''.g:Tex_Leader2.``sp subparagraph''
Error detected while processing function <SNR>25_Tex_SpecialMacros:
line 7:
E121: Undefined variable: g:Tex_EnvMenuLocation
E15: Invalid expression: g:Tex_EnvMenuLocation.a:submenu.a:name
line 29:
E121: Undefined variable: g:Tex_Menus
E15: Invalid expression: g:Tex_Menus && g:Tex_EnvironmentMenus
line 7:
E121: Undefined variable: g:Tex_EnvMenuLocation
E15: Invalid expression: g:Tex_EnvMenuLocation.a:submenu.a:name
line 29:
E121: Undefined variable: g:Tex_Menus
E15: Invalid expression: g:Tex_Menus && g:Tex_EnvironmentMenus
line 7:
某些快捷方式在vim中起作用(例如F5键),但其他快捷方式不起作用(例如,数学环境中的`p应该更改为\ pi)。当我点击它时会尝试生成pdf,但会出现以下错误:
Error detected while processing function Tex_RunLaTeX:
line 7:
E121: Undefined variable: s:target
E15: Invalid expression: s:target
line 10:
E121: Undefined variable: s:target
E116: Invalid arguments for function Tex_Debug
line 12:
E121: Undefined variable: s:target
E116: Invalid arguments for function Tex_GetVarValue('Tex_FormatDependency_'.s:target) != ''
E15: Invalid expression: Tex_GetVarValue('Tex_FormatDependency_'.s:target) != ''
line 21:
E121: Undefined variable: dependency
E116: Invalid arguments for function Tex_Debug
line 25:
E121: Undefined variable: dependency
E116: Invalid arguments for function Tex_Strntok(dependency, ',', i) != ''
E15: Invalid expression: Tex_Strntok(dependency, ',', i) != ''
line 51:
E121: Undefined variable: initTarget
E15: Invalid expression: initTarget
Press ENTER or type command to continue
以下是我在vim中使用的其他插件:
Plugin 'gmarik/Vundle.vim' `` let Vundle manage Vundle, required
Plugin 'L9'
'' Plugin 'git://git.code.sf.net/p/atp-vim/code' `` vim latex automatic
'' Plugin 'the-nerd-tree' `` nerdTree
Plugin 'tomtom/tcomment_vim' '' toggle comment
Plugin 'Lokaltog/vim-easymotion' ``easy motion plugin <leader><leader>w
Plugin 'tpope/vim-surround' ''surround plugin
`` Plugin 'LaTeX-Box-Team/LaTeX-Box' ''latex plugin
Plugin 'ervandew/supertab' ``supertab
Plugin 'yegappan/mru' ''MRU (most recently used)
Plugin 'kien/ctrlp.vim' `` Control P search
Plugin 'plasticboy/vim-markdown' '' markdown syntax highlighting
Plugin 'Raimondi/delimitMate' `` auto complete for brackets and stuff
Plugin 'altercation/vim-colors-solarized' '' solarized color scheme
Plugin 'scrooloose/syntastic' ``syntax check for a bunch of different languages
Plugin 'bling/vim-airline' ''fancy status line
Plugin 'tpope/vim-fugitive'
答案 0 :(得分:2)
位置~/.vim/plugin/vim-latex
错误。直接将插件解压缩到~/.vim/
,以便将Vimscript文件放入相应的plugin
autoload
等子目录中,或使用Vundle进行安装和管理插件。
错误是由于插件配置没有执行,因此插件的其他部分抱怨缺少配置。