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