Mastering emacs

  • M-S-x good, like M-x but with curated results
  • The universal argument is shorthand for the number 4. If

you type C-u a, Emacs will print aaaa on your screen. If you type C-u C-u a, Emacs will display 16 characters (because 4 times 4 equals 16)

By Module

:ui everywhere

:ui rss: +org

grammar

spell

new +enchant!!?

syntax

vertico

fold

format

lispy

parinfer

multiple cursors

electric

ibuffer

undo

mu4e

japanese (become mainatiner?)

lang

beancount +lsp

clojure

dart

data

emacslisp

javascrip

json

lua

org maybe new +s

vterm

debubuger

docker

gist

lookup

lsp

magit

make

pdf

deft

windowselect

workspaces

zen

treesitter

https://github.com/doomemacs/doomemacs/tree/master/modules/tools/tree-sitter

Next day type stuff

emmet

change shortcut enable in some other stuff? https://docs.emmet.io/cheat-sheet/

org roam stuff

Beancount

goto next transaction etc https://github.com/beancount/beancount-mode/blob/main/beancount.el https://beancount.github.io/docs/index.html

Use à for prefix for rarely used stuff? Custom key?

Tips

use snipe more (with ;/, too!)

learn all the vi/va objects !!

evil registers “<key>

Stuff to Check out

https://discourse.doomemacs.org/t/common-config-anti-patterns/119 https://github.com/isamert/lab.el LSP-Grammarly https://tech.tonyballantyne.com/emacs-workout/emacs-workout/ https://emacsconf.org/2020/talks/ https://stackoverflow.com/questions/1218390/what-is-your-most-productive-shortcut-with-vim#1220118

Shortcuts

gt gT

Vim keybindings

a lot of this might be outdated now, switching to colemack etc

window top middle bottomH M I
scroll one line up/downC-y C-e
scrollingzz zt zb
increment/decrementg + -
search repeat/repeat backwards (works with snipe);/,

Evil lion

gL/gl char if not visual mode ip etc ib for major mode alignment rules? 1gl/L

Evil-surround

test_tes2 ys__ (S for newlines) in normal mode S in visual mode cs sur un surround pour le changer ds delete surrounding

Evil-exchange

select region gx select other region gx gxx for lines

