3 ms·
I don't know if I am understanding your question correctly. I read 'ci(' as change what's inside parents. I read 'ci{' as change inside braces. 'ca(' and 'ca{'
by bgilroy26 11y ago
I don't know if I am understanding your question correctly.
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)
- chestervonwinch 11y agoright. I guess what I meant was 'c' and 'd' are usually followed by movements, so stuff like 'dt)' makes sense to me. 'i' on the other hand is not a movement, so the behavior of 'di)' was surprising to me. 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-objects http://vimdoc.sourceforge.net/htmldoc/motion.html#text-objec...