Reputation: 195
I am a vim user.
I like to use CLI vim rather than GUI MacVim.
I usually use vim in iTerm2 terminal which has already a lot of shortcuts using Command Key.
I want to map my custom shortcuts but it's impossible because of those already mapped keys.
For example,
I want to map NERDTreeCommenterToggle command to 'Command-/'.
So I wrote in my .vimrc like below.
map <D-/> <Plug>NERDCommenterToggle
But it doesn't work because "D-/" key is already mapped to 'Find Cursor' in iTerm2.
Does anybody know how to fix these problems? Thanks in advance.
Upvotes: 0
Views: 94
Reputation: 196476
No.
It's impossible to map the command key in CLI Vim because the only Vim that supports it is MacVim in its GUI form. Whether iTerm uses up all the Cmd+… shortcuts or not is irrelevant.
You must find other keys, preferably some that work everywhere (CLI, GUI, Mac, Win, Linux).
:h mapleader
is a good start.
Upvotes: 2