One of the best tips for using vim that I have learned so far has been that one can press Ctrl+C or Ctrl+[ instead of the Esc key. However I use a dvorak keyboard so Ctrl+[ is a little out of reach for me as well so I mostly use Ctrl+C. Now I've read somewhere that these two key combinations don't actually have exactly the same behaviour and that it is better to use Ctrl+[. I haven't come across any problems so far though so I'd like to know what exactly is the difference between the two?
C replaces the rest of the line (starting at cursor position) with your edit. cc and S are synonyms and replace the whole line(s) with your edit.
CTRL-C : Quit insert mode, go back to Normal mode. Do not check for abbreviations. Does not trigger the InsertLeave autocommand event. Another difference happens when you enter Insert mode with a count, in which case CTRL + C will cancel the repetition from the count.
The cw command produces distinctive output when used with the Times Roman font. The CW font contains a nonstandard set of characters. Any text typeset with this font requires different character and interword spacing from that used for standard fonts.
According to Vim's documentation, Ctrl+C does not check for abbreviations and does not trigger the InsertLeave
autocommand event while Ctrl+[ does.
One option is to use the following to remap Ctrl+C
inoremap <C-c> <Esc><Esc>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With