z{n}Enter โ€” Set Window Height

Resize the current window to {n} lines, scroll cursor's line to the top.

Keys: z{n}{Enter}

z{n} followed by Enter resizes the current window to n lines tall and lands the cursor at the first non-blank of the topmost line.

z{n}{Enter} โ€” Set Window Height

An obscure but occasionally perfect command: z10Enter resizes the current window to 10 lines and scrolls the cursor's line to the top.

Resize window to {n} lines, cursor's line to top
KeyNote
z
{n}
Enter
z{n}{Enter} โ€” set window height

Reference

Sequence Action
z{n}Enter Resize to {n} lines + scroll line to top
zEnter Cursor line to top + first non-blank

See also: Centering the Cursor, Move and Resize Windows