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
Press Enter to start
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!
0 / 4 tasks complete0.0s / 16s par0 / 17 par
Practice this lesson's commands. Each task checks your technique and the result, not just your cursor position. Take your time.
Task 1: Fix conzt to const with rs without entering insert mode.
Expected result
const value = 1;
Show hint
Press r followed by s.
Press Enter to start
1conzt value = 1;jkscroll•ggGtop/bottom•Tabnext example•Enterstart•qstop•Ctrl+kCtrl+jprev/next