Recording Macros

Automate repetitive tasks with q recordings

Open companion guide

Goals

0/4
  • Record macro with qa
  • Stop recording with q
  • Play macro with @a
  • Repeat last macro with @@
Keys 0 · par 30

Instructions

  1. 1.Record a macro that adds "- " to line start
  2. 2.Press qa to start recording to register a
  3. 3.Press I, type "- ", press Escape, j
  4. 4.Press q to stop recording
  5. 5.Use @a to replay on remaining lines
Quick KeysNORMAL
h j k lMove cursor
w b eWord movement
i a oEnter insert
dDelete
yYank (copy)
pPaste
uUndo
vVisual mode
:Command mode
/Search

Community pulse

Weekly top score
Leaderboard warming up...
Daily challenge
Loading challenge...
Vim mode: normal

Practice buffer · reset restarts the lesson (not vim u)

Lesson Companion

Use Recording Macros in real editing

This companion guide helps you complete Recording Macros with fewer mistakes and better command fluency.

Quick Command Cheatsheet
  • macros
  • qa
  • @
When to Use This Motion/Operator

Use this lesson whenever you need to repeat the same edit pattern across multiple lines with fewer keystrokes.

  • Prefer this over arrow-key micro-movements before each edit.
  • Use this pattern whenever you're working inside Macros & Power Moves tasks.
  • Reach for macros, qa, @ when this pattern appears.
Common Mistakes
  • Recording a macro so specific to one line that it fails to generalize.
  • Replaying a macro with a count before testing it once on a single line.
FAQ

How long should this lesson take?

Target completion is 120 seconds, but correctness matters more than speed at first.

Should I move to the next lesson if my score is low?

Advanced patterns take longer to feel natural, so a lower score on the first pass is normal — prioritize accuracy over speed here.