Vim 101: A Gentle Introduction to Macros:

Press qq to start recording and save the macro to register q
Enter some commands
Press q to stop recording
To use the macro you've just recorded, type @q.

I keep having to clean up lines of parameters from autogenerated NHibernate SQL to slap into Microsoft SQL Server Management Studio that looks like...


Making a macro for :. s/@p[0-9]\+=N//g is pretty useful.

Labels: ,