how to map command key when configurate .vimrc?

放肆的年华 提交于 2019-12-02 07:21:04

问题


I use mac , and I want to configurate .vimrc , for example: :map <C-a> p means ctrl-a -> p

now , I want to do this using command key on mac keyboard, how can I do this? I tried :map <D-a> p , but I failed . whick word represent command key?


回答1:


The mapping should work. Unless macvim has already mapped that key to a menu. You first need to unmap it from the menu by adding something like the following into your .gvimrc NOT .vimrc.

macmenu Edit.Select\ All key=<nop>

to unmap <D-A> from Select All.

After that nnoremap <D-a> p will map <D-a> to p.



来源:https://stackoverflow.com/questions/28528151/how-to-map-command-key-when-configurate-vimrc

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