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 init:

;; 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:

[see Emacs: Show kill-ring]

Paste from kill-ring History

  1. Alt+x yankCtrl+y
  2. Alt+x 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

If you have a question, put $5 at patreon and message me on xah discord.
Or support me by Buy Xah Emacs Tutorial

Emacs Tutorial

Emacs Init

Emacs Keys

ELisp

ELisp Examples

ELisp Write Major Mode


Emacs Tutorial

Quick Start

Manage Windows

File

Buffer

Find Replace

Copy/Paste

Unicode

Whitespace

Rectangle Edit

Line Wrap

Shell

View Special File

Working with Brackets

Org Mode

HTML

Emacs Efficiency

Misc