2 * [Reference Card](https://www.gnu.org/software/emacs/refcards/pdf/refcard.pdf)
3 * [Key Binding Conventions](https://www.gnu.org/software/emacs/manual/html_node/elisp/Key-Binding-Conventions.html)
8 C-u C-x C-c Save and quit
12 C-x z Repeat last command
14 M-: Evaluate expression as elisp
15 M-x eval-buffer Load current buffer as elisp
16 C-x C-0 Reset font to standard
17 C-x C-+/= Increase font size
18 C-x C-- Decrease font size
24 C-h k Help about key binding
25 C-h v Describe variable
26 C-h f Describe function
27 C-h m Documentation on active modes
28 <prefix> C-h Show bindings starting with <prefix>
29 C-c C-b Back to previous help topic (while in help-mode)
30 q Quit window and bury buffer
35 C-s Search forward (ivy/swiper mode)
37 C-7 Start a cursor for each result (while searching)
38 C-' Switch to avy jump mode
39 M-i Insert selected item (while searching)
40 M-q Replace searched item (while searching)
41 M-p Search for previous item (while searching)
42 M-n Search for symbol at point (while searching)
44 C-c C-o Dump all results into a buffer (ivy-occur)
45 C-c C-p Switch to wgrep mode
46 M-. Find thing at point
52 C-x C-s Save current buffer
53 C-x s Save some buffers
54 C-x C-w Write buffer to file
56 C-x C-v Find file and kill current buffer
57 C-x f Find files in git repository
58 C-x g Grep in git repository
59 M-q Replace in git repository (while in git grep)
60 M-x find-file-at-point Find (open) filename at point
61 M-x browse-url-at-point Browse URL at point
63 C-x c Clean up all buffers that are not visible
64 C-x b Select named buffer
65 C-x C-b Show all buffers
66 C-x C-r Show recent files
67 M-x scratch-buffer Create new scratch buffer
68 //,~ Go to {root,home} directory in find-file
73 C-x o Switch to other window
75 C-x 1 Switch to single window
76 C-x 2 Split vertically
77 C-x 3 Split horizontally
78 C-x 9 Resize windows with arrow keys
79 C-x { / C-x } Shrink/enlarge window horizontally
80 C-Up / C-Down / C-Left / C-Right Switch windows
81 C-l Recenter display (center, top then bottom)
82 C-M-l Reposition window to contain useful text (eg entire defun)
83 C-x 5 2 New frame (X11 window)
88 M-m Jump back to start of indentation
89 M-r Jump to window top/bottom/middle
90 M-g Tab Jump to column
91 M-g f Jump to charactor, ;/, to go forward/back
92 M-g g Jump to visible line or any line
93 M-g j Jump to word by first character
94 M-g M-g Jump to visible line or any line
99 C-b Back one character
100 C-n Forward one character
103 M-a Backward sentence
107 M-{ Back one paragraph
108 M-} Forward one paragraph
111 C-M-p Back to start of balanced expression
112 C-M-n Forward to end of balanced expression
113 C-M-b Back one s-expression / symbol
114 C-M-f Forward one s-expression / symbol
115 C-M-u Move up one level of parentheses
120 Tab Indent current line correctly
121 C-x Tab Indent region with left/right
123 M-Tab Auto-complete at point
124 M-; Comment line or region
125 M-i Change inner region
126 M-q Reformat paragraph
130 C-x C-l Lower case region
131 C-x C-u Upper case region
132 C-o Insert a new line above point
133 M-o Insert a new line below point
134 C-j Newline and maybe indent
135 M-^ Join to previous line
136 M-j New line with comment
141 M-x comment-box Wrap region in comment box
146 C-Space Set mark (start selection)
147 C-Space C-Space Set mark to point
149 C-x C-space Pop global mark
150 C-x C-x Exchange point and mark
151 C-M-h Highlight expression
152 M-@ Set mark at end of next word
154 M-= Display info about region
156 C-, Go to last edit reverse
161 C-c m a Insert cursor at all matching points
162 C-c m l Insert extra cursor on all lines in region
163 C-c m m Ask to insert extra cursor at locations matching selected region
164 C-c m p Add cursor at previous text like region
165 C-c m n Add cursor at next text like region
170 M-s h u Unhighlight regexp
171 M-s h . Highlight symbol at point
172 M-s h p Highlight phrase
173 M-s h r Highlight regexp
174 M-s h l Highlight lines matching regexp
177 # Killing and deleting
179 C-M-k Kill s-expression / symbol
180 C-w Kill from mark to point
181 C-y Yank text (paste)
182 M-y Scroll through kill ring (paste buffer)
183 M-z <char> Kill until <char>
184 C-k Kill to end of line
185 M-0 C-k Kill to beginning of line
186 C-c k Kill whole line
188 C-d Delete next character
190 M-Backspace Delete previous word
191 M-Space Collpase to one space around point
192 M-\ Delete spaces around point
193 C-x C-o Collapse blank lines
194 M-x delete-trailing-whitespace Delete trailing whitespace
201 C-x C-t Transpose lines
202 C-M-t Transpose s-expressions
207 C-x Space Toggle mark rectangle mode
208 C-x r t Replace rectangle with string
213 F3 , F4 Start recording macro, finish recording macro
214 C-u F3 Play last macro then append keys
216 C-x C-k b Bind macro to key (0-9, A-Z)
217 C-x C-k C-e Edit last macro
218 C-x C-k l Edit recent keys as macro
219 C-x C-k r Apply macro to region lines
224 C-x r s <?> Copy region into register
225 C-x r i <?> Insert text from register
226 C-x r Space <?> Save point position to register
227 C-x r j <?> Jump to point position at register
230 # Mouse secondary selection
232 Meta-Drag Set selection
233 Meta-Right-Click Yank secondary
239 C-x C-j Open direx at current file
240 F8 Toggle flyspell-mode
241 F9 Toggle whitespace mode
243 M-s o Search in buffer and display results in occur-mode
244 M-x multi-occur Search in buffers and display results in occur-mode
245 M-x eshell Run eshell
246 M-x ielm Run Emacs Lisp REPL
247 M-x linum-mode Display line numbers
248 M-x overwrite-mode Switch to overwrite mode
249 M-x shell Run bash shell
250 M-x slime Run Common Lisp REPL
251 M-x smerge-ediff Resolve merge conflicts in multi-window mode
252 M-x smerge-mode Resolve merge conflicts by hunks
253 M-x term Run terminal
254 M-x yas-reload-all Reload all snippets
260 e Switch to edit mode
261 C-c C-c Switch back to occur mode
262 M-g M-p Previous occurence
263 M-g M-n Next occurence
269 C-c g p Previous hunk
273 C-c g f Magit file specific commands
274 C-c g g Magit dispatch popup
277 M-p Previous sibling section
278 M-n Next sibling section
280 Tab Toggle visibility of section
281 C-Tab Cycle visibility of section and its children
282 q Kill window and bury buffer
283 C-c C-c Perform action
284 C-c C-k Cancel action
289 C-M-x Eval top-level form
290 C-c C-z Switch to REPL
291 C-c C-c Compile and load the top-level form at point
292 C-c M-k Compile (but not load) the current buffer's file
298 C-c C-r Rename variable
307 M-& Execute command asynchronously
308 M-| Execute with region
309 C-u M-| Filter with region
314 C-c ^ p Go to previous hunk
315 C-c ^ n Go to next hunk
316 C-c ^ Return Keep current
325 C-M-i Automatically correct word
326 C-; Automatically correct last word
327 <mouse-2> Popup word correction
334 C-c ! p Previous error
336 C-c ! x Disable checker