Emacs: Copy/Paste and kill-ring

By Xah Lee. Date: . Last updated: .

Undo, Cut, Copy, Paste

undoCtrl+_
Undo
kill-regionCtrl+w
Cut
kill-ring-saveAlt+w
Copy
yankCtrl+y
Paste

In emacs:

Standard Copy/Paste Keys: cua-mode

If you prefer standard keys such as Ctrl+c for copy, Ctrl+x for cut Ctrl+v for paste, then turn on cua-mode. put this in your Emacs Init File:

;; use standard keys for undo cut copy paste
(cua-mode 1)

Paste from Kill Ring History

Emacs's clipboard (called kill-ring) maintains a history of copy/cut content.

View kill-ring Content

emacs kill-ring
emacs kill-ring

To view copy/cut history: Pull the GUI menu [Edit ▸ Paste from kill Menu].

Here's a command that list kill-ring content in a buffer: Emacs: Show kill-ring

Paste from kill-ring History

  1. yankCtrl+y
  2. yank-popAlt+y】 to insert previous copied content.
  3. Press Alt+y again to get earlier copied content. (repeat this step to get earlier)

Emacs Copy/Paste

ErgoEmacs mascot-s276x226
Buy Xah Emacs Tutorial

Emacs Tutorial

Quick Start

Manage Windows

File

Buffer

Find Replace

Copy/Paste

Unicode

Whitespace

Rectangle Edit

Line Wrap

Shell

View Special File

Editing Brackets

Org Mode

HTML

Emacs Efficiency

Misc