I often find myself in this situation:
\foo{\bar abc \baz{def} more stuff}
↑
and I want to change anything from the cursor position to the correct enclosing brace. In simple cases, ct}
works fine, but not here, as it would yield
\foo{\bar } more stuff}
↑
In other simple cases, when I am happy to change the whole content of the braces, I can use text objects, i.e. ci}
, to change everything correctly:
\foo{}
↑
But how do I get to
\foo{\bar }
↑
ideally somehow using text objects (i.e. i}
), so that it works well in general?