2010-05-16 37 views
1

我剛剛安裝了macvim,昨天我一直試圖安裝vim latex在使用MacVim和Vim Latex時菜單項目搞砸了

有一件事我感到困惑的是頂欄上的菜單項:

------------------------------------------------------------------------------- 
<apple icon> File Edit Tools Syntax TeX-Suite TeX-Environments TeX-Elements 
------------------------------------------------------------------------------- 
            | Packages > |_____ 
            | Templates > | 1: | 
            | Macros > | 2: | 
            |----------- | 3: | 
            | Compile  | 4: | 
            | View  |----- 
            | ...   | 
            ------------- 

所以的話,如果你去TeX-Suite -> Templates有一個與菜單項子菜單:1: 2: 3: 4:

現在我知道,這些模板住在這裏:

% pwd 
/Users/me/.vim/ftplugin/latex-suite/templates 
% ls 
IEEEtran.tex   article.tex    report.tex    report_two_column.tex 

,他們是正確命名。

另外我知道:TTemplate vim命令應該做同樣的事情。當我鍵入,我得到這個結果:

Choose a template file: 
(1) IEEEtran (2) article 
(3) report  (4) report_two_column 

Enter number or name of file : 

所以我想這必須是MacVim中的錯誤。這是一個合理的假設嗎?任何修復?

回答

1

問題是vim-latex在模板名稱<標籤>設置菜單(請參閱「:h菜單」)後放置模板名稱。該文本應顯示提示用於訪問該特定菜單項的命令(例如,在<Tab>之後的文件 - >保存「:w」),並且在大多數平臺上它顯示在菜單項上。但是,在Mac OS X上,只能在菜單項中右側顯示鍵盤快捷方式,所以如果讓鼠標懸停在菜單項上一段時間,文本將顯示在彈出窗口中。

解決此問題的唯一方法是編輯vim-latex菜單文件並從每個菜單命令中刪除<標籤>。

1

我剛剛安裝在OS X上vim的乳膠漆要獲得模板菜單項來顯示我改了行

exe "amenu ".g:Tex_TemplatesMenuLocation."&".i.":<Tab>".fname." ". 

exe "amenu ".g:Tex_TemplatesMenuLocation."&".fname." ". 

文件~/.vim/ftplugin/latex-suite/templates.vim英寸爲了得到TeX-Suite -> Macros下的項目,以顯示我改了行

exe "amenu ".g:Tex_MacrosMenuLocation."&Delete.&".i.":<tab>".fname." :call <SID>DeleteMacro('".fname."')<CR>" 
exe "amenu ".g:Tex_MacrosMenuLocation."&Edit.&".i.":<tab>".fname." :call <SID>EditMacro('".fname."')<CR>" 
exe "imenu ".g:Tex_MacrosMenuLocation."&".i.":<tab>".fname." <C-r>=<SID>ReadMacro('".fname."')<CR>" 
exe "nmenu ".g:Tex_MacrosMenuLocation."&".i.":<tab>".fname." i<C-r>= 

<SID>ReadMacro('".fname."')<CR>" 
     exe "amenu ".g:Tex_MacrosMenuLocation."&Delete.&".fname." :call <SID>DeleteMacro('".fname."')<CR>" 
     exe "amenu ".g:Tex_MacrosMenuLocation."&Edit.&".fname." :call <SID>EditMacro('".fname."')<CR>" 
     exe "imenu ".g:Tex_MacrosMenuLocation."&".fname." <C-r>=<SID>ReadMacro('".fname."')<CR>" 
     exe "nmenu ".g:Tex_MacrosMenuLocation."&".fname." i<C-r>=<SID>ReadMacro('".fname."')<CR>" 

~/.vim/ftplugin/latex-suite/custommacros.vim