Yanking a selection
A line is just one kind of selection. Anything you can select, you can
yank: a word made with e, a selection grown in select mode with v, or
anything else from the previous lessons. p then pastes it right after the
cursor.
There’s a sibling key, P, which pastes before the selection instead of
after it. And if you want to swap a selection out for what you yanked, R
replaces the selection with the yanked text in one go.
Work through the checklist below.
1 2 3
Start a selection in select mode Put the cursor where you want the selection to start, then press v.
Yank the selection Extend the selection with any motions you like — a word, a sentence, whatever takes your fancy. Press y and Helix drops you back into normal mode.
Paste it at the bottom of the file Move to the --> line (ge gets you there), jump to the end of the line with gl, then press p.
Next: Yank the selection
Next: Paste it at the bottom of the file
Last one — goal check runs when it's done
Nice work!
Up next: The default register.