When editing files in vim, it is a small annoyance that when I move lines with j and k, it moves by file lines, rather than screen lines like other editors. With my own files, I can deal with this by automatically wrapping to a certain length in the vim options, but this is no good for files from others. Is there a vim command to either temporarily toggle the treatment of lines to screen lines, or alternate commands for moving that use screen lines?
You can move around the screen lines by using
g in front of the commands:
gj gk g$ g0 g^
You can also map the original commands to the
g commands like this:
:map j gj
j moves by screen lines now.