Commit 0319c4bf9c2f

Vincent Demeester <vincent@sbr.pm>
2018-08-13 16:43:34
Add hydra-toggle
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
1 parent f70b4b7
Changed files (1)
lisp/vde-hydras.el
@@ -42,6 +42,28 @@
   ("0" (text-scale-set 0) :bind nil :exit t)
   ("1" (text-scale-set 0) nil :bind nil :exit t))
 
+
+(defhydra hydra-toggle (:color pink :hint nil)
+  "
+_a_ abbrev-mode:       %`abbrev-mode
+_d_ debug-on-error:    %`debug-on-error
+_f_ auto-fill-mode:    %`auto-fill-function
+_h_ highlight          %`highlight-nonselected-windows
+_t_ truncate-lines:    %`truncate-lines
+_w_ whitespace-mode:   %`whitespace-mode
+_l_ org link display:  %`org-descriptive-links
+"
+  ("a" abbrev-mode)
+  ("d" toggle-debug-on-error)
+  ("f" auto-fill-mode)
+  ("h" (setq highlight-nonselected-windows (not highlight-nonselected-windows)))
+  ("t" toggle-truncate-lines)
+  ("w" whitespace-mode)
+  ("l" org-toggle-link-display)
+  ("q" nil "quit"))
+
+(global-set-key (kbd "C-c C-v") 'hydra-toggle/body)
+
 (bind-key "M-y" #'hydra-yank-pop/yank-pop)
 (bind-key "C-y" #'hydra-yank-pop/yank)