8

I use ci) and ci] quite a lot to change what happens in between the parens or brackets.

Is there a way to remove everything including the parens or brackets?

1 Answer 1

14

You can use the a variant: ca), ca].

The i is "inner", whereas the a is for "a" as in "a word", "a sentence", or "a [] block". I usually think of these as "inner" and "outer" ("auter?") though.

See :help text-objects for a full list and documentation, or :help objects for a brief overview.

3
  • 4
    The version that sticks well in my head is that ci) is "change inside brackets" and ca) is "change around brackets" Commented Nov 28, 2022 at 8:53
  • Amazing! this is a game changer. Thank you Commented Nov 28, 2022 at 11:47
  • 1
    note that di(, da(, yi( and ya( etc. also work and are also extremely useful Commented Nov 28, 2022 at 13:20

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.