143 lines
4.0 KiB
Org Mode
143 lines
4.0 KiB
Org Mode
#+title: Emacs TODOs
|
|
#+STARTUP: content
|
|
* Cheatsheet
|
|
** Zoom in/out
|
|
C-x C-[0/-/=]
|
|
has repeat map
|
|
** use-package key bindings
|
|
Can remap functions as well as keys
|
|
#+begin_src emacs-lisp
|
|
(use-package unfill
|
|
:bind ([remap fill-paragraph] . unfill-toggle))
|
|
#+end_src
|
|
** Supports repeat-map
|
|
#+begin_src emacs-lisp
|
|
(use-package git-gutter+
|
|
:bind
|
|
(:repeat-map git-gutter+-repeat-map
|
|
("n" . git-gutter+-next-hunk)
|
|
("p" . git-gutter+-previous-hunk)
|
|
("s" . git-gutter+-stage-hunks)
|
|
("r" . git-gutter+-revert-hunk)))
|
|
#+end_src
|
|
** shortdoc-display-group
|
|
shows useful documentation summary on various categories of things
|
|
* mine for ideas
|
|
https://github.com/daviwil/emacs-from-scratch/blob/9388cf6ecd9b44c430867a5c3dad5f050fdc0ee1/Emacs.org
|
|
|
|
* keybindings
|
|
** emacs
|
|
better bindings for page up / page down / home / end
|
|
center cursor after page up / page down
|
|
https://karthinks.com/software/more-less-emacs/#bonus-half-screen-scrolling
|
|
** org-evil bindings
|
|
M-hjlk for moving headings
|
|
** meow
|
|
*** equivalents of evil <, > for indentation
|
|
*** equivalent of gd/gu (use embark?)
|
|
gd = (+lookup/definition)
|
|
gu = (+lookup/references)
|
|
*** equivalent of r (replace character under point, don't enter insert mode)
|
|
*** equivalent of . for repeating edits
|
|
|
|
learn kmacros
|
|
** dired
|
|
*** hjkl navigation
|
|
*** : for M-x
|
|
* read docs/configure
|
|
** magit
|
|
*** start in insert state in commit message
|
|
** whitespace cleanup
|
|
https://batsov.com/articles/2011/11/25/emacs-tip-number-3-whitespace-cleanup/
|
|
** straight
|
|
*** lockfile
|
|
** corfu
|
|
https://takeonrules.com/2022/01/17/switching-from-company-to-corfu-for-emacs-completion/
|
|
** embark
|
|
https://karthinks.com/software/fifteen-ways-to-use-embark/
|
|
** vertico
|
|
** marginalia
|
|
** orderless
|
|
** consult
|
|
** org
|
|
*** C-RET should enter meow insert state
|
|
*** better embark bindings for moving subtrees
|
|
*** embark binding for tagging header
|
|
*** keybind for narrow
|
|
*** switch to use-package repeat-map for C-c C-n/p
|
|
|
|
*** transclude
|
|
https://github.com/nobiot/org-transclusion
|
|
*** beautify
|
|
https://mstempl.netlify.app/post/beautify-org-mode/
|
|
https://github.com/Gavinok/emacs.d/blob/main/lisp/org-config.el
|
|
**** hide markup characters
|
|
* modeline
|
|
** diminish/delight
|
|
* port doom config.el
|
|
** set font to Fira Code
|
|
** reveal in finder
|
|
#+begin_src emacs-lisp
|
|
(defun first-executable (candidates)
|
|
(seq-find #'executable-find candidates))
|
|
|
|
;; Reveal in finder/nautilus/whatever
|
|
(defun reveal-in-file-browser ()
|
|
(interactive)
|
|
(call-process
|
|
(first-executable '("xdg-open" "open"))
|
|
nil nil nil "."))
|
|
|
|
(map! :leader
|
|
:desc "Reveal"
|
|
"o o" #'reveal-in-file-browser)
|
|
#+end_src
|
|
|
|
* line wrapping
|
|
https://elpa.gnu.org/packages/adaptive-wrap.html
|
|
* Fix magit invisible changes in terminal
|
|
* Deconflict Emacs and Kitty hotkeys
|
|
* if nix in path, prefer nix versions of emacs packages
|
|
don't use :straight t in use-package declarations
|
|
instead, have section that conditionally runs straight-use-package directives if necessary
|
|
* install
|
|
** yasnippet
|
|
** undo-tree
|
|
** parinfer
|
|
** eglot / lsp-mode
|
|
* languages
|
|
** python
|
|
** nix
|
|
** typescript
|
|
** web-mode
|
|
* meow
|
|
** questions
|
|
*** Why does xy copy the newline but x;y doesn't?
|
|
*** Beacon mode
|
|
How does beacon mode decide whether a movement creates all possible cursors or just one?
|
|
How to express "insert before the second word of the line"?
|
|
Why doesn't visit work consistently in beacon mode?
|
|
*** defining C-<something> keys in normal mode seems to fuck everything up for some reason
|
|
** sexp state
|
|
** notes
|
|
*** r replaces selection with yank buffer
|
|
* Notes from Mastering Emacs
|
|
** C-x # in emacsclient says "done with current buffer"
|
|
** C-x 8 RET (insert-char) for to insert weird characters
|
|
** C-h m (describe-mode)
|
|
** I in embark goes to manual
|
|
** (global-set-key [remap <A>] '<B>)
|
|
remaps all keybindings that refer to <A> to <B>
|
|
** repeat-mode
|
|
describe-repeat-maps to see which keys repeat
|
|
** tab-bar-mode
|
|
replacement for perspective.el
|
|
offers window configurations as tabs, similar to iTerm/Kitty
|
|
also look into tab history mode
|
|
** bookmarks
|
|
C-x r (m)ark, (l)ist, jump to (b)ookmark
|
|
** registers
|
|
C-x r (s)tore region, (i)nsert contents
|
|
C-x r (SPC) store point, (j)ump to register
|
|
|