Increment or decrement using arrow keys

3 Points

If you only use h, j, k, l to navigate, arrow keys will be needed anymore. So you can map up and down to change values where cursor is.

" unmapping arrow keys
nnoremap <up> <nop>
nnoremap <down> <nop>

" increment and decrement with arrow keys
nmap <up> <C-a>
nmap <down> <C-x>

Steve Charleston

Steve Charleston 3 years ago

Why should one do this instead of simply using c-a and c-x?