MacVim中的命令键 [英] Command key in MacVim
问题描述
如何在MacVim中使用命令键?例如,我希望能够按 Cmd t 打开CtrlP或 Cmd n 打开NerdTree.
How do I use the command key in MacVim? For example I would like to be able to press Cmdt to open CtrlP or Cmdn to open NerdTree.
推荐答案
请参见:help <D-
.使用<D-t>
映射到⌘-T; 但是,⌘-T已映射到MacVim菜单中的新标签".您必须将其删除才能在Vim映射中使用它.
See :help <D-
. Use <D-t>
to map to ⌘-T; however, ⌘-T is already mapped to "New Tab" within MacVim's menu. You'll have to remove that to be able to use it in a Vim map.
某些键是操作系统绑定的,您只是无法访问它们,但是可以使⌘-T可用,并且实际上是它们在帮助文件中使用的示例(请参见:help Actions.plist
和向上滚动几行到4.
).您需要使用以下方式取消设置新标签"绑定
Some keys are OS-bound and you just can't access them, but ⌘-T can be made available and is actually the example they use in the help file (see :help Actions.plist
and scroll up a few lines to 4.
). You'll need to unset the "New Tab" binding with
:macmenu File.New\ Tab key=<nop>
,然后将⌘-T与nnoremap <D-t> whatever
映射.
这篇关于MacVim中的命令键的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!