News for hackers. Stuff that matters.
Re:Efficient Editing With vim by latortuga on Friday September 25, 2009 @02:54PM (#844062)
This is especially powerful when trying to move small chunks of code around. Say you have something like

document.getElementById('asweetid')

and you want to grab just the id for use elsewhere. In command mode pressing f' will move your cursor to the quote, yf' will put 'asweetid' into your yank register and a p anywhere else will paste it. I also make heavy use of ctx where x is a character on a line that I want to replace up to. The best part about vim, I think, is how I think about the commands in my head and they just kind of flow out of my fingers.

"Hmm I want to change (press c) to (press t) that closing paren (press shift 0)."

Even just typing that my left hand instinctively moved toward the caps lock to go to command mode.

Re:Efficient Editing With vim by nostrademons on Friday September 25, 2009 @03:42PM (#844169)
Yeah, I use 'dt,' or 'dt)' all the time to move single arguments of functions around, and 'd%' to move the function calls themselves.
Re:Efficient Editing With vim by puffythefish on Friday September 25, 2009 @09:10PM (#844820)
yi' will also work in this example.