Vim Keyboard Shortcuts
Vim is modal, so the same key does different things depending on the mode you are in. That is why the commands below are grouped by mode first: knowing which mode you are in explains most of the confusion beginners run into.
14 shortcuts across 3 groups
| Keys | Action |
|---|---|
| i | Enter insert mode before the cursor |
| a | Enter insert mode after the cursor |
| v | Enter visual mode |
| Esc | Return to normal mode |
| Keys | Action |
|---|---|
| h j k l | Move left, down, up, right |
| w / b | Jump forward or back by word |
| gg / G | Go to the first or last line |
| 0 / $ | Go to line start or end |
| Keys | Action |
|---|---|
| dd | Delete the current line |
| yy | Yank (copy) the current line |
| p | Paste after the cursor |
| u | Undo the last change |
| :w | Write (save) the file |
| :q | Quit the editor |
Source: Vim help files, vimhelp.org. Bindings listed for Cross platform. The Vim version these bindings were checked against is not established, so treat any binding that does not work as a version difference and check the vendor documentation linked above. 14 shortcuts.
Getting these into muscle memory
A cheat sheet only helps if the bindings move from the page into your hands. The fastest way is to pick two or three shortcuts from a single group above, force yourself to use them for a few days even when the mouse feels quicker, and only then add more. Trying to memorize an entire sheet at once rarely sticks, because none of the bindings get enough repetition to become automatic.
The groups here are ordered by how often you reach for them. Openers and palettes come first because they unlock everything else, then editing and navigation, which is where most of a session is spent. Keep this page open in a tab while you learn, and it will quietly work its way out of your sight and into your fingers.