Vim Commands Cheat Sheet

Searchable cheat sheet of Vim commands — modes, motion, editing, search and files.

Ad placeholder (leaderboard)
Enjoying the tools? Go Pro for £4.99 (one-time) and remove all ads — forever, on this device. Remove ads — £4.99

Vim is a modal text editor: the same keys do different things depending on the mode you are in. That power is what makes Vim fast once learned and bewildering at first. This searchable cheat sheet collects the most-used commands — entering modes, moving around, editing, searching and replacing, and managing files and windows — each paired with a plain-English description so you can find the keystroke you need in seconds.

How it works

The reference is grouped into five sections that mirror how you actually work in Vim:

GroupCovers
Modesi, a, o, v, V, Ctrl-v, Esc
Motionh j k l, w b e, gg, G, 0, $
Editingx, dd, dw, d$, yy, p, u
Search & replace/pattern, n, N, :%s/old/new/g
Files & windows:w, :q, :wq, :q!, splits

Type a key or an action — for example delete, save, or search — into the search box and the list filters live to matching commands and descriptions.

Example

To save and quit, make sure you are in Normal mode (press Esc), then type :wq and Enter — or the shorthand :x or ZZ. To replace every occurrence of a word across the file, run :%s/old/new/g; add the c flag (:%s/old/new/gc) to confirm each change. To delete a line and paste it elsewhere, press dd to cut, move the cursor, then p to paste below.

Everything runs in your browser — this is a static reference and nothing is uploaded.

Ad placeholder (rectangle)