I have the following lines in my .vimrc.
" Arrows are unvimlike
nnoremap <up> <nop>
nnoremap <down> <nop>
nnoremap <left> <nop>
nnoremap <right> <nop>
inoremap <up> <nop>
inoremap <down> <nop>
inoremap <left> <nop>
inoremap <right> <nop>
I understand that the arrow keys are made no operations to force the use of j,k,h,l.But why is there two sets of what seems like same commands.Or in other words what is the difference between nnoremap and inoremap and why both of them are used.
You are making sure the arrow keys are nop
for both insert
and normal
mode
From: the Vim Wikia page:
n Normal mode map. Defined using ':nmap' or ':nnoremap'.
i Insert mode map. Defined using ':imap' or ':inoremap'.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With