Text Objects · Brackets
Delete Inside Brackets
Clear bracket contents while preserving the pair.
di followed by a bracket object searches outward from the cursor, so you do not need to move to either delimiter first.
Use di(, di[, and di{ in the editor beside this lesson. Practice is where you learn it, with the answer a click away; the Test is graded, unaided, and the only thing that marks this lesson complete.
Keys in this lesson
- di(
- Delete inside the parentheses, keeping the pair
- di[
- Delete inside the square brackets, keeping the pair
- di{
- Delete inside the braces, keeping the pair
Practice to learn it. Test to prove it.
Practice keeps the answer a click away — endlessly in Free, or as a 15-goal run against par and your own best time in Timed. The Test gives you 8 goals with no hints and a keystroke budget on each; passing it is what marks this lesson complete.