You need two loaves. You're on the bread line — yank it with yy, then press p to paste it below.
inventory: - rope - torch - bread - map
Canonical solution: yy p · target: 3 keystrokes — the fewest that solve it (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.
Sign in free to practice →