Command key in MacVim

て烟熏妆下的殇ゞ 提交于 2019-12-03 06:09:16
Conner

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.

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>

and then map ⌘-T with nnoremap <D-t> whatever.

Andrew Marshall

The command key on OS X is known as the Super key in Vim, so you can do the following:

map <D-t> :CtrlP<CR>
map <D-n> :NERDtree<CR>

You can read more about the different key mappings in :help key-notation. You can't use the command key as a leader because it doesn't lead off a command, but is instead a modifier.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!