Named registers
To use a register other than the default, type " followed by the
register’s name before a command. For example, "ay yanks the current
selection into register a, and "ap pastes the contents of register a
into the file.
Helix has 26 of these so-called “named registers” — one for each letter of
the alphabet. That means you essentially have 26 separate clipboards, and it
is completely up to you how to use them. Editors without registers force
you to rely on the one system clipboard for everything.
For completeness, typing y on its own is the same as typing ""y: a
yank into the default register.
Work through the checklist below.
1 2 3 4 5
Yank the first line into register a Select the COPY ME INTO REGISTER a line (7gg then x), then type "ay.
Yank the next line into register b Move down a line, select it with x, and type "by.
Yank the next line into register c Same again, one line down — x then "cy.
Yank the last line into register d And once more — x then "dy.
Paste the lines back in the order b, d, a, c Move to the bottom of the file (ge), then paste the four registers back in this order — "bp, "dp, "ap, "cp. The step completes once all four lines are in place.
Next: Yank the next line into register b
Next: Yank the next line into register c
Next: Yank the last line into register d
Next: Paste the lines back in the order b, d, a, c
Last one — goal check runs when it's done
Nice work!
Up next: Special registers.