[Hydra] Move custom hydras to ‘use-package’ declaration

This commit is contained in:
Daniel Borchmann 2018-01-27 17:57:36 +01:00
parent e459d534bf
commit 7d8abe0e50
Signed by: exot
GPG Key ID: 4F63DB96D45AA9C6

19
init.el
View File

@ -568,9 +568,14 @@
(use-package db-emacsclient)
(use-package hydra)
(use-package hydra
:commands (defhydra
hydra-toggle/body
hydra-zoom/body
hydra-rectangle/body)
:config
(defhydra hydra-toggle (:color blue)
(defhydra hydra-toggle (:color blue)
"toggle"
("c" column-number-mode "column")
("d" toggle-debug-on-error "debug-on-error")
@ -580,14 +585,14 @@
("q" toggle-debug-on-quit "debug-on-quit")
("r" read-only-mode "read-only"))
;; zooming with single keystrokes (from oremacs)
(defhydra hydra-zoom (:color red)
;; zooming with single keystrokes (from oremacs)
(defhydra hydra-zoom (:color red)
"zoom"
("g" text-scale-increase "increase")
("l" text-scale-decrease "decrease"))
;; rectangle mode
(defhydra hydra-rectangle (:body-pre (rectangle-mark-mode 1)
;; rectangle mode
(defhydra hydra-rectangle (:body-pre (rectangle-mark-mode 1)
:color pink
:post (deactivate-mark))
"
@ -611,7 +616,7 @@ _h_ _l_ _o_k _y_ank
("u" undo nil)
("s" string-rectangle nil)
("p" kill-rectangle nil)
("o" nil nil))
("o" nil nil)))
(use-package magit
:commands (magit-status)