]> code.delx.au - dotemacs/blob - README.md
updated readme
[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 buffer
45 C-x c Clean up all buffers that are not visible
46 C-x b Select named buffer
47 C-x C-b Show all buffers
48 C-x C-r Show recent files
49 M-x scratch-buffer Create new scratch buffer
50
51 # Windows/frames
52 C-x o Switch to other window
53 C-x 0 Delete window
54 C-x 1 Switch to single window
55 C-x 2 Split vertically
56 C-x 3 Split horizontally
57 C-x - Shrink window
58 C-x + Make windows the same height
59 C-x ^ Make window taller
60 C-Up / C-Down / C-Left / C-Right Switch windows
61 M-x make-frame New frame (X11 window)
62
63 # Movement
64 M-m Jump back to start of indentation
65 M-r Jump to window top/bottom/middle
66 M-g M-g Jump to line
67 M-g Tab Jump to column
68 M-g j Jump to character
69 C-a Beginning of line
70 C-e End of line
71 C-p Back one line
72 C-n Forward one line
73 C-b Back one character
74 C-n Forward one character
75 M-b Back a word
76 M-f Forward a word
77 M-a Backward sentence
78 M-e Forward sentence
79 M-v Back page
80 C-v Forward page
81 M-{ Back one paragraph
82 M-} Forward one paragraph
83 M-< Top of file
84 M-> End of file
85 C-M-p Back to start of balanced expression
86 C-M-n Forward to end of balanced expression
87 C-M-b Back one s-expression / symbol
88 C-M-f Forward one s-expression / symbol
89 C-M-u Move up one level of parentheses
90
91 # Text formatting
92 M-/ Auto-complete
93 M-; Comment line or region
94 M-i Change inner region
95 M-q Reformat paragraph
96 M-l Lower case word
97 M-u Upper case word
98 M-c Capitalise word
99 C-x C-l Lower case region
100 C-x C-u Upper case region
101 C-o Insert a new line above point
102 M-o Insert a new line below point
103 C-j Newline and maybe indent
104 M-^ Join to previous line
105 M-j New line with comment
106 C-q Quoted insert
107
108 # Marking
109 C-Space Set mark (start selection)
110 C-Space C-Space Set mark to point
111 C-u C-space Return to mark
112 C-x C-x Exchange point and mark
113 C-M-h Highlight expression
114 M-@ Set mark at end of next word
115 C-= Expand region
116 C-c l Insert extra cursor on all lines in region
117 C-c m Ask to insert extra cursor at locations matching selected region
118 M-= Display info about region
119
120 # Killing and deleting
121 C-M-k Kill s-expression / symbol
122 C-w Kill from mark to point
123 C-y Yank text (paste)
124 M-y Scroll through kill ring (paste buffer)
125 M-_ Select current line
126 M-z <char> Kill until <char>
127 C-k Kill to end of line
128 M-0 C-k Kill to beginning of line
129 C-a C-k C-k Kill current line
130 C-S-Backspace Kill current line
131 C-d Delete next character
132 M-d Delete next word
133 M-Backspace Delete previous word
134 M-Space Collpase to one space around point
135 M-\ Delete spaces around point
136 C-x C-o Collapse blank lines
137 M-x delete-trailing-whitespace Delete trailing whitespace
138
139 # Transposing
140 C-t Transpose chars
141 M-t Transpose words
142 C-x C-t Transpose lines
143 C-M-t Transpose s-expressions
144
145 # Rectangle
146 C-x Space Toggle mark rectangle mode
147 C-x r t Replace rectangle with string
148
149 # Macros
150 F3 , F4 Start recording macro, finish recording macro
151 C-u F3 Play last macro then append keys
152 F4 Play back macro
153
154 # Mode switching
155 C-x C-j Open direx at current file
156 F8 Toggle flyspell-mode
157 F9 Toggle whitespace mode
158 F10 Toggle word wrap
159 M-x eshell Run eshell
160 M-x ielm Run Emacs Lisp REPL
161 M-x shell Run bash shell
162 M-x slime Run Common Lisp REPL
163 M-x smerge-ediff Resolve merge conflicts in multi-window mode
164 M-x smerge-mode Resolve merge conflicts by hunks
165 M-x restclient Open HTTP client
166 M-x yas-reload-all Reload all snippets
167
168 # Lisp
169 C-M-x Eval top-level form
170 C-c C-z Switch to REPL
171 C-c C-c Compile and load the top-level form at point
172 C-c M-k Compile (but not load) the current buffer's file
173
174 # Shell
175 M-! Execute command
176 M-& Execute command asynchronously
177 M-| Execute with region
178 C-u M-| Filter with region
179
180 # Smerge mode
181 C-c ^ p Go to previous hunk
182 C-c ^ n Go to next hunk
183 C-c ^ Return Keep current
184 C-c ^ a Keep all
185 C-c ^ m Keep mine
186 C-c ^ o Keep other
187
188 # Flyspell
189 M-$ Correct word
190 C-M-i Automatically correct word
191 C-; Automatically correct last word
192 <mouse-2> Popup word correction
193
194 # Flycheck
195 C-c ! v Verify setup
196 C-c ! n Next error
197 C-c ! p Previous error
198 C-c ! l List errors
199 C-c ! x Disable checker