-
-
Notifications
You must be signed in to change notification settings - Fork 113
Paredit Operations
kevinfis edited this page Sep 19, 2023
·
4 revisions
Paredit is very useful to handle parenthsis, in the same time, lots functions need to be bound. Thanks Hydra, let it can be integrate just one place. this hydra function tests in resolution 2560x1440, and use a lot unicode char to decorate, so you need to change char if you lack some font or install supposed font. here is Screenshoot:
(defhydra hydra-paredit (:color pink )
"
𝑀ove 𝐶𝑢𝑟𝑠𝑜𝑟┃ 🮡
🮠 In(): ˲⃰_i9_˱› ⃰ ⃓↑⎛⬎┃ )⃰ ˲_i0_˱› ( ┃⬐⎞↑⃓ 🮡 ˲_8_˱›f·barf▻ ⃰ ↓▁⎛ַ↑ ) ⃰ ˲_9_˱› ⃰ ┃⎛wrap⎠ ⃰ ˲_0_˱› ⃰ ( ַ↑⎠▁⮯ ⃰ ◅back·barf
╵ ╵ ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾
╵ Out(): ˲_o9_˱› ⃰ ↓┃⎛↑⃓ ) ⃰ ˲_o0_˱› ⃰ ( ⃓↑⎞↓❙ ⃰ ╵ ˲_p_˱›f·slurp▻ ⃰ ַ↑⎛⮯▁ ⃰ ˲_\\_˱› ⃰ ▁⮮⎠ַ↑ ⃰ ◅back·slur
🮡─────────────────────────────────────────────🮠
𝐿eave(): pre› ⃰ ↓❙( ⇠⃓ ˲_;_˱ ˲_'_˱ ⃓⇢ )┃↓ ⃰ ‹next
🮡─────────────────────────────────────────────────🮢 Wrap [] <> {}: ˲_[_˱› ⃰ ┃⟦sym⟧ ⃰ ˲_,_˱ › ⃰ ┃🮤sym🮥 ⃰ ˲_{_˱ › ⃰ ⎨sym⎬ ⃰
˲_k_˱› ⃰ kill ⎛𝑠𝑦𝑚⎠ ⃰ 🮡──────────────────────────────────────────────────────────────────────────────────🮠
˲_m_˱› ⃰ mark ⎛𝑠𝑦𝑚⎠ ⃰ ˲_u_˱ › ⧘ Remove ⧙ ˲_j_˱ › ( ₎ Join ₍ ) ˲_/_˱ › Apart ▻ ( ) _/_ ( ) ˲_C-q_˱ , ˲_q_˱ › quit
🮡────────────────────────⍲─────────────────────⍲───────────────────────⍲──────────────────────────────🮠
𝐻𝑦𝑑𝑟𝑎 — ⸨ 𝑷𝒂𝒓𝒆𝒅𝒊𝒕 ⸩
"
("q" nil)
("C-q" nil)
("C-g" nil)
("p" paredit-backward-barf-sexp)
("\\" paredit-forward-barf-sexp)
("r" paredit-splice-sexp)
("k" kill-sexp)
("m" mark-sexp)
("c" paredit-copy-as-kill)
("j" paredit-join-sexps)
("/" paredit-split-sexp)
("o9" paredit-backward-up)
("o0" paredit-forward-up)
("i9" paredit-backward-down)
("i0" paredit-forward-down)
(";" paredit-backward)
("'" paredit-forward)
("8" paredit-backward-slurp-sexp)
("9" paredit-wrap-round)
("0" paredit-forward-slurp-sexp)
("," paredit-wrap-angled)
("[" paredit-wrap-square)
("{" paredit-wrap-curly)
;; ("]" paredit-close-square)
;; ("." paredit-close-angled) ;; ?
;; ("}" paredit-close-curly)
)
(define-key dired-mode-map "M-9" 'hydra-paredit/body)
- Binding-Styles
- Basics
- Verbosity
- Conditional-Hydra
- defcustom
- Hydra-Colors
- internals
- Nesting-Hydras
- Prefix-map