qz - starts recording to the register z
Esc q - stops the recording
@z - replays the recording z
5@z - replays the recording z 5 times
@@ - replays the previous recording again
For recordings can be used 0-9,a-z
Using A-Z appends to a-z
Recording don't work outside of vim:
they can execute !cmds, but not in :shell
:h recording - recording help
:reg z - shows the macro contents
:register - show the rest of registers
"zp - paste the register content in current line
"zyy - copy current line to a register z
Adding to vimrc:
let @z='here is your macro'