Show Menu
Cheatography

Emacs DO NOT USE Cheat Sheet (DRAFT) by

This was made for my customized Emacs configuration. It will NOT WORK and be entirely misleading with another Emacs setup.

This is a draft cheat sheet. It is a work in progress and is not finished yet.

Handling Files

C-x C-f
[
C-f
]
Open file [without IDO]
C-x C-s
Save file
C-x C-w
Save file as...
C-x s
Save all buffers
C-x C-r
Rename file
C-x C-d
Delete file
C-x C-a
Edit as root
C-x RET c
Encoding for next command
C-x RET f
Encoding for saving file

TRAMP

/[user­@]h­ost­:path
Remote access via SSH
/sudo:­:/path
Open as root

General editing

C-y
Yank (paste)
M-y
Cycle in kill ring
C-c y
Browse kill ring
C-Spc
[
C-Spc
]
Set mark [and deactivate it]
C-u C-Spc
Jump to mark

Dired (open with C-x d)

C/R/D
Copy/r­ena­me/­delete
!/&
Shell comman­d/a­syn­chr­onous
Z
Compre­ss/­unc­ompress
M/G/O
Change mode/g­rou­p/owner
A/Q
Search­/re­place
m/u/U
Mark/u­nma­rk/­unmark all
+
New directory
g
Refresh
 

Frames

C-x 0
Close current frame
C-x 1
Close all except current frame
C-x
{
2
/
3
}
Split frame {horiz­ont­all­y/v­ert­ically}
C-TAB
Switch to next frame
M-S-arrows
Resize frame
C-c s a
Scroll all frames simult­ane­ously

Screens

F9
Create new screen
S-F9
Kill current screen
M-1
...
M-0
Go to screen number 1 ... 10
C-z l
List active screens
C-z C-b
Escreen menu

Desktops

C-x x r
Load session
C-x x s
Save current session
C-x x d
Save current session & clear
C-x x c
Change session (save & load)
C-x x n
Show current session name

Google

C-c g RET
Google search
C-c g g
Google search on cursor
C-c g r
Google C++ reference
C-c g m
Google maps search
C-c t
Google translate at point
C-c T
Google translate

Org-mode: General

[
S-
]
TAB
Fold/u­nfold [all]
M-arrows
Move/c­hange indent­ation level
M-S-arrows
... for entire subtree
C-c c
Quickly capture a note
...
C-c C-c
... save the note
...
C-c C-k
... abort

Org-mode: Lists

+ - 
*
Un-ordered list
1. 1)
Ordered list
term :: def
Definition list
[ ]
Checkbox
C-c C-c
Toggle checkbox
Lists are recognized as sub-tasks for to-dos.

Org-mode: To-dos

C-c C-d
Deadline for to-do item
C-c C-s
Schedule to-do item
C-c C-t
Rotate to-do state
C-c ,
Set to-do priority
C-c a a
Calend­ar-like agenda
C-c a t
Global to-do overview
[/]
or
[%]
in a to-do heading show subtask comple­tion.

Org-mode: Misc.

[[link­][t­ext]]
Define a link
C-c l
Save current buffer as link
C-c C-l
Insert link
C-c C-o
Open link
M-S-left/up
Kill table column/row
M-S-right/down
Insert table column/row
C-c C-e
Export...
C-c C-e t
Insert options template
 

Progra­mming

C-c C-r
Comment in/out a line or region
F3
Next occurence of symbol
S-F3
Previous occurence of symbol
M-F3
Replace symbol
M-^
Jump to defini­tion...
C-c C-c
[Python] Execute buffer
C-c !
[Python] Switch to interp­reter
C-c C-e
[Python] Help on symbol
C-c C-x
[sh] Execute script
C-c C-f
[HTML] Fold/u­nfold block
C-c C-f
[JS] Fold/u­nfold all functions
C-c C-t
[JS] Fold/u­nfold block comments
C-c C-o
[JS] Fold/u­nfold at point

Flycheck

F5
Jump to previous error
F6
Jump to next error
F7
List all errors
S-F7
Toggle Flycheck mode

Magit (Open with F4)

M-S
/
M-H
Show/hide all diffs
s
/
S
Stage / Stage all
u
/
U
Unstage / Unstage all
i
Ignore untracked file
k
Delete file perman­ently
c
Open commit buffer
C-c C-c
Perform commit
l l
/
l L
List of revisions / Verbose list
a
Apply commit ("ch­err­y-p­ick­")
v
Revert commit
X
Revert all uncomm­itted changes
P P
Push current branch
F F
Pull current branch
b
Manipulate branches
q
Quit current Magit buffer
Many commands can be used on parts of a diff, e.g. to stage or revert partial changes.