# Keyboard macros in Skink: record and replay keys

> Record a run of keys with Ctrl+U and replay it with Ctrl+J to repeat an edit on many lines, Micro style. Also :record and :replay.

Source: https://skink.cc/editing/macros/

Press Ctrl+U, make an edit, and press Ctrl+U again. Ctrl+J replays it.

## Repeat an edit on many lines

1. Put the cursor at the start of the first line.
2. Press Ctrl+U. The status line shows **● REC**.
3. Make the edit, and end on the next line: for example End, type `;`, ↓, Home.
4. Press Ctrl+U to stop. The status line says how many keys were recorded.
5. Press Ctrl+J once per line.

| Key | Typed command | Does |
|---|---|---|
| Ctrl+U | `:record` | Start or stop recording |
| Ctrl+J | `:replay` | Replay the last macro |

## Good to know

- A macro records keys, not mouse clicks, and replays them through the same key handling, so find, quick open and commands work inside it.
- Skink keeps one macro, until you record another or quit.
- For the same change at many places at once, [multiple cursors](https://skink.cc/editing/multiple-cursors/) are often quicker.
- Started recording by accident? Ctrl+U stops it.
