Emacs: Copy to Register
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
- Select Text
- Alt+x
copy-to-register【Ctrl+x r s】 - 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
- Alt+x
insert-register【Ctrl+x r i】 - Type the letter name of the register. e.g. type e to paste from register e.