q[a-z] : record macro, do something, then press q again to stop recording. ie qa starts recording in register "a".
@[a-z] : to repeat the macro previously created.
q[A-Z] : Append at the end of the macro. eg qA will start appending to what was recorded in qa previously.
:register or :reg : Macro are stored in Vim’s registers.
“ayy : Yank current line to register a.
“Ay$ : Append content from current cursor position to line end into register "a".
“ap : Paste contents of register a in normal mode.
“+p : Paste contents of system clipboard. TODO: research “*p register.
prefix your macro with 0 or ^ , so that it starts the same way in all the lines.
suffix your macro with +, n, * , to setup macro to run in other lines.
+ : moves the cursor to the beginning of the next line.
n : goto next search item.
* : forward search the word under the cursor.
Note: you can improve the macro by editing the macro contents and again copying to the register.
m[a-zA-Z] : setup mark positions in normal mode.
‘[a-zA-Z] : Jump to the mark position. (' is a single tick)
:set nowrapscan : don’t go past the EOF.
:set lazyredraw : if you don’t want to see macro running, and just want to see the end result.
:cdo normal wfxll : To run the contents in normal mode.