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

Thanks, my vim problem is I'm always missing out on faster commands :)



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.


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




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

Search: