normal·mode
~ / macros / edit-a-macrolesson 6/6

Edit a macro as text

Paste a register into the buffer, fix it, and yank it back.

2 drills

  1. Fix one wrong key: Register a was recorded with gu (lowercase) where it needed gU (uppercase). Paste it on a line of its own, fix that letter, yank it back into a, delete the scratch line and run the fixed macro on every line.
  2. Turn text into a macro: The first line is a macro written out as text. Yank it into register q with "qY, delete that line, and run the macro on the remaining lines.

The drill editor loads in your browser.

outside the editor the page is in normal mode: ? keymaps · / find · : commandsfound this useful? ☕ support it ·credits · source · not affiliated with Vim or Neovim