Skip to content

Vim

  • h/j/k/l - Move cursor left/down/up/right
  • w/b - Jump forward/backward by word
  • 0/$ - Move to start/end of line
  • gg/G - Go to first/last line
  • i - Enter insert mode before cursor
  • a - Enter insert mode after cursor
  • ESC or CTRL+[ - Return to normal mode
  • v - Enter visual mode for selection
  • :w - Save file
  • :q - Quit (:q! to force quit without saving)
  • :wq - Save and quit
  • u - Undo
  • CTRL+r - Redo
  • dd - Delete line
  • yy - Copy line
  • p - Paste after cursor
  • x - Delete character
  • dw - Delete word
  • cw - Change word
  • /pattern - Search forward
  • n/N - Next/previous search result
  • :%s/old/new/g - Replace all occurrences

You can find a more in-depth tutorial here if you are interested.