Step 6 of 7

Special registers

Special registers

Alongside the named registers, Helix has a handful of special ones with punctuation for names. Three are worth knowing now:

  • " — the default register, which is what plain y, d and p use
  • _ — the black hole register: anything written to it vanishes, so "_d deletes without overwriting the default register
  • / — the last search pattern, which a later lesson will use

Press " on its own and Helix pops up a list of every register with a preview of its contents. Hit escape to close it without choosing one.

Work through the checklist below — the line you paste at the end should be the one you yanked at the start, untouched by the deletion in between.

  1. Yank the first line Select the YANK ME line (4gg then x) and press y.
  2. Delete the line below it into the black hole register Move down a line, select it with x, and type "_d — the default register is left alone.
  3. Paste from the default register Move to the bottom of the file (ge) and press p — the line that comes back is the one you yanked, untouched by the deletion.
Yank the first line Select the YANK ME line (4gg then x) and press y.

Next: Delete the line below it into the black hole register

Loading editor…