How to set inoremap/nnoremap to “command key” on Vim?

后端 未结 1 1354
礼貌的吻别
礼貌的吻别 2021-02-19 01:59

I would like to assign operation to a command key in Vim. Aren\'t any methods?

相关标签:
1条回答
  • 2021-02-19 02:24

    Supposing you are on a Mac, you can't map the command key in vim, only in MacVim.

    If you are using MacVim, your mappings should use <D-…> as in nnoremap <D-l> <C-w>l. But it's not a very good idea for many reasons among them those listed in this other answer of mine.

    Use <leader>, as in nnoremap <leader>l <C-w>l, instead.

    See :help leader and :help key-notation.

    0 讨论(0)
提交回复
热议问题