cofi / evil-leader

<leader> key for evil
GNU General Public License v3.0
315 stars 22 forks source link

Feature request: State-local bindings #8

Open gnosis-zz opened 11 years ago

gnosis-zz commented 11 years ago

It would be nice if evil-leader would allow one key to simultaneously be bound to a different action for each evil state.

For example, allow all of the following to be active at the same time:

(evil-leader/set-key-for-mode 'motion 'help-mode "x" 'foo) (evil-leader/set-key-for-mode 'normal 'help-mode "x" 'bar) (evil-leader/set-key-for-mode 'insert 'help-mode "x" 'baz)

vyorkin commented 7 years ago

indeed! its weird that nobody else asked for this feature @gnosis-zz do you know any workaround other than e.g.:

(evil-define-minor-mode-key 'visual 'alchemist-mode " e" 'alchemist-iex-send-current-line)
                                                     ^^
(evil-define-minor-mode-key 'visual 'alchemist-mode " E" 'alchemist-iex-send-current-line-and-go)
                                                     ^^
...

and so on ?