Inconsistent behavior when changing inside of a text object.

34 views
Skip to first unread message

J.F.

unread,
Jan 7, 2017, 11:02:45 AM1/7/17
to vim_use
I assume this question is answered elsewhere, but I'm having trouble formulating a question to type into a search engine. I can only think of an example...

Consider the line below:

I am [so darned] "cool"...

Positioning the cursor on 'I' and typing the mapping 'ci"' will delete "cool" and put me inside the quotes in Insert mode. However, typing "ci[" when positioned on the 'I' won't perform similarly.

Is there a reason for this inconsistency?

I'm currently using Vim 7.4.

Paul

unread,
Jan 9, 2017, 5:36:06 PM1/9/17
to vim_use
On Saturday, 07 January, 2017 at 16:02:45 GMT, J.F. wrote:
>Consider the line below:
>
> I am [so darned] "cool"...
>
>Positioning the cursor on 'I' and typing the mapping 'ci"' will delete "cool" and put me inside the quotes in Insert mode. However, typing "ci[" when positioned on the 'I' won't perform similarly.
>
>Is there a reason for this inconsistency?

I don't know the reason, but https://github.com/wellle/targets.vim will do it.

J.F.

unread,
Jan 11, 2017, 9:52:33 AM1/11/17
to vim_use
Thank you, Jan!

I wasn't aware of this plugin. What a magnificent find!

Best,
JF

Reply all
Reply to author
Forward
0 new messages