How to override evil-mode normal state binding
I am trying to override binding for 'q' for a minor mode. What is the right way to do it ? Using evil-define-key doesn't seem to work. For example i tried (evil-define-key 'normal magit-blame-mode "q" 'magit-blame-quit) and that doesn't seem to work. Even adding a new binding like (evil-define-key 'normal magit-blame-mode "Q" 'magit-blame-quit) is not working. I am using evil-mode from melpa -aneesh
Normally you'd do this: (evil-define-key 'normal magit-blame-map "q" 'magit-blame-quit) (evil-make-overriding-map magit-blame-map 'normal t) However, magit-blame-map seems to be loaded only after magit-blame-mode is activated. You can try to resolve this by writing a hook for magit-blame-mode, or perhaps activating it and deactivating it before defining the new mapping. On 3/1/15, Aneesh Kumar <[email protected]> wrote:
I am trying to override binding for 'q' for a minor mode. What is the right way to do it ? Using evil-define-key doesn't seem to work. For example i tried (evil-define-key 'normal magit-blame-mode "q" 'magit-blame-quit) and that doesn't seem to work. Even adding a new binding like (evil-define-key 'normal magit-blame-mode "Q" 'magit-blame-quit) is not working.
I am using evil-mode from melpa
-aneesh
participants (2)
-
Aneesh Kumar -
Gordon Gustafson