Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

Next: , Previous: RegPos, Up: Registers


18.2 Saving Text in Registers

When you want to insert a copy of the same piece of text several times, it may be inconvenient to yank it from the kill ring, since each subsequent kill moves that entry further down the ring. An alternative is to store the text in a register and later retrieve it.

C-x r s r
Copy region into register r (copy-to-register).
C-x r i r
Insert text from register r (insert-register).
M-x append-to-register <RET> r
Append region to text in register r.
M-x prepend-to-register <RET> r
Prepend region to text in register r.

C-x r s r stores a copy of the text of the region into the register named r. C-u C-x r s r, the same command with a numeric argument, deletes the text from the buffer as well; you can think of this as “moving” the region text into the register.

M-x append-to-register <RET> r appends the copy of the text in the region to the text already stored in the register named r. If invoked with a numeric argument, it deletes the region after appending it to the register. The command prepend-to-register is similar, except that it prepends the region text to the text in the register, rather than appending it.

C-x r i r inserts in the buffer the text from register r. Normally it leaves point before the text and places the mark after, but with a numeric argument (C-u) it puts point after the text and the mark before.


 
 
  Published under the terms of the GNU General Public License Design by Interspire