I use vim a lot to edit tex files.
When I have lines spanning multiple display lines, most of the time I want to navigate through them with gj not j (i.e. according to displayed lines, not physical lines).
I tried putting the following lines in my .vimrc but, not surprisingly, got an error message recursive mapping:
nmap j gj
nmap gj j
How do I properly swap the effects of two commands?
nnoremap j gjandnnoremap gj jbe enough? – statox Aug 17 '18 at 11:32gcounterparts, two good resources are http://vim.wikia.com/wiki/Move_cursor_by_display_lines_when_wrapping and https://www.reddit.com/r/vim/comments/2k4cbr/problem_with_gj_and_gk/ – Simon Alford Aug 17 '18 at 15:23