Evil-args

] a [a

  • TODO Mettre autre chose?

LSP

spc c l code lenses etc

Git

spc g . magit file dispatch (really useful)

Forge

@ in magit forge-add-repository at first

Org

Things starting by z Shift+Tab: global cycling refiling ê I toggle inline pictures

Org mode features you might not know

  • Contextual capture templates
  • Insert all stored links
  • spc u C-cc to turn into checklist
  • Use agenda* as a custom view to match appointments
  • Hitting = in the agenda buffer will limit to headlines matching a regular expression.

You can remove all filters by hitting |.

  • C-c C-x - will start a timer and create a list item displaying the timer like the example above.

Check more stuff later

Agenda

[]prev next dates
gdgoto date
.today

Table

Enter (insert mode)line below
(Shift)-Tab (insert mode)row before/after
Ctrl+Enterinsert heading
Ctrl+Alt+enterinsert subheading
ê .counsel-org-oto (don’t use counsel imenu)
CRprevious/next todo item (or checklist)move cell left right
TSdecrease/increase prioritymove cell up/down
M-crpromote/demote headingmove column left/right
M-tsmove subtree-up/downmove column up/down
M-CRpromote/demote subtreedelete/insert column
M-TSmove heading up/downdelete/insert row
—-Calendar—-
M-crnext/prev day
M-tsnext/prev week
M-S-crnext/prev month
M-S-tsnext/prev year
TODOTODOTODO
gcorg-element-up (parent of element)doesn’t work because of g c c (find another key?)
gtorg-forward-element (next elem)doesn’t work because of doom gt (ok to change)
gsorg-backward-element (prev elem)OK!
grorg-down-element (first subelem)doesn’t work because of eval region
gCevil-org-top (top-level-heading)
()next/prev cell in table
{}beg/end of table

Evil-org

  • Text objects

    ae/ie select the smallest object or element at point. Can be repeated to select adjacent objects / elements. aE/iE select the smallest element at point. Elements build up the structure of the document, so there is always an element at any point. Can be repeated to select adjacent elements. ar/ir select smallest element that is a container of other elements. Can be repeated to select greater elements

Org-noter

KeyDescriptionWhere?
iInsert noteDocument buffer
IInsert precise noteDocument buffer
qKill sessionDocument buffer
ê ç nSync previous page/chapterDocument and notes buffer
ê ç çSync current page/chapterDocument and notes buffer
ê ç ÇSync next page/chapterDocument and notes buffer
ê ç ÊSync previous notesDocument and notes buffer
ê ç êSync selected notesDocument and notes buffer
ê ç àSync next notesDocument and notes buffer
ê ç ssplit fraction settingsSettings
ê ç tset tipping pointSettings
ê ç hset hide otherSettings

There are two types of sync commands:

  • To sync a page/chapter, means it will find the [previous|current|next] page/chapter and show the corresponding notes for that page/chapter; as such, it will always pop up the notes buffer, if it does not exist. This type of command is in relation to the current page/chapter in the document.
  • To sync the notes, means it will find the [previous|current|next] notes and go to corresponding location on the document. So, you need to have the notes window open, because this type of commands is in relation to the selected notes (ie, where the cursor is).

When using PDF Tools, the command org-noter-create-skeleton imports the PDF outline or annotations (or both!) as notes, and it may be used, for example, as a starting point.

Org Msg

  • C-c C-e – calls org-msg-preview, it generates the final HTML email, save it into a temporary file and call the browse-url function on that file.
  • C-c C-k – calls message-kill-buffer
  • C-c C-s – calls message-goto-subject (same as in Message mode)
  • C-c C-b – calls org-msg-goto-body (similar to message-goto-body in Message mode)
  • C-c C-a – calls org-msg-attach, very similar to the org-attach function. It lets you add or delete attachment for this email. Attachment list is stored in the :attachment: property.
  • C-c C-c – calls org-ctrl-c-ctrl-c. OrgMsg configures org-msg-ctrl-c-ctrl-c as a final hook of Org mode. When org-msg-ctrl-c-ctrl-c is called in a OrgMsg buffer it generates the MIME message and send it.

Rust

Rustdoc-to-org ê b d is pretty cool

Auto Yasnippet

https://github.com/abo-abo/auto-yasnippet#auto-yasnippet-100

TODO set aya-create

C-Tab aya-expand

aya-case-fold (ignore case, but write the case properly)

Spelling

Langtool

langtool-check langtool-correct-buffer langtool-done

flyspell

zg add word to spell list zv remove word to spell list ê à then ctrl+o for actions

PDF-Tools

ctsrup down left right
+-zoom dezoom
pgup pgdownnext previous page
spc b isearch outline (other counsel commands?)
<n> g /gggo to page n
gg Gstart end of doc
AnnotationsC-c C-a __ (also rmb)
Fit height Width PageC / É / P
Linksf/F

Not sure: Syncing with Autex jump to PDF location from source C-c C-g jump source location from PDF C-mouse-1 Miscellaneous Refresh File (e.g., after recompiling source) g Print File C-c C-p

Mail (probably out of date, was from bepo days)

“mu4e-org-store and capture” Useful? Bind?

https://www.djcbsoftware.nl/code/mu/mu4e/Queries.html Marks: m = move ! = read d = trash = = untrash u = unmark U = unmark all a = action (view in browser, capture etc)

in mail: p save attacment l reply etc a view actions (view pdf, xwidgets etc)

Org mode: ctrl-à

Info mode and stuff: o

Spelling

Random

spc w Ttear off window
ctrl + o (ivy find file etc menu)bunch of cool stuff (insert path etc)
spc s ycounsel-yank-pop (killring)
''come back after gg etc
spc c jlsp workspace symbol
C-aUse instead of 0/^
S in codesearch docs

Treemacs

TODO LSP-Treemacs

Kinda osef for now https://github.com/emacs-lsp/lsp-treemacs

  • lsp-treemacs-errors-list

    Displays tree like error list structure. press x when you are in Error List view - offer quickfixes for the error at point.

  • lsp-treemacs-references/lsp-treemacs-implementations

    Display references/implementations using tree view

  • lsp-treemacs-call-hierarchy

    Display call hierarchy. Use C-u M-x lsp-treemacs-call-hierarchy to display outgoing call hierarchy.

  • lsp-treemacs-type-hierarchy

    Display type hierarchy.

Project

spc p t: todos

Multi-cursors

gz..

  • ts
  • u/U undo
  • z: at point

m-d for match word (D backwards)

All the <spc> basic shortcuts

TODO Emmet

Archives

spc b é: buffer preview '' to come back afTestosteroner like gg spc h b k: mode keymap z x kill current buffer

To Check

Capturing notes efficiently with org roam playlist systemcrafter

Fifteen ways to use Embark

https://github.com/oantolin/embark/ https://www.youtube.com/watch?v=qk2Is_sC8Lk

Org-remark Demo #1 - Introducing Org-remark - YouTube

https://www.reddit.com/r/emacs/comments/jtydiy/who_needs_github_to_manage_a_project_when_you/

To Do

redo everything for colemak basics

Consult

https://github.com/minad/consult for more

consult yank from kill ring mapping

spc s y

consult-lsp-diagnostics

spc c x

consult kmacro

consult-register

consult-mark (leader s r)

consult-global-mark

consult-locate

(error?)

consult go to line M-g g

consult outline

consult-ripgrep

consult-find

consult-compile-error

consult-flymake

consult-flycheck

consult-org-agenda(ê /)

consult heading (ê .)

consult-buffer-other-window

Better jumper, change keys?

Also, consult-jump-list

String Inflection write shortcuts here

(map! :leader :prefix (“c~” . “naming convention”) :desc “cycle” “" #'string-inflection-all-cycle :desc "toggle" "t" #'string-inflection-toggle :desc "CamelCase" "c" #'string-inflection-camelcase :desc "downCase" "d" #'string-inflection-lower-camelcase :desc "kebab-case" "k" #'string-inflection-kebab-case :desc "under_score" "_" #'string-inflection-underscore :desc "Upper_Score" "u" #'string-inflection-capital-underscore :desc "UP_CASE" "U" #'string-inflection-upcase) (after! evil (evil-define-operator evil-operator-string-inflection (beg end _type) "Define a new evil operator that cycles symbol casing." :move-point nil (interactive "<R>") (string-inflection-all-cycle) (setq evil-repeat-info '([?g ?~]))) (define-key evil-normal-state-map (kbd "g") ‘evil-operator-string-inflection)))

LEXIC Keybinding change and add them here

Org

https://www.reddit.com/r/emacs/comments/kth9f5/new_package_orgmenu_beta_not_in_melpa_yet_a/ https://github.com/alphapapa/org-sidebar https://github.com/alphapapa/org-ql https://github.com/nobiot/org-transclusion

Org-super-agenda

https://github.com/alphapapa/org-super-agenda/blob/master/examples.org

Org make template at point?

        " Courtesy of github.com/chrisdone "
        (define-key org-mode-map (kbd "C-\"") 'org-begin-template)
        (defun org-begin-template ()
          "Make a template at point."
          (interactive)
          (if (org-at-table-p)
              (call-interactively 'org-table-rotate-recalc-marks)
            (let* ((choices '(("s" . "SRC")
                              ("e" . "EXAMPLE")
                              ("q" . "QUOTE")
                              ("v" . "VERSE")
                              ("c" . "CENTER")
                              ("l" . "LaTeX")
                              ("h" . "HTML")
                              ("a" . "ASCII")))
                  (key
                    (key-description
                    (vector
                      (read-key
                      (concat (propertize "Template type: " 'face 'minibuffer-prompt)
                              (mapconcat (lambda (choice)
                                            (concat (propertize (car choice) 'face 'font-lock-type-face)
                                                    ": "
                                                    (cdr choice)))
                                          choices
                                        ", ")))))))
              (let ((result (assoc key choices)))
                  (when result
                    (let ((choice (cdr result)))
                      (cond
                      ((region-active-p)
                        (let ((start (region-beginning))
                              (end (region-end)))
                          (goto-char end)
                          (insert "\n#+END_" choice)
                          (goto-char start)
                          (insert "#+BEGIN_" choice "\n")))
                      (t
                        (insert "#+BEGIN_" choice "\n")
                        (save-excursion (insert "\n#+END_" choice))))))))))

Dired

dirvish https://github.com/doomemacs/doomemacs/pull/6760 Batch rename files https://www.emacswiki.org/emacs/DiredPlus https://github.com/Fuco1/dired-hacks https://github.com/amno1/dired-auto-readme

hook or function to eval the debug file (dap) also delete default configs

Mastering the vim language (take notes)

https://github.com/munen/emacs.d#convenience-functions-when-working-with-pdf-exports

Vim stuff

/ is a verb (eg l/)

diw etc instead of dw

Configs

very good config: https://github.com/rememberYou/.emacs.d/blob/master/config.org/ (esp org stuff) https://github.com/zaeph/.emacs.d

Org

http://members.optusnet.com.au/~charles57/GTD/gtd_workflow.html http://newartisans.com/2007/08/using-org-mode-as-a-day-planner/ Organize your life in org mode ! (big ass tutorial) https://orgmode.org/manual/Tracking-your-habits.html https://github.com/alphapapa/org-protocol-capture-html Consistent Technical Documents Using Emacs And Org Mode

Org Roam

roam and dailies

Server

The graph utilizes org-roam protocol which means if you click on one of the nodes, it will open the corresponding file in Emacs. For this feature to work, org-roam protocol should be configured in the system. Configuring Org-Roam Protocol

Not Really Emacs

WSL

https://derkoe.dev/blog/development-environment-in-wsl2/ https://blog.eleven-labs.com/fr/le-developpement-sous-linux-depuis-windows-10-avec-wsl-2/ https://elecming.medium.com/the-ultimate-emacs-hacking-tutorial-in-windows-10-wsl-2-cfd3ea3893e3 https://old.reddit.com/r/emacs/comments/er248t/installing_emacs_on_wsl2_with_windows_but_it_works/ https://github.com/hubisan/emacs-wsl#install-emacs https://old.reddit.com/r/bashonubuntuonwindows/comments/k059qu/a_sneakpeek_into_wslg_the_upcoming_native_display/

https://github.com/DanielDe/org-web

Don’t really care?

https://github.com/abo-abo/tiny probably not very useful Smartparens stuff https://github.com/jcs-elpa/company-fuzzy https://tecosaur.github.io/emacs-config/config.html#screencast

Org-ref

https://github.com/jkitchin/org-ref Introduction to org-ref

https://emacsdocs.org/

Capturing

publicimageltd/delve: Delve into your org-roam zettelkasten

Non monospace fonts for novel and stuff

https://tecosaur.github.io/emacs-config/config.html#font-face https://tecosaur.github.io/emacs-config/config.html#mixed-pitch Just redo all the font stuff

Lexic, japanese stardicts, etc

DOCT org capture templates

https://github.com/Manoj321/elfeed-dashboard

https://github.com/daviwil/dotfiles/blob/master/Emacs.org

Elfeed config

Capture/super-agenda

Understand wgrep

https://old.reddit.com/r/orgmode/comments/a7rgr1/organizing_your_dotfiles_with_org_mode/

https://tecosaur.github.io/emacs-config/config.html#smerge

https://gagbo.net/post/plaintext-accounting-in-a-nutshell/

Universal argument with cargo test etc to edit settings

https://github.com/charignon/github-review

weirdNox/org-noter: Emacs document annotator, using Org-mode

Ravenslofty/prussia: Prussia - a Rust PS2 SDK.

https://github.com/minad/org-modern

https://github.com/minad/jinx

https://github.com/minad/bookmark-view