How to navigate 'logical' lines individually in vim?
I know that there is a setting for this in vim
, I just can't find it now...
Basically, I like set wrap
. I like it alot. I'm less fond of it skipping down to each actual line, rather than the more intuitive next displayed line. For instance, say I have the following file:
1 Some really, really, really long line that I really possibly should have but I do have it, so I'm stuck with it, and if my cursor is ->| here and then I press the down button, much to my dismay, 2 The cursor ends up here! ->|
Solution 1:
You can type gj
to move down one screen line, as opposed to one logical line with j
.
It may also be possible to map gj
to j
.
Here's an article you may find useful for that:
http://vim.wikia.com/wiki/Moving_by_screen_lines_instead_of_file_lines