Vim/Neovim
Macros Commands
Automate repetitive tasks with Vim macros. Learn to record, replay, and edit macros stored in registers for powerful text manipulation workflows.
8 commands
Pro Tips
Record a macro with 'q{register}', perform your actions, then 'q' to stop. Replay with '@{register}'.
Use '@@' to repeat the last played macro, or prefix with a count: '10@a' runs macro 'a' 10 times.
Edit macros by pasting the register (':put a'), editing, and yanking back ('"ayy').
Common Mistakes
Macros stop on errors. Use 'norm @a' in visual mode to run macros on selected lines, skipping errors.