My _vimrc contains the following lines:
set nocompatible
source $VIMRUNTIME/vimrc_example.vim
source $VIMRUNTIME/mswin.vim
behave mswin
nmap <c-l> :w<CR>
nmap <c-m> :w<CR>
I try to map control+l to :w
, and control+m is the control group.
I open a new file, press ctrl-m
, the file saves. I press ctrl-l
, the command line shows :update
. I press ctrl-shift-l
, the file saves.
The figure shows the UI after I press
ctrl-l
. The cursor was on the previous line.
I run
:map
, <C-L>
is registered, but I can only trigger it with ctrl-shift-l
.
Why does the mapping of ctrl-l
fail?
nnoremap
notnmap
. What do you see in Insert mode when you typectrl-q
followed byctrl-l
?