I’m mapping shortcuts for :diffget //2 and :diffget //3 and :Gwrite! to make merging easier. So far, on the Mac, I have:
map <D-2> :diffget //2<CR>
map <D-3> :diffget //3<CR>
map <D-0> :Gwrite!<CR>
But unfortunately, they don’t work. Any ideas?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Your mapping definitions look fine. (You should prefer
:noremap, though, as usually, remapping of the right-hand side isn’t necessary, and may cause problems.) Especially in console Vim, not all key combinations can be used.Some key combinations, like Ctrl + non-alphabetic cannot be mapped, and Ctrl + letter vs. Ctrl + Shift + letter cannot be distinguished. (Sorry, I don’t know much about the Mac.) This is a known pain point, and the subject of various discussions on vim_dev and the #vim IRC channel.
In insert or command-line mode, try typing the key combination. If nothing happens / is inserted, you cannot use that key combination.