Hacker News new | past | comments | ask | show | jobs | submit login

In 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.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: