mirror of
https://git.sr.ht/~magic_rb/dotfiles
synced 2024-12-11 17:31:58 +01:00
130 lines
4.8 KiB
Org Mode
130 lines
4.8 KiB
Org Mode
|
* Digraph
|
|||
|
#+NAME: digraph
|
|||
|
#+BEGIN_SRC emacs-lisp
|
|||
|
(with-eval-after-load "hydra"
|
|||
|
(defmacro create-digraph (val keyseq)
|
|||
|
`(,keyseq (lambda () (interactive) (insert ,val)) ,val))
|
|||
|
|
|||
|
(eval `(defhydra magic_rb/hydra-digraph-sub (:color blue)
|
|||
|
,(macroexpand '(create-digraph "◊" "<>"))
|
|||
|
,(macroexpand '(create-digraph "␣" "sp"))
|
|||
|
,(macroexpand '(create-digraph "ď" "'d"))
|
|||
|
,(macroexpand '(create-digraph "ť" "'t"))
|
|||
|
,(macroexpand '(create-digraph "ň" "'n"))
|
|||
|
,(macroexpand '(create-digraph "ľ" "'l"))
|
|||
|
,(macroexpand '(create-digraph "č" "'c"))
|
|||
|
,(macroexpand '(create-digraph "š" "'s"))
|
|||
|
,(macroexpand '(create-digraph "ž" "'z"))
|
|||
|
|
|||
|
,(macroexpand '(create-digraph "Ö" ":O"))
|
|||
|
,(macroexpand '(create-digraph "ö" ":o"))
|
|||
|
,(macroexpand '(create-digraph "Ü" ":U"))
|
|||
|
,(macroexpand '(create-digraph "ü" ":u"))
|
|||
|
,(macroexpand '(create-digraph "Ä" ":A"))
|
|||
|
,(macroexpand '(create-digraph "ä" ":a"))
|
|||
|
|
|||
|
,(macroexpand '(create-digraph "á" "'a"))
|
|||
|
,(macroexpand '(create-digraph "é" "'e"))
|
|||
|
,(macroexpand '(create-digraph "í" "'i"))
|
|||
|
,(macroexpand '(create-digraph "ó" "'o"))
|
|||
|
,(macroexpand '(create-digraph "ú" "'u"))
|
|||
|
,(macroexpand '(create-digraph "ý" "'y"))
|
|||
|
|
|||
|
,(macroexpand '(create-digraph "Á" "'A"))
|
|||
|
,(macroexpand '(create-digraph "É" "'E"))
|
|||
|
,(macroexpand '(create-digraph "Í" "'I"))
|
|||
|
,(macroexpand '(create-digraph "Ó" "'O"))
|
|||
|
,(macroexpand '(create-digraph "Ú" "'U"))
|
|||
|
,(macroexpand '(create-digraph "Ý" "'Y"))
|
|||
|
("RET" hydra-pop "exit" :color blue)
|
|||
|
("SPC" hydra-pop "exit" :color blue)
|
|||
|
("q" (progn (setq hydra-stack nil)) "Cancel" :color blue))))
|
|||
|
#+END_SRC
|
|||
|
|
|||
|
#+NAME: digraph-defs
|
|||
|
#+BEGIN_SRC emacs-lisp :tangle no
|
|||
|
(with-eval-after-load "hydra"
|
|||
|
(register-digraphs "◊" '("<>" "()"))
|
|||
|
(register-digraphs "␣" '("sp" " "))
|
|||
|
(register-digraphs "—" '("--" "em" "-m" "-3")) ; mdash
|
|||
|
(register-digraphs "–" '("en" "-n" "-2")) ; ndash
|
|||
|
(register-digraphs "°" '("dg" "^o")) ; deg
|
|||
|
(register-digraphs "±" '("+-")) ; pm
|
|||
|
(register-digraphs "∓" '("-+")) ; mp
|
|||
|
|
|||
|
(register-digraphs "ß" '("ss" "sz"))
|
|||
|
|
|||
|
(register-digraphs "¢" '("c|"))
|
|||
|
(register-digraphs "£" '("$$" "lb"))
|
|||
|
(register-digraphs "¥" '("Y="))
|
|||
|
(register-digraphs "¤" '("ox"))
|
|||
|
(register-digraphs "€" '("E="))
|
|||
|
|
|||
|
(register-digraphs "©" '("cO")) ; copy
|
|||
|
(register-digraphs "®" '("rO")) ; reg
|
|||
|
(register-digraphs "™" '("TM")) ; trade
|
|||
|
(register-digraphs "℠" '("SM"))
|
|||
|
(register-digraphs "℅" '("co")) ; (c/o)
|
|||
|
(register-digraphs "№" '("N0"))
|
|||
|
(register-digraphs "℗" '("PO"))
|
|||
|
(register-digraphs "℞" '("Rx"))
|
|||
|
|
|||
|
; greek letters
|
|||
|
(register-digraphs "Α" '("gA"))
|
|||
|
(register-digraphs "Β" '("gB"))
|
|||
|
(register-digraphs "Γ" '("gG"))
|
|||
|
(register-digraphs "Δ" '("gD"))
|
|||
|
(register-digraphs "Ε" '("gE"))
|
|||
|
(register-digraphs "Ζ" '("gZ"))
|
|||
|
(register-digraphs "Η" '("gY"))
|
|||
|
(register-digraphs "Θ" '("gH"))
|
|||
|
(register-digraphs "Ι" '("gI"))
|
|||
|
(register-digraphs "Κ" '("gK"))
|
|||
|
(register-digraphs "Λ" '("gL"))
|
|||
|
(register-digraphs "Μ" '("gM"))
|
|||
|
(register-digraphs "Ν" '("gN"))
|
|||
|
(register-digraphs "Ξ" '("gC"))
|
|||
|
(register-digraphs "Ο" '("gO"))
|
|||
|
(register-digraphs "Π" '("gP"))
|
|||
|
(register-digraphs "Ρ" '("gR"))
|
|||
|
(register-digraphs "Σ" '("gS"))
|
|||
|
(register-digraphs "Τ" '("gT"))
|
|||
|
(register-digraphs "Υ" '("gU"))
|
|||
|
(register-digraphs "Φ" '("gF"))
|
|||
|
(register-digraphs "Χ" '("gX"))
|
|||
|
(register-digraphs "Ψ" '("gQ"))
|
|||
|
(register-digraphs "Ω" '("gW"))
|
|||
|
|
|||
|
|
|||
|
(register-digraphs "α" '("ga"))
|
|||
|
(register-digraphs "β" '("gb"))
|
|||
|
(register-digraphs "γ" '("gg"))
|
|||
|
(register-digraphs "δ" '("gd"))
|
|||
|
(register-digraphs "ε" '("ge"))
|
|||
|
(register-digraphs "ζ" '("gz"))
|
|||
|
(register-digraphs "η" '("gy"))
|
|||
|
(register-digraphs "θ" '("gh"))
|
|||
|
(register-digraphs "ι" '("gi"))
|
|||
|
(register-digraphs "κ" '("gk"))
|
|||
|
(register-digraphs "λ" '("gl"))
|
|||
|
(register-digraphs "μ" '("gm"))
|
|||
|
(register-digraphs "ν" '("gn"))
|
|||
|
(register-digraphs "ξ" '("gc"))
|
|||
|
(register-digraphs "ο" '("go"))
|
|||
|
(register-digraphs "π" '("gp"))
|
|||
|
(register-digraphs "ρ" '("gr"))
|
|||
|
(register-digraphs "σ" '("gs"))
|
|||
|
(register-digraphs "τ" '("gt"))
|
|||
|
(register-digraphs "υ" '("gu"))
|
|||
|
(register-digraphs "φ" '("gf"))
|
|||
|
(register-digraphs "χ" '("gx"))
|
|||
|
(register-digraphs "ψ" '("gq"))
|
|||
|
(register-digraphs "ω" '("gw"))
|
|||
|
|
|||
|
(register-digraphs "∆" '("DE"))
|
|||
|
|
|||
|
(register-digraphs "≤" '("<=" "le"))
|
|||
|
(register-digraphs "≥" '(">=" "ge"))
|
|||
|
(register-digraphs "≠" '("!=" "ne")))
|
|||
|
#+END_SRC
|