How do I scroll so the current line is at the bottom of the screen?
Answer
zb
Explanation
The zb command redraws the screen with the current line at the bottom of the window. This is useful when you want to see context above the current line.
How it works
zbpositions the current line at the bottom edge of the window- The cursor stays on the same line and column
- The screen shifts to show content above the current line
Example
If the cursor is on line 50 and the screen shows lines 30-60, pressing zb redraws so the screen shows approximately lines 20-50.
Tips
ztpositions the line at the topzzpositions it in the centerz-positions at bottom and moves cursor to first non-blank- Useful after jumping to a definition to see the code leading up to it