How to send the ESC signal to vim when the esc key doesn’t work

vim

I'm having a problem with the Esc key when I want to return to the interactive mode from the insert mode. Is there exist another key used to release the insert mode.

Best Answer

Existing solutions notwithstanding, the conventional solution in Vim is to remap keys in your .vimrc configuration. In fact, many Vim users have an easier reachable key remapped to Esc. Popular choices are Ctrl+Enter, or jj, etc.

To enable this, just put something like the following into your .vimrc and reload it/restart Vim:

" Shift-Enter
inoremap <S-CR> <Esc>
" Double-j
inoremap jj <Esc>

More information and alternatives