How to override evil-mode normal state binding
Gordon Gustafson
gordon3.14 at gmail.com
Sun Mar 1 21:59:27 CET 2015
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 <aneesh.kumar at gmail.com> 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
>
More information about the implementations-list
mailing list