将 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 ->模板
有一个子菜单,其中包含菜单项: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 中的一个错误。这是一个合理的假设吗?有修复吗?
I just installed macvim yesterday and I have been trying to install vim latex today.
The one thing I am confused about is the menu items on the top bar:
-------------------------------------------------------------------------------
<apple icon> File Edit Tools Syntax TeX-Suite TeX-Environments TeX-Elements
-------------------------------------------------------------------------------
| Packages > |_____
| Templates > | 1: |
| Macros > | 2: |
|----------- | 3: |
| Compile | 4: |
| View |-----
| ... |
-------------
So in words if you go TeX-Suite -> Templates
there is a sub menu with menu items: 1: 2: 3: 4:
.
Now I know that these templates live here:
% pwd
/Users/me/.vim/ftplugin/latex-suite/templates
% ls
IEEEtran.tex article.tex report.tex report_two_column.tex
and they are named correctly.
Also I know that the :TTemplate
vim command should do the same thing. When I type that I get this result:
Choose a template file:
(1) IEEEtran (2) article
(3) report (4) report_two_column
Enter number or name of file :
So I am thinking that this must be a bug in MacVim. Is this a reasonable assumption? Any fixes?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
问题是 vim-latex 将模板名称放在之后。当他们设置菜单时(请参阅“:h菜单”)。该文本应该显示关于使用什么命令来访问该特定菜单项的提示(例如,文件->保存在之后有“:w”),并且在大多数平台上,它显示在菜单的右侧项目。但是,在 Mac OS X 上,只能在菜单项的右侧显示键盘快捷键,因此,如果将鼠标悬停在菜单项上一段时间,则文本会显示在弹出窗口中。
解决这个问题的唯一方法是编辑 vim-latex 菜单文件并删除。从每个菜单命令。
The problem is that vim-latex puts the template name after the <Tab> when they set up the menus (see ":h menu"). This text is supposed to show a hint as to what command to use to access that particular menu item (e.g. File->Save has ":w" after <Tab>) and on most platforms it is displayed flush right on the menu items. However, on Mac OS X it is only possible to show keyboard shortcuts to the right in a menu item, so the text is instead displayed in a popup window if you let the mouse hover over the menu item for a while.
The only way to get around this problem is to edit the vim-latex menu files and delete the <Tab> from each menu command.
我刚刚在 OS X 上安装了 vim-latex。为了显示模板菜单项,我将
行更改为
文件
~/.vim/ftplugin/latex-suite/templates.vim
中的 。获取 TeX-Suite -> 下的项目要显示宏,我将行更改为
~/.vim/ftplugin/latex-suite/custommacros.vim
中。I just installed vim-latex on OS X. To get the templates menu items to show up I changed the line
to
in the file
~/.vim/ftplugin/latex-suite/templates.vim
. To get the items underTeX-Suite -> Macros
to show up I changed the linesto
in
~/.vim/ftplugin/latex-suite/custommacros.vim
.