Useful commands page for someone else Emacs-reminders
describe-bindingsorSPC h b bis super helpful for knowing what happens when you press stuffdescribe-prefix-bindingscan be used to see bindings in current mode.SPC his for help related stuff, same asC-hC-h korSPC h kordescribe-keywill give information about keys you press when it prompts you.C-h jandC-h kwill move to next page and previous page when there's a which-key buffer and there's multiple pages for a particular key press [TODO: figure out why this doesn't work anymore in my setup for some reason]C-hon any which-key buffer opens a list of searchable possible keybindings/actions I can take in the current key prefix. Example: Say I pressC-c, thenC-hwill open up all the actions/keys starting withC-c.All
describe-*is super helpful. There'sdescribe-variable,describe-command,describe-functionand so on.C-M-h-> mark-defun will select a whole functionIf you want to open a file that's in some text, you can select it and then just press
gFto jump to it(this is evil mode binding). Command:evil-find-file-at-point-with-line.This works with line numbers also so if there's something of form:line, this is super useful. This helps when you have file names and line names in error messages, you can easily jump to that file+line Use
maximize-windowto maximize one window in splits and dowinner-undoto undo itC-M-SPC->mark-sexpwill select the next ast node(sort of), repeating it more will move forward.C-M-<left>will move backwardfill-paragraphis nice for formatting text (with max width), bound toM-q. Intuareg-mode,M-qis bound totuareg-indent-phrasewhich helps in formatting comments in ocamlRegisters are there in emacs too.
C-x r s <reg-name>to copy things to a register andC-x r i <reg-name>orconsult-registerfollowed by<reg-name>to paste it. If you're using evil mode, the usual vim way can be used"<reg-name>y/p. More info can be found in emacswikiVery useful emacs stuff at emacsrocks.com
Flyspell is super helpful
aproposis super helpful, like a regex search for emacs commands(SPC-h-ain doom,C-h-aalso works)C-u <param> M-x <command>will run<command>with<param>. This is useful when say you havemark-sexp, you maybe mark an extra sexp, so you'd doC-u -1 M-x mark-sexp(for evil mode(doomemacs) it'sSPC-u -1 M-x mark-sexp)dired-toggle-read-onlyallows to change(makes dired editable) whatever we want in dired buffer(can be helpful for renaming mostly and probably many other things too). To finish editwdired-finish-editand to abortwdired-abort-changesSome cool things here
See orderless for prefixes that trigger different behaviors during minibuffer search in vertico
Use
org-timestampto insert date to the buffer(quite cool)Want to insert unicode symbols in emacs. Do one of the the following(Reference):
M-x set-input-method RET texorC-\C-x 8 RETto see a bunch of searchable symbols and insert them- If we want this to be in every buffer, need to
customize-variabledefault-input-method
Copyright © Dipesh Kafle. All rights reserved. | Powered by Zola & Apollo
Helpful Emacs Shortcuts.