Turn each “key = value” into “value → key”. Record a macro on line 1 (qa …something clever with dw, $, etc… q), then replay it down the list. Any recording that produces the target passes — this is your macro black belt.
host = localhost port = 8080 user = admin
Canonical solution: record a key=value → value→key transform, then @a down the list · par: 40 keystrokes (vimgolf rules — every keypress counts).
A robust macro starts from a known spot (0 or ^), does its work with motions and text objects (not arrow keys or fixed counts that break on different line lengths), and ends by moving to the next line so it replays cleanly.
Reading about keystrokes doesn't build keystrokes. Try this in a real vim buffer right now — the “The assembly line” mission takes about a minute.
Practice free — no signup →