Vim is not a set of shortcuts so much as a small language: an operator like delete, a count, and a motion combine into commands you have never typed before but that work the first time. The rows below are the vocabulary; the notes explain the grammar that makes them multiply. Everything here is Vim's default behaviour and also holds in Neovim and in the Vim modes of VS Code, JetBrains and Obsidian.
Mode Switching 10
Movement 14
Editing 13
Search 6
File Operations 7
Advanced 7
Operators, motions and counts
dd deletes a line and dw deletes a word because d is an operator and w is a motion; the same operator with $ deletes to the end of the line, which is exactly what D is a shortcut for. Any motion in the Movement group can follow d, y (yank) or c (change), and a number in front repeats: 3dw deletes three words, 5j moves down five lines. Once this clicks, the table stops being a list to memorise and becomes a few operators times a few motions.
Text objects are the part worth learning early
ci" changes the text inside the nearest pair of double quotes and di" deletes it, from anywhere on the line — you do not need to be inside the quotes first. The same pattern works with parentheses, brackets, braces and tags, and with a instead of i to include the delimiters. This is the feature that makes Vim editing feel faster than a mouse: "change the argument in these parentheses" is three keystrokes regardless of where the cursor is.
The dot command and macros
. repeats the last change, including an insert, so the workflow for a repeated edit is: make the change once, move to the next place with n or a motion, press dot. For anything longer, qa starts recording a macro into register a, q stops, and @a replays it; a count in front replays it that many times. u undoes and Ctrl + r redoes — note that Ctrl + r inside insert mode is a different command that pastes a register.
Getting out, and the modes that confuse beginners
:wq saves and quits, :q! quits and discards changes, and Esc returns to Normal mode from anywhere; if the editor seems to ignore you, press Esc first. v, V and Ctrl + v start character, line and block visual selections, and block mode plus an insert is how you prepend text to many lines at once. R enters Replace mode, which overwrites rather than inserts and is the usual cause of "my text is disappearing as I type".
Frequently asked questions
How do I exit Vim?
Press Esc to make sure you are in Normal mode, then type :wq and Enter to save and quit, or :q! to quit without saving.
What is the difference between dw and D?
dw deletes from the cursor to the start of the next word. D deletes from the cursor to the end of the line and is shorthand for d$.
Do these commands work in Neovim and VS Code's Vim extension?
Yes. Neovim keeps Vim's default bindings, and the VS Code, JetBrains and Obsidian Vim modes implement the operators, motions and text objects shown here.
Why is my text being overwritten as I type?
You are in Replace mode, entered with R. Press Esc, then i or a to insert normally.
How do I repeat an edit on many lines?
Make the change once, then use . to repeat it after each motion. For multi-step edits record a macro with qa … q and replay it with @a, optionally with a count.