Mission 13 / 52• Basic Operators
Intro to Operators
Vim is not just a collection of keybindings; it is a compositional language. An action is expressed as: `Operator + Motion`.
Operators dictate *what* to do (delete, change, copy). Motions dictate *where* or *how far* to do it.
Vim grammar
- ddelete operator: removes text covered by the following motion
- cchange operator: deletes text and enters insert mode
- yyank operator: copies text covered by the motion into clipboard
Press Enter to start
1const unnecessaryVariable = null;2const activeUser = getActiveUser();Think of `d` as a verb and motions (`w`, `$`, `j`) as nouns. `dw` = delete word. `d$` = delete to line end.
Once you learn 4 operators and 10 motions, you know 40 combinations without memorizing 40 separate shortcuts!
Now it's your turn!
0 / 4 tasks complete0.0s / 18s par0 / 21 par
Practice this lesson's commands. Each task checks your technique and the result, not just your cursor position. Take your time.
Task 1: Change guest to admin without removing quotes using cw. Return to normal mode.
Expected result
const role = "admin";
Show hint
Use cw at the start of guest, type admin, then Escape.
Press Enter to start
1const role = "guest";jkscroll•ggGtop/bottom•Tabnext example•Enterstart•qstop•Ctrl+kCtrl+jprev/next