开发者

Mapping of <ctrl-#> characters

开发者 https://www.devze.com 2022-12-08 16:39 出处:网络
I\'ve been trying to map certain sequences to parenthesis/bracket completion without any success.I\'ve b开发者_运维问答een trying the following commands to map certain control sequences but they don\'

I've been trying to map certain sequences to parenthesis/bracket completion without any success. I've b开发者_运维问答een 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.

0

精彩评论

暂无评论...
验证码 换一张
取 消