Learn Vim / Drop a pin — vim

Drop a pin — vim

The answerCanonical keystrokes: fD ma G fT ciwDONE Esc `a ciwFINAL Esc.

Try it on a real buffer

Two words to fix, far apart. On DRAFT: fD to jump there, ma to set mark a. G to the last line, fT to land on TODO, ciw to type DONE, Esc. `a to jump back, ciw to type FINAL, Esc.

status: DRAFT
- filler line one
- filler line two
- filler line three
- filler line four
deadline: TODO

Canonical solution: fD ma G fT ciwDONE Esc `a ciwFINAL Esc · target: 26 keystrokes — the fewest that solve it (every keypress counts).

Why it works

ma drops mark a at the cursor. `a leaps back to that exact spot from anywhere — no scrolling, no searching. Marks are how you hold your place while you go fix something elsewhere.

▶ live vim buffertarget 26 keystrokes
Two words to fix, far apart. On DRAFT: fD to jump there, ma to set mark a. G to the last line, fT to land on TODO, ciw to type DONE, Esc. `a to jump back, ciw to type FINAL, Esc.

Reading about keystrokes doesn't build keystrokes. Try this in a real vim buffer right now — the “Drop a pin” mission takes about a minute.

Sign in free to practice →

Keep going