\includegraphics{test.png}
if you stand inside the curly brackets and type ciB (change in Brackets) you get this
\includegraphics{}
with your cursor active inside the brackets, just awesome ..
\includegraphics{test.png}
if you stand inside the curly brackets and type ciB (change in Brackets) you get this
\includegraphics{}
with your cursor active inside the brackets, just awesome ..
(I think of "B" as beginning of a Word [including punctuation], so it would confuse me to use the "B" meaning braces)
I read 'ci(' as change what's inside parents. I read 'ci{' as change inside braces. 'ca(' and 'ca{' grab the parents and the braces as well.
=========================
These combinations work for (d)elete as well. If your cursor is over the 4th letter of a 6 letter word, 'dw' will delete to the end of the word. 'diw' on the other hand will delete the whole word. (I've never tried 'daw' although I know 'da(' works)
It's because 'iw', 'aw', and the like are commands of their own when an operator like 'c' or 'd' precedes [1]. So 'di)' is interpreted as 'd' followed by the 'i)' command (if I'm interpreting it correctly!), not as 'd' followed by 'i' followed by ')', which is nonsense.
I hope that was clear - just trying to understand vim better :)
[1]: http://vimdoc.sourceforge.net/htmldoc/motion.html#text-objec...