Closed marktran closed 12 years ago
By default help-mode
buffers come up in motion-state
.
evil-leader does only bind the leader key in normal-state
(or with evil-leader/in-all-states
also in emacs-state
and insert-state
).
That's the reason why it does not work.
The reason why I will not change this (well, maybe the variable name to in-most-states
), is the scope of the motion state: It's motions and most evil commands will not work. So I think it'd be surprising if evil-leader behaved different.
If you want it nonetheless use this:
(evil-define-key 'motion-state help-mode-map evil-leader/leader evil-leader/map)
or to define for all modes:
(define-key evil-motion-state-map evil-leader/leader evil-leader/map)
Ah. That makes sense.
I still can't get evil-leader working in motion-state with the workarounds you pasted though. ,
seems to be bound to evil-repeat-find-char-reverse
.
Oh I see, the first will not work as the already bound ,
has precedence.
The second one does nonetheless, try this snippet (adjust the path) with evil's make emacs
:
(push "/path/to/evil-leader/" load-path)
(setq evil-leader/leader ",")
(require 'evil-leader)
(evil-leader/set-key "," 'evil-repeat-find-char-reverse)
(define-key evil-motion-state-map evil-leader/leader evil-leader/map)
For a help-mode local binding I'm currently at a loss. You maybe want to ask at the mailinglist implementations-list
Fantastic—that snippet did what I wanted. Thanks for the help and making evil-leader!
evil-leader doesn't seem to be bound in Help buffers despite working in other buffers and evil-mode being enabled in help-mode. Why is it not bound in help-mode?