Emacs Cheatsheet

Table of Contents

1 Emacs general

1.1 Help

Key bindingDescriptionCommand
C-h tTutorialhelp-with-tutorial
C-h mHelp for active modedescribe-mode
C-h kHelp for key sequencedescribe-key
C-h fHelp for functiondescribe-function
C-h vHelp for variabledescribe-varialbe
C-h aSearch helpapropos
C-h iInfo readerinfo
C-h pFind help by keywordfinder-by-keyword
qClose help bufferquit-window

1.2 General

Key bindingDescriptionCommand
C-gCancelkeyboard-quit
C-0 to C-9, M-0 to M-9, C-u <num>Numeric argumentdigit-argument
C-uUniversal argument (same as numerical argument 4)universal-argument
M–, C-M–Negative argumentnegative-argument

1.3 Movement

Key bindingDescriptionCommand
C-fNext character
C-bPrevious character
M-fNext word
M-bPrevious word
C-aBeginning of line
C-eEnd of line
M-aBackward sentence
M-eForward sentence
C-upPrevious paragraphbackward-paragraph
C-downNextt paragraphforward-paragraph
C-lCenter line on screen
C-nNext line
C-pPrevious line
C-vNext page
M-vPrevious page
C-M-vScroll other window/frame
C-M-S-vScroll other window/frame backwards
M-<Beginning of document
M->End of document
C-M-fMove forward by s-expression
C-M-bMove backward by s-expression
C-M-dMove down list
C-M-uMove up list
M-g gGo to line
M-g M-gGo to line
M-mBack to indentation
M-rCycle top/center/bottom of visible windowmove-to-window-line-top-bottom
C-x r SPCStore point in registerpoint-to-register
C-x r jJump to point stored in registerjump-to-register
C-x C-xToggle point and markexchange-point-and-mark
C-u C-SPCCycle mark ring
M-g M-nNext error (in compile mode)next-error
M-g M-pPrevious error (in compile mode)previous-error
C-M-aBeginning of function/class definitionbeginning-of-defun
C-M-eEnd of function/class definitionend-of-defun

1.4 Search

Key bindingDescriptionCommand
C-sForward searchisearch-forward-regexp
C-rBackward searchisearch-backward-regexp
C-s C-wAdd word after point to search

1.5 Tags

Key bindingDescriptionCommand
M-.Go to symbol definitionfind-tag
M-*Return to starting pointpop-tag-mark
M-0 M-.Go to next matching definition
M-x tag-searchStart a search
M-,Go to next matchtags-loop-continue

1.6 Frames

Key bindingDescriptionCommand
M-x make-frameNew frame
C-x 5 0Close framedelete-frame

1.7 Windows

Key bindingDescriptionCommand
C-x 0Close windowdelete-window
C-x 1Make current window only windowdelete-other-windows
C-x 2Split verticallysplit-window-below
C-x 3Split horizontallysplit-window-right
C-x oGo to next windowother-window
Shift+arrow keyFocus in directionwindmove-left/right/etc
C-x M-fOpen file in new window

1.8 Buffers

Key bindingDescriptionCommand
C-x bSwitch buffer
C-x C-bBuffer list
C-x kKill buffer
C-ySend buffer to end of buffer list
C-x C-RightNext buffer
C-x C-LeftPrevious buffer

1.9 Copy/paste/delete

Key bindingDescriptionCommand
C-SPCSet mark
C-x hSelect whole buffer
M-hSelect paragraph
C-wKill region
M-wCopy region
C-yPaste from kill ring
M-yCycle kill ring
C-kKill text to end of line
C-M-hKill previous word
C-u C-SPCJump to last mark
C-_Undo

1.10 File management

Key bindingDescriptionCommand
C-x C-fFind file
C-x fFind recent file
C-x sSave file
C-c rRevert to file on diskrevert-buffer

1.11 Various

Key bindingDescriptionCommand
C-x mEmacs shell
M-;(Un-)Comment region
M-/Completion (Hippie Expand)
C-x C-iIdo function list
C-M \Reindent region
C-c nCleanup whitespace in ws mode
C-|Shell command on region
C-u C-|Like above, replace selection
C-u C-SpcPop mark

1.12 Evaluate Elisp code

Key bindingDescriptionCommand
C-c vEvaluate buffer
C-x C-eEvaluate last sexp

2 Org-mode

Key bindingDescriptionCommand
M-Shift-RetInsert TODO item
C-c C-tMark TODO as done
C-c C-oOpen link
C-c lStore link
C-c C-lPaste link
C-c C-sSchedule task
Shift-TabDocument overview

Date: 2012-04-14 01:02:18 CEST

Author: Michael Kohl

Org version 7.8.03 with Emacs version 24

Validate XHTML 1.0