Vim: how to use ci (change inside) with multiple occurrences per line

In a line like this:

something "one!", "and two", "and three", "and more" 

How do I use the ci "replace" and three "command?

I tried some compiled combos with no luck.

+4
source share
2 answers

First go to the desired substring:

 /three 

or in the line:

 f";;;; 

(which moves on to the next " 5 times)

or

 f,; 

Then ci" deletes the line leaving the cursor to insert inside the empty quotes

+5
source

Move to substring:

2fa

Then replace and three:

CI "

+1
source

Source: https://habr.com/ru/post/1432055/


All Articles