Screen Too Small

This course material requires a larger screen to properly display the terminal and editor interfaces.

Please use a tablet, laptop, or desktop computer for the best learning experience.

You can continue browsing, but the experience will be significantly limited.

Free Trial: 5 lessons remaining
Unlock Full Access
Practice Beginner 10 min

Brackets, Braces & Parentheses

Text Objects: Speaking Vim's Language

Task Instructions

Master delimiter text objects for code manipulation

Use delimiter text objects to edit code structures. Position cursor inside parentheses and use ci( to change contents, or use ci{ for braces, ci[ for brackets.

Learning objectives

  • Master delimiter text objects: i(, a(, i[, a[, i{, a{
  • Learn to edit function arguments and array elements
  • Practice changing code blocks and data structures
  • Understand nested delimiter handling

Required keystrokes

Your submission is checked for these keystrokes, not just the final text — so reach for the technique, not a workaround.

  • ci[\(\[\{] Change inside delimiters
  • [cd][ia][\(\[\{] Use delimiter objects

Helpful commands

ci(
Change inside parentheses
ci[
Change inside brackets
ci{
Change inside braces
ca(
Change around parentheses
di{
Delete inside braces
Stuck? Peek at a hint 3 hints · try it on your own first
  • Works with (), [], {}, and even <> for HTML tags
  • Vim is smart about nested delimiters
  • Use 'a' variants to include the delimiters
vim@sandbox: ~/workspace
Save your file with :w ⏎ to unlock Submit