Skip to content
SoftwareSolutions.net
Cheat sheet

Vim Basics Cheat Sheet

The essential Vim commands for opening, editing, saving and quitting a file, for anyone who meets Vim in a terminal.

Vim has modes. Press Esc to return to normal mode, press i to type text, and press : to enter a command. Most people only need a few commands to get started.

Modes

  • i: insert mode before the cursor
  • a: insert mode after the cursor
  • Esc: return to normal mode
  • v: start visual selection

Moving and editing

  • h j k l: move left, down, up, right
  • dd: delete the line
  • yy: copy the line
  • p: paste
  • u: undo

Saving and quitting

  • :w: save
  • :q: quit
  • :wq: save and quit
  • :q!: quit without saving