4 ms·
I think the article is missing ctrl-y move up 1 line without moving cursor ctrl-e move down 1 line without moving cursor ctrl-b move up 1 page, placing c
by sva_ 3y ago
I think the article is missing
ctrl-y move up 1 line without moving cursor
ctrl-e move down 1 line without moving cursor
ctrl-b move up 1 page, placing cursor on last line
ctrl-f move down 1 page, placing cursor on first line.
These are really useful when looking around without wanting to edit.
- grelek 3y agoThanks, didn't know about these.
- sodapopcan 3y agoI've always used ctrl-e and ctrl-y with `:set scrolloff=2` to make it a bit quicker. It was one of the first things I learned as I found ctrl-d and ctrl-u incredibly jarring and thought there must be another option.
- simias 3y agoLike TFA I only use ctrl-u and ctrl-d since it's faster than moving one line at time and not as disorienting (in my experience) as moving one full page at a time. It's also easy to learn since it's [u]p/[d]own.
- AdieuToLogic 3y agoDon't forget the handy "z commands": z<CR> redraw, cursor line to top of window, cursor on first non-blank z- redraw, cursor line at bottom of window, cursor on first non-blank z. redraw, cursor line to center of window, cursor on first non-blank (source: :help z)
- cryptonector 3y agoThere's also H (move to the line at the top of the current screenful), L (move to the bottom line in the current screenful), and M (move to the middle line in the current screenful).
- kagevf 3y agonH is also good if you want to go to line n from the top. Works in reverse with nL too :)