Modal Editing
Why every key on the keyboard is a command
Vim is modal: the same keys mean different things in different modes. Normal mode is your resting state.
You spend more time reading, navigating, and restructuring code than typing new code from scratch. Think about your last hour of editing. How much of it was actually inserting new characters? Maybe twenty percent. The rest was scrolling, searching, selecting, deleting, copying, moving, and rearranging.
Most editors give you a full keyboard for the typing โ and then make you reach for the mouse, hold modifier keys, or chase menus for everything else. Vim flips this. It gives you a full keyboard for the eighty percent.
That is what "modal" means. In normal mode, every key on your keyboard is a command. j moves down. w jumps forward by a word. dw deletes a word. ci" changes the text inside quotes. No mouse. No Ctrl-Shift-Arrow. Just keystrokes.
When you need to type, press i to enter insert mode. Type what you need. Press Esc to come back. Normal mode is your resting state โ the mode you spend most of your time in.
| Key | Note |
|---|---|
| i |
| Key | Note |
|---|---|
| Esc |
Why this feels backwards (at first)
Every other editor starts in what Vim calls insert mode: keys type text. Vim starts in what every other editor would call command mode: keys do things. The learning curve is real. New users press j expecting a 'j' and instead see the cursor move. They press dd expecting two letters and the line vanishes.
Push through this. Once you internalize the grammar โ once d feels like delete, not like a typed letter โ you stop thinking in keystrokes and start thinking in edits: "delete this word," "change inside these quotes," "yank this paragraph." Your hands just execute.
Reference
| Key | From mode | Effect |
|---|---|---|
| i | Normal | Enter Insert mode (before cursor) |
| Esc | Insert / Visual / Replace | Return to Normal mode |
| Ctrl-[ | Insert / Visual / Replace | Same as Esc |
| v | Normal | Enter Visual (character) mode |
| : | Normal | Enter Command-line mode |
Watch
See also: The Modes, The Universal Grammar, Insert and Back Again