next up previous
Next: Indentation. Up: Deletion, insertion, and text Previous: Deleting text.

The kill buffer.

Several of the preceding commands mention the kill buffer. Text that is deleted is appended to the end of the current kill buffer, and can later be retrieved and inserted (``pasted'' or ``yanked'') elsewhere in the text (even in another buffer different from its original source). Normally, each time a command that does not append to the kill buffer is executed, the current kill buffer is saved in a ring of kill buffers, and the next deletion command starts with an empty kill buffer. Hence, to move a sequence of lines, one can issue a sequence of C-k commands, with no intervening commands, move to the desired destination, and yank them back (with C-y).
C-y
inserts the contents of the current kill buffer at the cursor, and moves cursor to end of inserted text. If a numeric value of ARG is supplied, inserts the 7#7most recent kill buffer in the ring.
C-u C-y
inserts current kill buffer, as for C-y, but leaves point unchanged.
M-y
when issued immediately after a C-y or M-y, deletes the text inserted by the C-y or M-y and substitutes the text from the next kill buffer in sequence in the kill ring.
M-w
is the same as M-W, above, but simply adds the text to the kill buffer without actually deleting it.
C-M-w
causes the next command, if a kill command, to append to the end of previous kill buffer, rather than starting with a new one. This allows you, for example, to delete lines from several different places and then yank them back into one place.


next up previous
Next: Indentation. Up: Deletion, insertion, and text Previous: Deleting text.
David Wolfe
1998-12-15