1

ci" (and 1ci") leave "s intact; why does 2ci" (and the same formula with any higher number) delete them?

1

I suggest you read doc/motion.txt. It states that with count 2 the quotes are included and thus i" works a bit like a" except no extra whitespace is added.

EDIT: Just to be clear, I don't strictly speaking provide an answer. I take this behaviour as the design decision of the author and since he did not provide rationale in the manual, you can only ask him, why he decided to do this and not something completely different.

1

First, you need to know what ci" mean in vim:

  • c means change
  • i means inside
  • " means double quote literal text object.

So, ci" means change a string inside quotes. Adding 2 applied change command over 2 quotes.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.