Mission 30 / 52• Text Objects - Bracket Pairs
Change Inside Brackets
`ci{` is among the most frequently used commands by professional programmers.
It wipes out the contents inside `{}` and drops you into insert mode, ready to type the replacement immediately.
Change inside brackets
- ci{change inside curly braces and enter insert mode
- ci(change inside parentheses (arguments) and enter insert mode
- ci[change inside square brackets and enter insert mode
1function greet() {2 console.log("old greeting");3}Move anywhere inside `greet()`, type `ci{`, and type `return "Hello World";`. Done in 3 keys!
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 greet() {2 console.log("old greeting");3}NORMAL
00:00
NextCtrl+jChange Around Brackets