I've been trying to map certain sequences to parenthesis/bracket completion without any success. I've been trying the following commands to map certain control sequences but they don't seem to work. Does anyone know what I'm doing wrong here?
:imap <ctrl-9> ( )hha
:imap <ctrl-(> ( )hha
Vim doesn't always support all the
ctrl- key combinations, and they can also end up being transmitted as something else because of your terminal. The easiest way to enter these is to type
:map literally, then press CTRL+V, and then press CTRL+9 (or whatever number you want). If vim is able to recognize
ctrl+9 then the correct code for
ctrl+9 will be inserted.