Useful commands page for someone else Emacs-reminders
describe-bindings
orSPC h b b
is super helpful for knowing what happens when you press stuffdescribe-prefix-bindings
can be used to see bindings in current mode.SPC h
is for help related stuff, same asC-h
C-h k
orSPC h k
ordescribe-key
will give information about keys you press when it prompts you.C-h j
andC-h k
will move to next page and previous page when there's a which-key buffer and there's multiple pages for a particular key pressAll
describe-*
is super helpful. There'sdescribe-variable
,describe-command
,describe-function
and 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
gF
to 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-window
to maximize one window in splits and dowinner-undo
to undo itC-M-SPC
->mark-sexp
will select the next ast node(sort of), repeating it more will move forward.C-M-<left>
will move backwardfill-paragraph
is nice for formatting text (with max width), bound toM-q
. Intuareg-mode
,M-q
is bound totuareg-indent-phrase
which 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-register
followed 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
apropos
is super helpful, like a regex search for emacs commands(SPC-h-a
in doom,C-h-a
also 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-only
allows 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-edit
and to abortwdired-abort-changes
Some cool things here
See orderless for prefixes that trigger different behaviors during minibuffer search in vertico
Use
org-timestamp
to 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 tex
orC-\
C-x 8 RET
to see a bunch of searchable symbols and insert them- If we want this to be in every buffer, need to
customize-variable
default-input-method
Copyright © Dipesh Kafle. All rights reserved. | Powered by Zola & Apollo
Helpful Emacs Shortcuts.