Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

In situation as below, I want to delete "TWO":

foobar("ONE", "TWO");
//              ^-- cursor here

so I press da", and the result is:

foobar("ONE",);
//           ^-- cursor here

How can I change this not to delete the space near the comma? Or what keys should I use? I never yet found situation where this behavior (of deleting space) would be what I want.

share|improve this question
1  
I don't think that you can change this behavior. What about F"df"? –  romainl Sep 21 '12 at 9:25

1 Answer 1

Use 2di" (or d2i", which is the same). This is a special case of using count with i" text-object, which removes all text inside quotes including quotes, acting just as you want it.

See also :help iquote.

You can find detailed explanation on removing spaces in :help aquote. It may not be really useful for something enclosed in quotes, but removing trailing space or leading when there is no trailing space definitely makes sense when you use sentence or paragraph text-objects. The behavior could be made same for all text-object just for consistency.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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