Mission 32 / 52• Text Objects - Bracket Pairs

Brackets Review

Brackets, braces, and parentheses define virtually every modern programming syntax.

Bracket text objects review

  • di{ / da{delete inside / around curly braces
  • ci{ / ca{change inside / around curly braces
  • ci( / di(change / delete inside parentheses
1
function updateUser(id, payload) {
2
const sanitized = sanitize(payload);
3
return db.save(sanitized);
4
}

Practice changing arguments with `ci(` and replacing function bodies with `ci{`.

Now it's your turn!

0 / 6 tasks complete0.0s / 37s par0 / 61 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 arguments with userId using ci(. Return to normal mode.

Expected result
load(userId);
Show hint

Use ci(, type userId, then Escape.

1
load(oldId, options);
jkscroll•ggGtop/bottom•Tabnext example•Enterstart•qstop•Ctrl+kCtrl+jprev/next