News for hackers. Stuff that matters.
Re:Vim Creep by TorKlingberg on Thursday July 12, 2012 @04:20PM (#4236557)
For that I would probably have used a regex search and replace in any decent editor, or perhaps a Perl one-liner.

cat file | perl -p -e 's-\s(.)\.rb-// Run the $1 command\ndef $1()\nend\n-'

Re:Vim Creep by sophacles on Thursday July 12, 2012 @05:01PM (#4236797)
As a heavy user of regex one liners, I agree in this case, but as a heavy user of vim, there are lots of times when a macro can be recorded and run over a file long before a proper regex can be constructed, particularly in multi line settings, or those things that would require heavily nested backrefs.