I nerver remember how to use macros in vim… quick post for later:

qregister – Start macro recording into the named register. For instance, qa starts recording and puts the macro into register a.
q – End recording.
@register – Replay the macro stored in the named register. For instance, @a replays the macro in register a.