Skip to content

Instantly share code, notes, and snippets.

@jasonm23
Created July 20, 2010 23:43
Show Gist options
  • Save jasonm23/483789 to your computer and use it in GitHub Desktop.
Save jasonm23/483789 to your computer and use it in GitHub Desktop.

Quick guide to Emacs copy paste...

Select a region?

Begin the region at the cursor C-SPACE then move the cursor around how you like, cursor keys, fwd-back word/line/sentence etc...

Cut (kill) the region?

C-w kills the selected region and puts it in the clipboard (kill-ring)

Copy the region?

M-w copies the selected region to the kill-ring

Paste? (yank!)

C-y pastes the last kill/save (cut/copy) from the kill-ring.

Pop paste?!?

The kill-ring is nice, in that it's a list. M-y will paste the last item from the list, and pop it out of the list. The next M-y or C-y you do will be the next item in the kill ring, and so on...

Overwrite selection?

By default Emacs doesn't do selection overwrite when you start typing on a selected region.

Of course, Emacs being Emacs, you can customize this using delete-selection-mode

Windows clipboard interaction

Windows clipboard will be placed in the kill-ring when switching to Emacs from another windows app.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment