I want to map
- semicolon (
;
) to Escape - Ctrl+semicolon to semicolon
and wrote the following in my .vmrc
inoremap ; <ESC>
inoremap <C-;> ;
(1) allows me to escape from the insert mode, but (2) also behaves like Escape rather than giving ;
.
What am I missing here? Any help is appreciated.
<c-;>
is the same as;
in your terminal. Press Ctrl-V and then Ctrl-;, you'll likely see just;
.Ctrl-V
and thenCtrl+;
give;
, indeed.Ctrl-V
and then;
also give;
. Isn'tCtrl-V
the blockwise-visual mode?:help i_ctrl-v
… Vim is a modal editor.