Bind K to SPC m h h if it exists.

This commit is contained in:
person808 2015-04-01 21:24:31 -10:00 committed by syl20bnr
parent 2f29b3edbe
commit ba1d9eef68

View file

@ -628,6 +628,14 @@ which require an initialization must be listed explicitly in the list.")
(evil-leader/set-key "re" 'evil-show-registers)
(defun spacemacs/smart-doc-lookup ()
"Bind K to SPC m h h and fall back to `evil-lookup'"
(interactive)
(condition-case nil
(execute-kbd-macro (kbd "SPC m h h"))
(error (evil-lookup))))
(define-key evil-normal-state-map (kbd "K") 'spacemacs/smart-doc-lookup)
;; scrolling micro state
(defun spacemacs/scroll-half-page-up ()
"Scroll half a page up while keeping cursor in middle of page."