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