Currently, my vimrc contains the lines
nnoremap j gj
xnoremap j gj
nnoremap gj j
xnoremap gj j
nnoremap k gk
xnoremap k gk
nnoremap gk k
xnoremap gk k
This way, the j
key in both visual and normal mode will go to the next displayed line, not the next actual line. However, this is rather silly in visual line mode, since, well, it only operates on actual lines. It doesn't make much sense in visual block mode either.
How can I make a mapping apply only in visual mode, not visual line mode or visual block mode?