如何在MacVim for Command-A中获得1行为增量? <C-A>
按照预期的增量递增。在Windows中我只需取消映射<C-A>
,所以在MacVim中我尝试了以下内容:
" Doesn't seem to work. <D-A> still selects all
macmenu Edit.Select\ All key=<Nop>
nnoremap <D-A> <C-A>
_
" Doesn't work, no mapping exists
nunmap <D-A>
我看过以下内容,但我仍然无法弄明白:
how to map command key when configurate .vimrc?
How to increment in vim under windows (where CTRL-A does not work...)
答案 0 :(得分:1)
As explained in :help :macmenu
,
~/.gvimrc
,<D-..>
mappings are case sensitive so <D-A>
is not the same as <D-a>
.So, in order to use <D-a>
in place of <C-a>
:
Create ~/.gvimrc
if it doesn't exist.
Add the following lines:
macmenu Edit.Select\ All key=<nop>
nnoremap <D-a> <C-a>