Search...

14 November 2008

Vim Macro Recorder.

I love simple tools for simple jobs and the VIM Keyboard Macro recorder is one such tool. In fact it was the reason I found VIM in the first place.

Anyway, how to use the recorder. To record a macro hit the q button and then enter a name for your macro. q is a great name as it is quick to type (qq) but you can name it bob (qbob) or whatever you want. When you finish completing your keyboard maneuvers then hit q again to end the recording.

To play the macro back you type @name. So if you are lazy like me that would be @q. If you want to repeat the macro a number of times then 10@q will play the q macro 10 times.

No comments: