I noticed that in vim you often have to press Esc to switch between modes. Is it possible to replace Esc in this case with a shortcut key?
3 answers
In general, I personally use the jj keyboard shortcut.
Add this to your .vimrc
" exit to normal mode with 'jj' inoremap jj <ESC> This hack is used by hundreds of vimers, just look at the .dotfiles repositories on github.com. The reason is very simple, you constantly hold your finger on the j button to navigate through the text. And to press any other button you need to move your finger. Try it;)
|
There is a built-in Ctrl + C, Ctrl + [.
If you still want your own, use: map
- Ctrl + C is very convenient, very often. - BiMaWa
|
Even if vim is used in the terminal, then the default behavior of the terminal is often this: alt + letter sends <ESC> , then a letter. So you can exit insert-mode at the same time and do the following.
|