Moving within the visible window:

  • H move to the first non-blank character of the top (home) line of the visible window
  • M move to the first non-blank character of the middle line of the visible window
  • L move to the first non-blank character of the bottom (low) line of the visible window

Reposition the current line:

  • Ctrl+e scroll up by a line
  • Ctrl+y scroll down by a line
  • zz reposition the current line to the middle of the visible window
    • useful to see context around lines that are nearer to the top/bottom of the visible window
  • zt reposition the current line to the top of the visible window
  • zb reposition the current line to the bottom of the visible window

info See :h 'scrolloff' option if you want to always show context around the current line.

Video demo:


info See also my Vim Reference Guide and curated list of resources for Vim.