How do you keep context lines visible above and below the cursor?
Answer
set scrolloff=8
Explanation
Set scrolloff (or so) to keep at least 8 lines visible above and below the cursor when scrolling. Prevents cursor from reaching screen edges.
set scrolloff=8
Set scrolloff (or so) to keep at least 8 lines visible above and below the cursor when scrolling. Prevents cursor from reaching screen edges.