A deep dive into Vim

There are not 168 shortcuts to memorise. There are four modes and one grammar.
Everything else is those two ideas, combined.

Four modes, and the keys between them

Vim is a state machine, and almost every "vim is weird" moment is being in a different mode than you thought. Esc always goes home. Hover a mode to read what it is for; click it to filter the shortcut list below.

Vim's modes and the keys that switch between them Normal mode sits at the centre; i a I A o O enter Insert, v V and Ctrl-v enter Visual, colon enters Command, and an operator key enters the transient operator-pending mode that waits for a motion — Esc returns to Normal from all of them. i a I A o O Esc v V Ctrl-v Esc d c y = > < motion done : / ? Enter · Esc c enters insert MODE INSERT keys become text MODE VISUAL select, then operate HOME NORMAL keys are commands TRANSIENT OPERATOR-PENDING waiting for a motion MODE COMMAND the line at the bottom LEGEND Where you live Transient — resolves on the next key You press a key Vim resolves it
Hover a mode to read what it is for. Click it to filter the shortcuts below.

The grammar: [operator] [count] [text object]

Vim is not a list of shortcuts, it is a small language. Nine operators times thirty targets is two hundred and seventy commands you never had to learn one at a time — d plus iw is diw, and it means exactly what the two halves mean. Build one below; click the result to copy it.

1 · count — optional, how many
2 · operator — what to do
3 · text object — a thing, wherever the cursor sits inside it
3 · or a motion — from the cursor to somewhere else

i means inner — just the thing. a means around — the thing plus its delimiters or trailing whitespace. Doubling the operator acts on the whole line, which is where dd and yy come from. Counts read most naturally with motions and with word, sentence and paragraph objects.

Every shortcut, filtered

Search by key or by what you want to do. Click any card to copy the keystroke.

The twenty that get you working

Learn these and you can edit anything, slowly. Everything else is speed. The four in cyan are the ones that stop feeling like keys and start feeling like thinking.