How do I move the cursor to the middle of the visible screen?
Answer
M
Explanation
The M command moves the cursor to the line in the middle of the current window. It stands for "Middle" and helps you quickly reposition within the visible area.
How it works
Mplaces the cursor on the middle line of the window- The cursor moves to the first non-blank character
- The exact line depends on the window height
Example
If your window shows lines 50-80 (31 lines), pressing M moves the cursor to approximately line 65.
Tips
Hmoves to the top of the screenLmoves to the bottom of the screenMdoes not accept a count- Combine with
zzto center the screen on the middle visible line