Skip to content

Instantly share code, notes, and snippets.

@puppybits
Last active February 10, 2017 17:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save puppybits/a5ab96c93984ed90fe9e74a95ec5265b to your computer and use it in GitHub Desktop.
Save puppybits/a5ab96c93984ed90fe9e74a95ec5265b to your computer and use it in GitHub Desktop.
Emacs cheatsheet for common key commands

Diffing

cmd operation
⌥x, ediff file diff
⌥x, dired folder diff

Cursor

cmd operation
^f forward one character
^n next line
^p previous line
^a start of line
^e end of line
⌥f next word
⌥b last word
⌥a last sentence
⌥e next sentence
⌥v page up
^v page down
⌥g,g go to line
^␣ mark location
^x,^x return to mark
^u,^␣ cycle through marks
⎋,> end of buffer

Cut/Copy/Undo

cmd operation
^_ undo
⌥⌫ delete previous word
^k cut till end of line
⌥k cut from start of line
^␣ highlight
⌥h highlight paragraph
^w delete highlighted
^y paste (yank)
^w cut (kill)
^c copy (kill-ring-save)

Terminal

cmd operation
⌥⇧1 single command
⌥x, shell run a shell
⌥p cycle historical commnds
^c,^z stop process

Modes

cmd operation
⌥x,text-mode text mode

Files/Directories

cmd operation
^x,^f open file
^x,^s save file

Buffers aka Tabs

cmd operation
^x,^b see all open buffers
^x,b switch to buffer
^x,s save all edited buffers
^x,k kill active buffer

Searching

cmd operation
^s search forward
^r search backwards (reverse)
⌥⇧5 search & replace
⌥^s regex search & replace

Panes/Windowing

cmd operation
^x, 1 close all panes
^x, 2 bottom panes split
^x, 3 right panes split
^x, o switch panes
^x, ^b list old buffers

Debugger

cmd operation
^x, ielm lisp repl
c close

Packages

package-refresh-contents

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