Emacs: Copy to Register

By Xah Lee. Date: . Last updated: .

What is Register

Emacs has registers that let you store text. (it can also store other data, such as split windows config.)

Each register has a name, of a single lower letter a to z, or single capital letter A to Z, or single digit 0 to 9, or punctuation character.

Copy Text to Register

  1. Select Text
  2. Alt+x copy-to-registerCtrl+x r s
  3. Type a letter or digit, e.g. e, stores the text in register e.

🟢 TIP: If you have text that you frequently want to paste, such as templates, a better solution is to use emacs abbrevs. Emacs: Abbrev Mode

Paste from Register

  1. Alt+x insert-registerCtrl+x r i
  2. Type the letter name of the register. e.g. type e to paste from register e.

Reference

Emacs, copy paste