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?
相关问题
- Emacs shell: save commit message
- How to change the first two uppercase characters o
- Insert text into current buffer from function
- Hot reload on save
- Substituting zero-width match in vim script
相关文章
- 如何让 vim 支持 .cshtml 文件的代码高亮
- Auto-save in VIM as you type
- How can I use gcc's -I command to add recursiv
- Vim: overloaded mapping for multiple modes
- How to use relative line numbering universally in
- How to copy the value of a vim option to a registe
- E185: Cannot find color scheme*
- How do I fix vim to properly indent folds containi
Extremely late answer, but I just had the same question and found one practical example which helps explain the difference, so why not.
If you select a visual block and then change it with
c
or append something to the end of it withA
, if you then exit with<Esc>
, the same change will happen on all the lines of the visual block (which is really useful! See:help v_b_A
); if you exit with<C-c>
, this doesn't happen, only one line gets the change. There are probably other similar things I didn't realize I was missing with<C-c>
...As it turns out,
<C-[>
is exactly identical to Esc, they are the same character. So no need to wonder about any difference there. :)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