5

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.

enter image description here The figure shows the UI after I press ctrl-l. The cursor was on the previous line.

enter image description here 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?

1
  • 1
    Unless you have a good reason to do otherwise use nnoremap not nmap. What do you see in Insert mode when you type ctrl-q followed by ctrl-l?
    – B Layer
    Commented Jan 13, 2018 at 10:50

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.