Mission 08 / 52• Insert Like a Pro
Making Small Edits
Not every edit requires a prolonged trip into insert mode. Quick surgical fixes are vim's bread and butter.
With `s`, `x`, and `r`, you can fix single-character errors without losing your normal mode flow.
Quick edit commands
- xdelete the character under the cursor
- r{char}replace character under cursor with {char} without leaving normal mode
- ssubstitute: delete char under cursor and enter insert mode
1conzt title = "Vim Actual Hero";2let counter = 10000;3const isReady = falze;Look at `conzt`: move cursor onto the `z` and press `r` followed by `s`. The typo is replaced immediately, and you remain in normal mode!
Try `x` to delete the extra zero in `10000`, or `s` on `falze`'s `z` to substitute it with `s`.
Now it's your turn!
- Navigate to each green target across the code snippet.
- Use the motions and techniques learned in this lesson to land accurately on each target.
- See how fast you can complete 10 targets.
0/10
1conzt title = "Vim Actual Hero";2let counter = 10000;3const isReady = falze;NORMAL
00:00
NextCtrl+jMoving by WORDs