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)
43 C-c C-o Dump all results into a buffer (ivy-occur)
44 M-. Find thing at point
50 C-x C-s Save current buffer
51 C-x s Save some buffers
52 C-x C-w Write buffer to file
54 C-x C-v Find file and kill current buffer
55 C-x f Find files in git repository
56 C-x g Grep in git repository
57 M-q Replace in git repository (while in git grep)
58 M-x find-file-at-point Find (open) filename at point
59 M-x browse-url-at-point Browse URL at point
61 C-x c Clean up all buffers that are not visible
62 C-x b Select named buffer
63 C-x C-b Show all buffers
64 C-x C-r Show recent files
65 M-x scratch-buffer Create new scratch buffer
66 //,~ Go to {root,home} directory in find-file
71 C-x o Switch to other window
73 C-x 1 Switch to single window
74 C-x 2 Split vertically
75 C-x 3 Split horizontally
76 C-x 9 Resize windows with arrow keys
77 C-x { / C-x } Shrink/enlarge window horizontally
78 C-Up / C-Down / C-Left / C-Right Switch windows
79 C-l Recenter display (center, top then bottom)
80 C-M-l Reposition window to contain useful text (eg entire defun)
81 C-x 5 2 New frame (X11 window)
86 M-m Jump back to start of indentation
87 M-r Jump to window top/bottom/middle
88 M-g Tab Jump to column
89 M-g f Jump to charactor, ;/, to go forward/back
90 M-g g Jump to visible line or any line
91 M-g j Jump to word by first character
92 M-g M-g Jump to visible line or any line
97 C-b Back one character
98 C-n Forward one character
101 M-a Backward sentence
105 M-{ Back one paragraph
106 M-} Forward one paragraph
109 C-M-p Back to start of balanced expression
110 C-M-n Forward to end of balanced expression
111 C-M-b Back one s-expression / symbol
112 C-M-f Forward one s-expression / symbol
113 C-M-u Move up one level of parentheses
118 Tab Indent current line correctly
119 C-x Tab Indent region with left/right
121 M-Tab Auto-complete at point
122 M-; Comment line or region
123 M-i Change inner region
124 M-q Reformat paragraph
128 C-x C-l Lower case region
129 C-x C-u Upper case region
130 C-o Insert a new line above point
131 M-o Insert a new line below point
132 C-j Newline and maybe indent
133 M-^ Join to previous line
134 M-j New line with comment
139 M-x comment-box Wrap region in comment box
144 C-Space Set mark (start selection)
145 C-Space C-Space Set mark to point
147 C-x C-space Pop global mark
148 C-x C-x Exchange point and mark
149 C-M-h Highlight expression
150 M-@ Set mark at end of next word
152 C-c l Insert extra cursor on all lines in region
153 C-c m Ask to insert extra cursor at locations matching selected region
154 M-= Display info about region
156 C-, Go to last edit reverse
161 M-s h u Unhighlight regexp
162 M-s h . Highlight symbol at point
163 M-s h p Highlight phrase
164 M-s h r Highlight regexp
165 M-s h l Highlight lines matching regexp
168 # Killing and deleting
170 C-M-k Kill s-expression / symbol
171 C-w Kill from mark to point
172 C-y Yank text (paste)
173 M-y Scroll through kill ring (paste buffer)
174 M-z <char> Kill until <char>
175 C-k Kill to end of line
176 M-0 C-k Kill to beginning of line
177 C-c k Kill whole line
179 C-d Delete next character
181 M-Backspace Delete previous word
182 M-Space Collpase to one space around point
183 M-\ Delete spaces around point
184 C-x C-o Collapse blank lines
185 M-x delete-trailing-whitespace Delete trailing whitespace
192 C-x C-t Transpose lines
193 C-M-t Transpose s-expressions
198 C-x Space Toggle mark rectangle mode
199 C-x r t Replace rectangle with string
204 F3 , F4 Start recording macro, finish recording macro
205 C-u F3 Play last macro then append keys
207 C-x C-k b Bind macro to key (0-9, A-Z)
208 C-x C-k C-e Edit last macro
209 C-x C-k l Edit recent keys as macro
210 C-x C-k r Apply macro to region lines
215 C-x r s <?> Copy region into register
216 C-x r i <?> Insert text from register
217 C-x r Space <?> Save point position to register
218 C-x r j <?> Jump to point position at register
221 # Mouse secondary selection
223 Meta-Drag Set selection
224 Meta-Right-Click Yank secondary
230 C-x C-j Open direx at current file
231 F8 Toggle flyspell-mode
232 F9 Toggle whitespace mode
234 M-s o Search in buffer and display results in occur-mode
235 M-x multi-occur Search in buffers and display results in occur-mode
236 M-x eshell Run eshell
237 M-x ielm Run Emacs Lisp REPL
238 M-x linum-mode Display line numbers
239 M-x overwrite-mode Switch to overwrite mode
240 M-x shell Run bash shell
241 M-x slime Run Common Lisp REPL
242 M-x smerge-ediff Resolve merge conflicts in multi-window mode
243 M-x smerge-mode Resolve merge conflicts by hunks
244 M-x term Run terminal
245 M-x yas-reload-all Reload all snippets
251 e Switch to edit mode
252 C-c C-c Switch back to occur mode
253 M-g M-p Previous occurence
254 M-g M-n Next occurence
260 C-c g p Previous hunk
264 C-c g f Magit file specific commands
265 C-c g g Magit dispatch popup
268 M-p Previous sibling section
269 M-n Next sibling section
271 Tab Toggle visibility of section
272 C-Tab Cycle visibility of section and its children
273 q Kill window and bury buffer
274 C-c C-c Perform action
275 C-c C-k Cancel action
280 C-M-x Eval top-level form
281 C-c C-z Switch to REPL
282 C-c C-c Compile and load the top-level form at point
283 C-c M-k Compile (but not load) the current buffer's file
289 C-c C-r Rename variable
298 M-& Execute command asynchronously
299 M-| Execute with region
300 C-u M-| Filter with region
305 C-c ^ p Go to previous hunk
306 C-c ^ n Go to next hunk
307 C-c ^ Return Keep current
316 C-M-i Automatically correct word
317 C-; Automatically correct last word
318 <mouse-2> Popup word correction
325 C-c ! p Previous error
327 C-c ! x Disable checker