vim – adjust current line at screen
Here I want to focus on a few keystrokes which help to adjust where your current line appears on your screen in Normal mode.
|z[RETURN]||redraw screen with current line at top|
|zz||redraw screen with current line at center|
|z-||redraw screen with current line at bottom (as far down as possible)|
You can display the screen at center even while you are in Insert mode. No need to leave Insert mode, center the screen and reenter Insert mode. That’s especially helpful if you just want to see more context above and beneath your current position.
|[ctrl-o]zz||run just one command while in Insert mode,
display screen at center and return to Insert mode