News for hackers. Stuff that matters.
Re:A Starting Guide to VIM from Textmate by 5teev on Friday November 19, 2010 @09:20PM (#1923621)
One thing I do all the time is making macros on the fly for repetitive edits with :map. E.g., switch the current and next line

:map * ddp

Then type * in command mode to execute the steps.

And if you mangle your file beyond hope with out of control macros, there's always u to undo and :q! to quit without saving.

Re:A Starting Guide to VIM from Textmate by crazydiamond on Friday November 19, 2010 @11:17PM (#1923835)
Are you not aware that '*' (asterisk) searches for the next occurrence of the word under the cursor. That's one key i just can't live without. '#' (hash) does the reverse.

Why not do a 'qq' to record your macro as 'q' and @q to replay it.

Re:A Starting Guide to VIM from Textmate by 5teev on Saturday November 20, 2010 @05:18AM (#1924248)
It was an arbitrary choice for an example. Obviously one would choose a key not being used for anything else. (This choice can also vary from session to session, depending on the task at hand.)