]> code.delx.au - dotemacs/blob - README.md
54574a3ce3b98a5b5447510ac3728a353c610277
[dotemacs] / README.md
1 # References
2 https://www.gnu.org/software/emacs/refcards/pdf/refcard.pdf
3 https://www.gnu.org/software/emacs/manual/html_node/elisp/Key-Binding-Conventions.html
4
5 # General commands
6 C-x C-c Quit Emacs
7 C-u C-x C-c Save and quit
8 C-g Cancel command
9 C-/ Undo
10 C-g C-/ Undo undo
11 C-x z Repeat last command
12 M-x Execute command
13 M-: Evaluate expression as elisp
14 M-x eval-buffer Load current buffer as elisp
15 C-x C-0 Reset font to standard
16 C-x C-+/= Increase font size
17 C-x C-- Decrease font size
18
19 # Help
20 C-h C-h Help
21 C-h k Help about key binding
22 C-h v Describe variable
23 C-h f Describe function
24 C-h m Documentation on active modes
25
26 # Search
27 C-s Search forward (ivy/swiper mode)
28 C-r Resume ivy search
29 M-s . Search for symbol around point
30 C-s Find next item (while searching)
31 Backspace Previous search (while searching)
32 M-% Search and replace
33 M-x linum-mode Display line numbers
34
35 # Files/buffers
36 C-x C-s Save current buffer
37 C-x s Save some buffers
38 C-x C-w Write buffer to file
39 C-x C-f Find file
40 C-x f Find files in git repository
41 C-x g Grep in git repository
42 M-x find-file-at-point Find (open) filename at point
43 M-x browse-url-at-point Browse URL at point
44 C-x k Kill all buffers that are not visible
45 C-x b Select named buffer
46 C-x C-b Show all buffers
47 C-x C-r Show recent files
48 M-x scratch-buffer Create new scratch buffer
49
50 # Windows/frames
51 C-x o Switch to other window
52 C-x 0 Delete window
53 C-x 1 Switch to single window
54 C-x 2 Split vertically
55 C-x 3 Split horizontally
56 C-x - Shrink window
57 C-x + Make windows the same height
58 C-x ^ Make window taller
59 C-Up / C-Down / C-Left / C-Right Switch windows
60 M-x make-frame New frame (X11 window)
61
62 # Movement
63 M-m Jump back to start of indentation
64 M-r Jump to window top/bottom/middle
65 M-g M-g Jump to line
66 M-g Tab Jump to column
67 M-g j Jump to character
68 C-a Beginning of line
69 C-e End of line
70 C-p Back one line
71 C-n Forward one line
72 C-b Back one character
73 C-n Forward one character
74 M-b Back a word
75 M-f Forward a word
76 M-a Backward sentence
77 M-e Forward sentence
78 M-v Back page
79 C-v Forward page
80 M-{ Back one paragraph
81 M-} Forward one paragraph
82 M-< Top of file
83 M-> End of file
84 C-M-p Back to start of balanced expression
85 C-M-n Forward to end of balanced expression
86 C-M-b Back one s-expression / symbol
87 C-M-f Forward one s-expression / symbol
88 C-M-u Move up one level of parentheses
89
90 # Text formatting
91 M-/ Auto-complete
92 M-; Comment line or region
93 M-i Change inner region
94 M-q Reformat paragraph
95 M-l Lower case word
96 M-u Upper case word
97 M-c Capitalise word
98 C-x C-l Lower case region
99 C-x C-u Upper case region
100 C-o Insert a new line above point
101 M-o Insert a new line below point
102 C-j Newline and maybe indent
103 M-^ Join to previous line
104 M-j New line with comment
105 C-q Quoted insert
106
107 # Marking
108 C-Space Set mark (start selection)
109 C-Space C-Space Set mark to point
110 C-u C-space Return to mark
111 C-x C-x Exchange point and mark
112 C-M-h Highlight expression
113 M-@ Set mark at end of next word
114 C-= Expand region
115 C-c l Insert extra cursor on all lines in region
116 C-c m Ask to insert extra cursor at locations matching selected region
117 M-= Display info about region
118
119 # Killing and deleting
120 C-M-k Kill s-expression / symbol
121 C-w Kill from mark to point
122 C-y Yank text (paste)
123 M-y Scroll through kill ring (paste buffer)
124 M-_ Select current line
125 M-z <char> Kill until <char>
126 C-k Kill to end of line
127 M-0 C-k Kill to beginning of line
128 C-a C-k C-k Kill current line
129 C-S-Backspace Kill current line
130 C-d Delete next character
131 M-d Delete next word
132 M-Backspace Delete previous word
133 M-Space Collpase to one space around point
134 M-\ Delete spaces around point
135 C-x C-o Collapse blank lines
136 M-x delete-trailing-whitespace Delete trailing whitespace
137
138 # Transposing
139 C-t Transpose chars
140 M-t Transpose words
141 C-x C-t Transpose lines
142 C-M-t Transpose s-expressions
143
144 # Rectangle
145 C-x Space Toggle mark rectangle mode
146 C-x r t Replace rectangle with string
147
148 # Macros
149 F3 , F4 Start recording macro, finish recording macro
150 C-u F3 Play last macro then append keys
151 F4 Play back macro
152
153 # Mode switching
154 C-x C-j Open dired at current file
155 F8 Toggle flyspell-mode
156 F9 Toggle whitespace mode
157 F10 Toggle word wrap
158 M-x eshell Run eshell
159 M-x ielm Run Emacs Lisp REPL
160 M-x shell Run bash shell
161 M-x slime Run Common Lisp REPL
162 M-x smerge-mode Resolve merge conflicts
163 M-x restclient Open HTTP client
164 M-x yas-reload-all Reload all snippets
165
166 # Lisp
167 C-M-x Eval top-level form
168 C-c C-z Switch to REPL
169 C-c C-c Compile and load the top-level form at point
170 C-c M-k Compile (but not load) the current buffer's file
171
172 # Shell
173 M-! Execute command
174 M-& Execute command asynchronously
175 M-| Execute with region
176 C-u M-| Filter with region
177
178 # Smerge mode
179 C-c ^ p Go to previous hunk
180 C-c ^ n Go to next hunk
181 C-c ^ Return Keep current
182 C-c ^ a Keep all
183 C-c ^ m Keep mine
184 C-c ^ o Keep other
185
186 # Flyspell
187 M-$ Correct word
188 C-M-i Automatically correct word
189 C-; Automatically correct last word
190 <mouse-2> Popup word correction
191
192 # Flycheck
193 C-c ! v Verify setup
194 C-c ! n Next error
195 C-c ! p Previous error
196 C-c ! l List errors
197 C-c ! x Disable checker