Workbench
Note to Self: Emacs Edition
Keybindings and such that I really ought to remember by now
| Mode | Task | Command | Note |
|---|---|---|---|
| General | |||
| Make text larger | C-x C-= |
||
| Make text smaller | C-x C-- |
||
| Comment out the current line or region | comment-dwim (M-;) |
||
| Get help for a function | C-h f <function name> RET |
||
| See the current value of a variable | C-h v <variable name> RET |
||
| Show all active keybindings for current buffer | C-h b |
||
| Close =dired= buffers behind you as you navigate | (setq dired-kill-when-opening-new-dired-buffer t) |
||
| Run a shell command and put its output into the current buffer | C-u M-! |
||
| Pass the current region to a shell command and replace it with the output | M-| |
||
| Working with Buffers | |||
| Save all buffers | C-x s ! |
||
| Moving Around | |||
| Go to start or end of buffer | M-< (start), M-> (end) |
||
| Org mode | |||
| Open an agenda view restricted to the current buffer, subtree or region | C-a < (Then select an agenda) |
||
| Detangle source code | org-babel-detangle (Important: must be run from the tangled source code buffer, not the original org file) |
||
| Dired | |||
| Delete marked files | dired-do-delete (D) |
||
| Markdown | |||
| Insert a table | markdown-insert-table (C-c C-s t) |
||
| Insert a table column | markdown-table-insert-column (C-c S-<right>) |
Row is inserted to the left of point | |
| Insert a table row | markdown-table-insert-row (C-c S-<down>) |
Row is inserted above point | |
| TRAMP | |||
Edit a file with sudo |
C-x C-f /sudo::/etc/my/protected-file.conf |
||
| Open a file over SSH | C-x C-f /ssh:user@example.com:/path/to/remote/file.txt |
||
| Dates | |||
| Formatting dates+times | format-time-string (formatting reference) |
||
| Customization | |||
| Set a variable in =.dir-locals.el= | M-x add-dir-local-variable |
| Misc. | | | |
| | Tail a file | auto-revert-tail-mode | |
Thu Nov 02 2023 08:11:06 GMT-0400 (Eastern Daylight Time)