diff options
| author | Craig Jennings <c@cjennings.net> | 2026-02-16 05:14:28 -0600 |
|---|---|---|
| committer | Craig Jennings <c@cjennings.net> | 2026-02-16 05:14:28 -0600 |
| commit | 9567262008aca05298c084812129401e939a0f4a (patch) | |
| tree | 8f307100a7079fa95839ad0615186030803625aa /snippets/emacs-lisp-mode/hydra | |
| parent | 792fecda226c3db1847db54485e5a9c467d66eac (diff) | |
| download | dotemacs-9567262008aca05298c084812129401e939a0f4a.tar.gz dotemacs-9567262008aca05298c084812129401e939a0f4a.zip | |
chore(yasnippet): move snippets into emacs.d for source control
Relocate snippets-dir from ~/sync/org/snippets/ to ~/.emacs.d/snippets/
and restore 28 snippet files from backup.
Diffstat (limited to 'snippets/emacs-lisp-mode/hydra')
| -rw-r--r-- | snippets/emacs-lisp-mode/hydra | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/snippets/emacs-lisp-mode/hydra b/snippets/emacs-lisp-mode/hydra new file mode 100644 index 00000000..97bd4263 --- /dev/null +++ b/snippets/emacs-lisp-mode/hydra @@ -0,0 +1,15 @@ +# -*- mode: snippet -*- +# name: hydra +# key: <hydra +# -- + +(with-eval-after-load '$1 + (defhydra hydra-$2 (:color teal :timeout 10 :hint nil) + "$2 common commands menu" + ("q" quit-window "quit" :column "") + ) + + (defun $1-hook-hydra-setup () + "Create $2 hydra/menu keybinding when entering ledger mode." + (local-set-key (kbd "C-c ?") 'hydra-$2/body)) + (add-hook '$1-hook '$1-hook-hydra-setup)) |
