Puppollo
10/2/2015 - 12:51 PM

Recording a macro Each register is identified by a letter a-z.

Recording a macro Each register is identified by a letter a-z.

Record
q<letter><commands>q

To execute the macro <number> times (once by default), type:

<number>@<letter>

So, the complete process looks like:
qd 	start recording to register d
... 	your complex series of commands
q 	stop recording
@d 	execute your macro
@@ 	execute your macro again 


If you want to search an entire file, you can use % to indicate that as the range:

:%s/search/replace/g