You need two loaves. Put the cursor on the “- bread” line, yank it with yy, then press p to paste it below.
inventory: - rope - torch - bread - map
Canonical solution: yy p (on the bread line) · par: 5 keystrokes (vimgolf rules — every keypress counts).
p pastes after the cursor (below, for whole lines); P pastes before. yy + p is the classic duplicate-line combo.
| Keys | What it does |
|---|---|
| yyp | duplicate the current line |
| yyP | duplicate above instead |
| :t. | duplicate via ex command |
| V y p | visual-select, copy, paste |
Reading about keystrokes doesn't build keystrokes. Try this in a real vim buffer right now — the “Double the bread” mission takes about a minute.
Practice free — no signup →