本文介绍了配置.vimrc时如何映射命令键?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我使用mac,并且我想配置.vimrc,例如::map <C-a> p
表示ctrl-a -> p
I use mac , and I want to configurate .vimrc , for example::map <C-a> p
means ctrl-a -> p
现在,我想使用Mac键盘上的命令键来执行此操作,我该怎么做?我尝试了:map <D-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?
推荐答案
映射应该起作用.除非macvim已将该键映射到菜单.首先,您需要通过将以下内容添加到.gvimrc
NOT .vimrc
中来从菜单中取消映射.
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>
从全选中取消映射<D-A>
.
然后nnoremap <D-a> p
将<D-a>
映射到p
.
这篇关于配置.vimrc时如何映射命令键?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!