Mission 31 / 52• Text Objects - Bracket Pairs

Change Around Brackets

`ca{` deletes the braces and contents and places you in insert mode.

Great for replacing an object literal with a variable reference or primitive.

Change around brackets

  • ca{change around curly braces
  • ca(change around parentheses
1
const config = { mode: "production" };

Position inside `{ mode: "production" }`, type `ca{`, and type `defaultConfig`.

Now it's your turn!

0 / 4 tasks complete0.0s / 29s par0 / 54 par

Practice this lesson's commands. Each task checks your technique and the result, not just your cursor position. Take your time.

Task 1: Replace the whole object with defaultConfig using ca{. Return to normal mode.

Expected result
const config = defaultConfig;
Show hint

Use ca{, type defaultConfig, then Escape.

1
const config = { old: true };
jkscroll•ggGtop/bottom•Tabnext example•Enterstart•qstop•Ctrl+kCtrl+jprev/next