Copy the 3rd word of line 10. Jump with 10G, hop two words with 2w, then yank the word with ye. Don't change the file.
nothing to see on line one line two is just filler line three keeps the count honest line four, still scrolling line five has no treasure line six is deliberately boring line seven, keep going line eight, almost there line nine, one more grab the emerald from this line line eleven, you went too far line twelve, way too far
Canonical solution: 10G 2w ye · target: 7 keystrokes — the fewest that solve it (every keypress counts).
Counts multiply motions: 2w = w twice. ye yanks to the end of the word — enough here. (yiw includes trailing whitespace; either works for this check.)
| Keys | What it does |
|---|---|
| yiw | copy the word under the cursor |
| yaw | copy the word plus its space |
| ye | copy to the end of the word |
| 2w yiw | hop two words, then copy |
Reading about keystrokes doesn't build keystrokes. Try this in a real vim buffer right now — the “The emerald heist” mission takes about a minute.
Sign in free to practice →