I would like to assign operation to a command key in Vim. Aren't any methods?
Asked
Active
Viewed 1.3k times
1 Answers
27
Supposing you are on a Mac, you can't map the command key in vim when it runs in a terminal emulator, only in the MacVim GUI.
If you are using the MacVim GUI, 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
.

romainl
- 186,200
- 21
- 280
- 313
-
Thank you! It succeeded by
– ANNotunzdY Mar 02 '12 at 10:52 -
2Happy to help, but please consider using something else. – romainl Mar 02 '12 at 13:11