You are on page 1of 1

Emacs Cheatsheet

Basic
Buffers
Glossary Previous/next buffer C-, / C-.
Control (Ctrl) key C
Jump to buffer C-x b / M-m Version control
Alt (Meta) key M
List buffers C-x C-l
Shift key S
Kill buffer C-x k
Command (Super) key CMD Magit status
Function (Fn) key fn Editing Magit status C-x g
Home/end fn-left / fn-right Kill current symbol C-d Move up/down p / n
Kill line C-k Change current section visibility 1 / 2 / 4
Basic Cut to clipboard C-w / CMD-x Change all sections visibility M-1 / M-2 / M-4
Execute command by name M-x Copy to clipboard M-w / CMD-c Collapse or expand section TAB
Cancel command C-g Paste from clipboard C-y / CMD-v Stage file or chunk s
Exit Emacs C-x C-c Cycle through clipboard M-y Unstage file or chunk u
Help: describe a key combination C-h k Undo C-z / CMD-z Discard uncommited file or chunk k
Help: describe a function C-h f Redo M-z / CMD-y Commit staged c c
Indent line TAB Commit mode: confirm commit C-c C-c
Navigation Complete filename in buffer M-/ Commit mode: cancel commit C-c C-a
Previous/next character C-b / C-f Comment or uncomment region M-; Pull into current branch F F
Previous/next line C-p / C-n Push current branch P P
Previous/next word M-left / M-right Windows Merge into current branch m m
Previous/next current symbol M-a / M-e Leave one window C-x 1 Show process buffer $
Previous/next s-expression C-M-b / C-M-f Split window horizontally C-x 2 Quit q
Previous/next defun C-M-a / C-M-e Split window vertically C-x 3
Previous/next page C-v / M-v Jump cursor to other window C-x o
Beginning/end of line C-a / C-e Magit branches
Beginning/end of file M-S-, / M-S-. Miscellaneous Checkout branch b b
Ediff M-x ediff Create branch b B
Ediff two opened buffers C-c d List branches y
Mark
Multiple cursors: mark all like this C-x m Branch list: checkout branch Enter
Select region while navigating Hold Shift
Select next s-expression M-S-Space
Lisp Magit log
Files
Find (open) file C-x C-f
SLIME Show log of current branch l l
Connect M-x slime-connect Show log of all local branches l L
Save file C-x C-s Show commit at point Enter
Switch to next connection M-x slime-selector n
Don’t suggest names in minibuffer C-f
Jump to REPL buffer C-c C-z
Find recent file M-m
Jump to function definition M-.
Find file in project M-i Magit stash
Jump back from definition M-,
Evaluate last s-expression C-x C-e Stash working tree changes z z
Search Compile current defun C-c C-c Apply stash at point A
Search forward, next match C-s Compile current pattern C-c C-k Inspect stash at point Enter
Search backward, prev match C-r REPL: previous/next history item M-p / M-n Delete stash at point k
Occur (show all matches) M-o
Grep M-x rgrep Paredit
Interactive grep in project (Helm) M-h Wrap s-expression M-( Revisions and blame
Helm-grep: preview match at point C-z Splice s-expression M-s Annotate current file M-x vc-annotate
Splice s-expression killing backward M-up Annotate: hide metadata v
Replace Raise s-expression M-r Annotate: previous/next revision p / n
Interactive replace M-% Kill s-expression C-M-k Annotate: quit q
Replace current occurrence y Kill balanced to the end of line C-k Time machine for current file C-F8
Skip current occurrence n Split s-expression M-S-s Time-machine: prev/next revision p / n
Replace all occurrences ! Barf/slurp forward C-left / C-right Time-machine: quit q

You might also like