Mission 28 / 52• Text Objects - Bracket Pairs
Delete Inside Brackets
`di{` (or `di}`) deletes everything between curly braces while keeping the braces intact.
It works with parentheses (`di(` or `di)`) and square brackets (`di[` or `di]`) as well!
Delete inside brackets
- di{delete inside curly braces { ... }
- di(delete inside parentheses ( ... )
- di[delete inside square brackets [ ... ]
1function calculateDiscount(price, user) {2 const base = price * 0.9;3 return base;4}Place cursor anywhere inside the function body and type `di{`. The entire contents vanish, leaving empty `{}`!
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
1function calculateDiscount(price, user) {2 const base = price * 0.9;3 return base;4}NORMAL
00:00
NextCtrl+jDelete Around Brackets