vim mapping only works with noremap -




i naively wrote this:

" fast saving , closing current buffer without closing windows displaying " buffer nmap <leader>wq :w!<cr>:bclose<cr> 

but not work though there nothing overwriting this:

n  ,wq           :w!<cr>:bclose<cr> " result of `map ,wq` 

it work though following:

nnoremap <leader>wq :w!<cr>:bclose<cr> 

i feel missing pretty basic here.

link full conf: https://github.com/adriengiboire/dotfiles/blob/master/.vimrc

it's still messy reworking :)

i tested , far can tell breaking because of mapping:

nnoremap : ; 

i believe @ runtime turns map into

;w!<cr>;bclose<cr> 

the noremap form prevents ,wq mapping mapping characters within it, not translate : ; otherwise. kind of thing noremap exists avoid problems with.

the rule follow in general use noremap forms unless know specific reason should not, because there many cases 1 cause problems , hard debug.





wiki

Comments

Popular posts from this blog

Asterisk AGI Python Script to Dialplan does not work -

python - Read npy file directly from S3 StreamingBody -

kotlin - Out-projected type in generic interface prohibits the use of metod with generic parameter -