Command key in MacVim

后端 未结 2 1503
清酒与你
清酒与你 2021-02-07 06:51

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.

2条回答
  •  鱼传尺愫
    2021-02-07 07:39

    See :help . Use 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=
    

    and then map ⌘-T with nnoremap whatever.

提交回复
热议问题