Skip to content

Instantly share code, notes, and snippets.

@cboutter
Created August 28, 2012 12:47
Show Gist options
  • Save cboutter/3497736 to your computer and use it in GitHub Desktop.
Save cboutter/3497736 to your computer and use it in GitHub Desktop.
Useful emacs commands

Simple Edit Commands

Cut C-w
Copy M-w
Paste C-y
Kill Word M-d

Advanced Edit Commands

Selecting and copying words or sexps without moving the cursor (c.f. http://emacswiki.org/emacs/CopyWithoutSelection)
C-M-SPC M-w

Kill rest of line or one or more lines (kill-line)
C-k

Buffers and windows

Create/switch buffers C-x b
Kill buffer C-x k

Rectangles

Kill the text of the region-rectangle, saving its contents as the "last killed rectangle" (kill-rectangle)
C-x r k

Yank the last killed rectangle with its upper left corner at point (yank-rectangle)
C-x r y

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