Screen/viewport movement commands in Vim and their mnemonic

Screen/viewport movement commands in Vim and their mnemonic

TLDR;

  • z z or z .: move the current line to the center (in German: zentrum) of the viewport.
  • z t: move the current line to the top of the view port.
  • z b: move the current line to the bottom of the view port.
  • ctrl y: move the viewport up one line. Yore (long ago), or, Yesterday.
  • ctrl e: move the viewport down one line. Efter means after in Swedish.
  • ctrl u, ctrl b: move the viewport up/backward half/one page. Backward has more characters than up, so the movement takes further.
  • ctrl d, ctrl f: move the view port down/forward half/one page. Forward has more character than down, so the movement takes further.

Source: https://stackoverflow.com/questions/3458689

Buy Me A Coffee