4 ms·
I think cf" is pretty standard. I think it is even a original vi command and not a vim extension. Change the text from the cursor position up to the first insta
by terhechte 13y ago
I think cf" is pretty standard. I think it is even a original vi command and not a vim extension. Change the text from the cursor position up to the first instance of the " char.
- bencoder 13y agoI normally use ct" which is pretty much the same but excludes the character which I find is normally more useful - if I'm changing something in quotes, then ct" makes more sense. ci" is the best one of those though (change inside ") I also have the same problem as the op, I can't use vim plugins.
- yesimahuman 13y agoThanks, my vim problem is I'm always missing out on faster commands :)
- terhechte 13y agoOh I know that feeling, even when I learn a faster command, it only takes a day once I forget about using it. It is really difficult adding unknown commands to the list of muscle memory commands. I recently switched to caps-lock+G for escape (from jj) and that was a tough ride because my muscle memory would always hit jj.
- IanCal 13y agoIn that case, a couple of extensions of that which I use constantly: cf" is change find " But, since this is a grammar, there are other things than c we can use like d (delete find ") or y (yank find "). More than this we can swap out f. Instead of f, try i, which I think of as "inside". So ci" deletes the text inside quotes and leaves you in insert mode. ci) deletes the text inside parentheses and leaves you in insert mode. For example foobar[somekeyvar] = "wooyay" move to somekeyvar and ci] then type "anotherkey" foobar[anotherkey] = "wooyay" I use this constantly while programming.