|
|
|
|
|
by Lio
3495 days ago
|
|
> Edit: also, Control-c and control-[ do the same thing. They're not actually the same. C-[ is the same as Esc but C-c is not. Using C-c to leave Insert mode won't trigger InsertLeave. If you select a vertical visual block and insert a comma at the end of each line E.g. C-v}$A,
Using Esc or C-[ to leave insert mode will insert the comma at the end of every line in the paragraph but using C-c will only insert after the first line. Also if you get used then to using C-c in Vim then you'll potentially run into issues if you try to use it in other Vi places e.g. anything that uses readline or your shell. IMHO C-[ is a much better solution for these reasons. |
|
:imap <C-c> <Esc>
Remapping caps lock would be good too, but I already have caps lock remapped to Ctrl and I'm just used to that. In anticipation of what seemed like the inevitable loss of my escape key, I've been trying really really hard to like Ctrl-[ the last three weeks, but I've just given up. I keep opening up Ctrl-P searches or hitting Ctrl-]. My pinky just can't do it. So I've given up and made Ctrl-C work and it's so much better.