user189419
user189419

Reputation:

Mapping of <ctrl-#> characters

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

Upvotes: 2

Views: 128

Answers (1)

too much php
too much php

Reputation: 91078

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.

Upvotes: 2

Related Questions