Vim: Shortcut to move to beginning of next line / end of previous line?
To move to the beginning of the next line, hit Enter
. See :help <CR>
.
To make right
and l
wrap to the beginning of the next line, add >
and l
to the 'whichwrap' option, e.g.,
:set whichwrap+=>,l
Similarly, to make left
and h
wrap to the end of the previous line, add <
and h
to the 'whichwrap' option, e.g.,
:set whichwrap+=<,h
See :help 'whichwrap'
.
I don't know of a single-key shortcut to move to the end of the previous line, but with those 'whichwrap' settings, 0h
or 0left
would work, and you could possibly map either of those to some key you don't often use.