add which key to get help in evil mode

This commit is contained in:
amirrezaask 2020-03-20 02:48:17 +03:30
parent ca4307e6cc
commit a4b7fe999b
2 changed files with 12 additions and 3 deletions

View File

@ -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))

View File

@ -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."