diff --git a/lib/extensions/editor.el b/lib/extensions/editor.el index 8db71a8..f31c6fe 100644 --- a/lib/extensions/editor.el +++ b/lib/extensions/editor.el @@ -80,6 +80,8 @@ (with-ability tabbar (depends-on 'tabbar)) +(with-ability which-key + (depends-on 'which-key)) (if (eq system-type 'darwin) (depends-on 'exec-path-from-shell)) diff --git a/lib/extensions/editor/init.el b/lib/extensions/editor/init.el index 5cb836e..59895a5 100644 --- a/lib/extensions/editor/init.el +++ b/lib/extensions/editor/init.el @@ -106,12 +106,19 @@ "Highlights the current line." (global-hl-line-mode t)) + (ability which-key () + (when (is-evil?) + (which-key-mode t))) + ;; enhance evil mode with space leader keybindings - (ability space-keys () + (ability space-keys (which-key) "evil mode with space leader keybindings" (when (is-evil?) - (defkey global-map 'split-window-below :evil (:normal "SPC w s v")))) - + (defkey global-map 'split-window-below :evil (:normal "SPC w s v")) + (defkey global-map 'split-window-right :evil (:normal "SPC w s h")) + (defkey global-map 'other-window :evil (:normal "SPC w o")) + (defkey global-map 'delete-window :evil (:normal "SPC w d")) + (defkey global-map 'delete-other-windwo :evil (:normal "SPC w m")))) (ability flycheck () "Check syntax on the fly using flycheck."