Record and Replay Macros in Vim

Record a macro into a register with q{register}...q, then replay it with @{register} or repeat the last macro with @@. Macros automate repeated edit sequences.

Commands you practise

q{register}q
Record a sequence of edits into a register with q, then replay it with @. Perfect for automating repetitive formatting tasks.
@{register}
Replay a recorded macro to instantly automate repetitive edits. Use a count like 3@a to lightning-run it across multiple lines.
@@
Repeat the last executed macro instantly. No need to remember the register name—just double-tap @ to keep the automation flowing.

Levels

  1. Yank to Play (easy): Yank the macro on the first line into a register, then replay it to fix the fruits.
  2. Await the Future (medium): Record a macro to convert const declarations into await fetch calls.
  3. Log Cleaner (hard): Record, test, and instantly replay a macro with a count to clean up the log lines.

Each level opens a real Neovim session in your browser with a start file and a target file. Edit one into the other in as few keystrokes as you can, then race the vimbot's solution.

Part of VimGolf.ai Premium ($10 once, lifetime). Region: Macros. See the whole skill map.