normal·mode
~ / text-objects / bracketslesson 3/6

Brackets: i(, i{, i[ and i<

Act on whatever sits between a pair of brackets, even across lines.

4 drills

  1. Change the arguments: Replace everything inside the parentheses around the cursor.
  2. Empty any bracket pair: Delete everything inside the innermost brackets around the cursor, whatever kind they are.
  3. Reach the outer pair with a count: The cursor is inside a nested call. Empty the outer parentheses in one go.
  4. Clear a block that spans lines: Delete the body of the block (everything between the braces), keeping the braces on their own lines.

The drill editor loads in your browser.

outside the editor the page is in normal mode: ? keymaps · / find · : commandsfound this useful? ☕ support it ·credits · source · not affiliated with Vim or Neovim