In my Emacs video tutorial I’ll cover installation on Windows and MacOS. Then we’ll cover what you’d learn in a standard 300 page book. We’ll cover how to move around, editing, repeating commands, regions, searching, buffers, frames, shells, macros and then I’ll cover how to setup a programming environment using Clojure as an example.
A cheat sheet follows the video below. Give it a try and you’ll learn Emacs in no time.
If you like videos like this consider donating $1, or simply turn off AdBlocker. Either helps me devote more time to making videos.
[googleplusone]
Emacs Cheat Sheet
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 |
COMMANDS 1. C- = Ctrl Key 2. M- = Meta Key / Alt Key (ESC Don't hold and then the Letter) 3. Start Emacs without Opening Screen : emacs -Q 4. Open Help : C-h i (HELP INFO) A. Show All Key Bindings : C-h b (BINDINGS) B. Get Info on Key Binding : C-h k "binding" i. C-h k C-x b -> Find Out About Switching Buffers 5. See All Functions for an Action : C-h a (ALL) A. All Buffer Functions : C-h a buffer B. Execute Command with : ESC x "functionName" 6. Turn on Auto New Line (Hard Wrap) : ESC x auto-fill-mode 7. Turn on Visual Line Mode (Soft Wrap) ESC x visual-line-mode 8. Increase Text Size : C-x C-+ 9. Decrease Text Size : C-x C-- 10. Change the Font : ESC x menu-set-font 11. Change Themes : ESC x customize-themes 12. Open Tetris : ESC x tetris BUFFERS 1. Show Buffers : C-x C-b (COMMAND BUFFERS) 2. C-x k : Kills the Buffer (KILL) 3. Switch Buffers : C-x b (BUFFER) A. Type just the 1st letter of the buffer and click <Tab> <Enter> B. ? : Shows all possible options C. M-x beginning-of-command? : Shows all matching commands 4. Select Whole Buffer : C-x h EDITING 1. Quit Emacs : C-x -> C-c (Press y to save and n to not) 2. C-x and M-x : Issues commands (EXECUTE) 3. C-g : Cancels the command or Running Program (GO BACK) 4. Open or Create a File : C-x C-f -> "enter file name" (EXECUTE FILE) 5. Save File : C-x C-s (SAVE) 6. Write Buffer to File : C-x C-w (WRITE FILE) 7. Insert Buffer in File : C-x i "buffer name" (INSERT BUFFER) 8. Undo : C-x u (UNDO) 9. Delete Selection : C-w 10. Delete # Back : ESC #CharToDel BS 11. Kill / Cut Word Forward : ESC d 12. Kill Word Backward : ESC BS 13. Kill to End of Sentence : ESC k 14. Kill up through Character : ESC z "char" 15. Kill the Next 2 Words : ESC 2 ESC d 16. Yank or Paste Last Killed Text : C-y (YANK) 17. Copy Selection : ESC w (take WITH) 18. Show Text in Kill Ring : C-h v kill-ring 19. Paste Next Kill Ring Item after C-y : ESC Y MOVING AROUND 1. Move Down 1 Screen : C-v (VERTICAL) 2. Move Up 1 Screen : M-v 3. Previous Line : C-p (PREVIOUS) 4. Next Line : C-n (NEXT) 5. Forward Word : M-f (FORWARD) 6. Backward Word : M-b (BACKWARD) 7. Forward Sentence : M-e (sENTENCE) 8. Backward Sentence : M-a (AWAY) 9. Forward Paragraph : M-} (BIG FORWARD) 10. Backward Paragraph : M-{ (BIG BACKWARD) 11. Beginning of Buffer : M-< (BIGGEST BACK) 12. End of Buffer : M-> (BIGGEST FORWARD) 13. Display Line Numbers : M-x linum-mode 14. Go to Line Number : M-g g "Line#" REGIONS 1. Define a Region A. Define the Mark : C-SPC B. Move Cursor to a Position which is the Point C. Delete the Region : C-w 2. Select Whole Paragraph : M-h (wHOLE) 3. Select Whole Buffer : C-x h (wHOLE BUFFER) 4. Select # of Words : ESC #ofWords M-@ 5. Erase Selection : C-w 6. Run Shell using Selection as Input : M-| 7. Format Selection A. Select Paragraph : M-h B. Format Selection : M-x fill-region THE MODE LINE 1. C-x C-q : Turn on/off Read Only Mode 2. **- : Modified and not saved 3. --- : Not Modified 4. %% : Read Only Mode not Modified 5. %* : Read Only Mode has been Modified 6. Buffer name or *scratch* if no name 7. Location in the buffer (% or All) 8. Line Number 9. Current Mode A. Fundamental Mode : Default mode B. Text Mode : Use when using paragraphs C. Paragraph Indent Text Mode : When paragraphs should be indented D. Indented Text Mode : Used for outlines E. Switch : ESC x fundamental-mode 10. Show all Modes : ESC x *-mode <Tab> 11. Describe Modes : C-h a mode WINDOWS 1. Working with Windows : A. Close Current Window : C-x 0 (ZERO IN ON 1 WINDOW) B. Close All but Current Window : C-x 1 (1 WINDOW) C. Move to Other Window : C-x o (OTHER WINDOW) D. Split Window Vertically : C-x 2 (2 WINDOWS) E. Split Window Horizontally : C-x 3 F. Make Window Wider : C-x } G. Make Window Narrow : C-x { H. C-x 3 -> C-x b -> a <tab> <enter> 2. Tutorial : Ctrl-h -> t (TUTORIAL) 3. Delete to End of Line : C-k 4. Delete Previous Sentence : C-x BS 5. Emacs auto saves your work in a file with #s at the beginning and end A. To use the backup file type M-x recover-file REPEATING COMMANDS 1. ESC #ofTimes "Command" A. Move Up 2 Lines : ESC 2 C-p SEARCHING AND REPLACING 1. Search Forward : C-s "searchWord" (SEARCH) A. Keep pressing C-s for next B. RET to End Search 2. Search Backward : C-r "searchWord" (REVERSE SEARCH) A. Keep pressing C-r for next B. RET to End Search 3. Search for Regex : M-C-s Type Expression (SUPER SEARCH) [MP]att* 4. Find and Replace : ESC % "findWord" "replaceWord" A. Responses i. y : Replace 1 ii. n : Don't Replace iii. ! : Replace All iv. . : Replace and quit EXECUTING SHELL COMMANDS 1. Open Shell in a Buffer : ESC x shell 2. Run Shell Command : ESC ! "command" 3. Use Region as Input for Shell Command : Select ESC | "command" A. Select b d a c ESC | sort -> Sorts letters 4. Replace Selected Text with Shell Output : Select ESC 1 ESC | sort EDITING .EMACS 1. Don't Show Startup Message : (setq inhibit-startup-message t) 2. Set Starting Mode to Text Mode : (setq major-mode 'text-mode) 3. Set Default Mode to Text Mode : (setq-default major-mode 'text-mode) 4. Set Default Theme : (load-theme 'misterioso) EXTRAS 1. Count the Words and Characters : M-= 2. Convert to Uppercase : C-x C-u 3. Convert to Lowercase : C-x C-l Creating Macros 1. Macros record actions and then replay them 2. How to Record A. C-x ( B. Perform actions you want recorded C. C-x ) Closes the Macro D. C-x e Plays the Macro 3. Remove list number from item A. C-x ( B. ESC z [SPC] C. C-x ) D. C-x e 4. Show your Macro : C-x C-k SPC A. C-g Closes this 5. Play Macro with e A. C-x ( B. ESC z [SPC] -> Go to next line C. C-x e D. Repeat e 6. Save Macro : C-x C-k n -> Give it a name "delete-line-number" 7. Use Macro M-x delete-line-number A. C-x z to run command again -> z to execute again 8. Save your Macro A. Open .emacs -> C-x C-f ~/.emacs B. M-x insert-kbd-macro C. Enter delete-line-number Food Descriptions Used in the Video KFC Famous Bowl Creamy mashed potatoes, sweet corn and bite-sized chunks of crispy chicken are layered together then drizzled with home-style gravy and topped with a perfect blend of three shredded cheeses. KFC Double Down The breadless burger features crispy bacon, melted Monterey Jack cheese and barbecue sauce sandwiched between two tasty chicken breast fillets. Taco Bell Chocoladillas Melted chunks of the popular chocolate Kit-Kat bar encased in a grilled flour quesadilla Taco Bell Firecracker Burrito Burrito with rice, beef, cheese and red tortilla strips wrapped in a red tortilla. It also comes with the option of adding cayenne "popping crystals" for an extra 20 cents. The sensation is similar to the popular Pop Rocks candy, causing a fizzy feeling in your mouth. Taco Bell Naked Chicken Chalupa The first taco shell to be made entirely of fried chicken is finally available nationwide. Taco Bell Cheetos Burrito Burrito with rice, beef, cheese and Cheetos stuffed in a tortilla. Taco Bell Chicken Biscuit Taco Taco-shaped biscuit filled with sausage, egg and cheese; bacon, egg and cheese; crispy tortilla chip-breaded chicken with country gravy; or crispy chicken with jalapeño honey. |
Leave a Reply