Mission 38 / 52• Text Objects - Words
Delete Inside Word
`diw` ('delete inside word') deletes the word under the cursor, leaving the surrounding spaces untouched.
Crucially, your cursor can be anywhere on the word: start, middle, or end.
Delete inside word
- diwdelete the current word (preserves surrounding spaces)
1const firstName = "Bob";2const totalAmount = 100;Place cursor in the middle of `firstName` (e.g. on `s`) and press `diw`. Only the word identifier is deleted.
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
1const firstName = "Bob";2const totalAmount = 100;NORMAL
00:00
NextCtrl+jDelete Around Word