summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRavi R Kiran <aine.marina@gmail.com>2015-05-16 04:12:52 (GMT)
committerRavi R Kiran <aine.marina@gmail.com>2015-05-16 04:12:52 (GMT)
commitb72c3d9051d3d87cd231d642a3d3c215c915c40e (patch)
tree0ef088314edfcca93edb87ea687a022d8c877ed6
parent0c1e84879a89d69c791feda99aeb1f7bf31483fa (diff)
downloaddotemacs-b72c3d9051d3d87cd231d642a3d3c215c915c40e.zip
dotemacs-b72c3d9051d3d87cd231d642a3d3c215c915c40e.tar.gz
dotemacs-b72c3d9051d3d87cd231d642a3d3c215c915c40e.tar.bz2
Use normal keybinding setup for toggle/launcher map
-rw-r--r--lisp/ravi-init-function.el24
-rw-r--r--lisp/ravi-init-maps.el22
2 files changed, 24 insertions, 22 deletions
diff --git a/lisp/ravi-init-function.el b/lisp/ravi-init-function.el
index 671d45c..ee85393 100644
--- a/lisp/ravi-init-function.el
+++ b/lisp/ravi-init-function.el
@@ -31,5 +31,29 @@
;; Use emacsclient from other programs
(unless (server-running-p) (server-start))
+;; Combined launcher and toggle-maps
+(defun ravi/setup-toggle-launcher-map ()
+ (define-prefix-command 'ravi/toggle-launcher-map)
+ (bind-key "t" 'ravi/toggle-launcher-map ctl-x-map)
+
+ ;; Toggles
+ (bind-key "c" 'column-number-mode ravi/toggle-launcher-map)
+ (bind-key "e" 'toggle-debug-on-error ravi/toggle-launcher-map)
+ (bind-key "f" 'auto-fill-mode ravi/toggle-launcher-map)
+ (bind-key "l" 'toggle-truncate-lines ravi/toggle-launcher-map)
+ (bind-key "q" 'toggle-debug-on-quit ravi/toggle-launcher-map)
+ ;; Generalized version of `read-only-mode'.
+ (bind-key "r" 'dired-toggle-read-only ravi/toggle-launcher-map)
+ (autoload 'dired-toggle-read-only "dired" nil t)
+ (bind-key "w" 'whitespace-mode ravi/toggle-launcher-map)
+
+ ;; Launchers
+ (bind-key "P" 'package-list-packages ravi/toggle-launcher-map)
+ (bind-key "p" 'proced ravi/toggle-launcher-map)
+ (bind-key "d" 'ediff-buffers ravi/toggle-launcher-map)
+ (bind-key "F" 'find-dired ravi/toggle-launcher-map)
+ (add-to-list 'guide-key/guide-key-sequence "C-x t"))
+(ravi/setup-toggle-launcher-map)
+
(provide 'ravi-init-function)
;;; ravi-init-function.el ends here
diff --git a/lisp/ravi-init-maps.el b/lisp/ravi-init-maps.el
index c96256a..ae4eac6 100644
--- a/lisp/ravi-init-maps.el
+++ b/lisp/ravi-init-maps.el
@@ -54,27 +54,5 @@
("%" apply-operation-to-number-at-point :exit t)))
:ensure t)
-;; Combined launcher and toggle-maps
-(defhydra hydra-launch-toggle-map ()
- "Launcher/toggle"
-
- ;; Toggles
- ("c" column-number-mode "column-number-mode")
- ("e" toggle-debug-on-error "toggle-debug-on-error")
- ("f" auto-fill-mode "auto-fill-mode")
- ("l" toggle-truncate-lines "toggle-truncate-lines")
- ("q" toggle-debug-on-quit "toggle-debug-on-quit")
- ;; Generalized version of `read-only-mode'.
- ("r" dired-toggle-read-only "dired-toggle-read-only")
- ;(autoload 'dired-toggle-read-only "dired" nil t)
- ("w" whitespace-mode "whitespace-mode")
-
- ;; Launchers
- ("P" package-list-packages "package-list-packages")
- ("p" proced "proced")
- ("d" ediff-buffers "ediff-buffers")
- ("F" find-dired "find-dired"))
-(bind-key "M-g M-t" 'hydra-launch-toggle-map/body)
-
(provide 'ravi-init-maps)
;;; ravi-init-maps.el ends here