cofi / evil-leader

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

[feature request] Unable to bind keys to an 'evil' mode #38

Open ideasman42 opened 7 years ago

ideasman42 commented 7 years ago

While set-key-for-mode is helpful for emacs modes, as far as I can tell there is no way to associate a key with an evil mode (normal-mode, visual-mode for example).

In VIM, one might do this for example:

vmap <leader>r :retab
nmap <leader>r :some_other_function

I couldn't find a way to do this with evil-leader.

Perhaps set-key-for-evil-mode could be added?

vyorkin commented 7 years ago

possible a duplicate of #8 , I wonder if there are only three of us want this. Here is what I have to do now to achieve this:

(evil-define-minor-mode-key 'visual 'alchemist-mode " e" 'alchemist-iex-send-current-line)
                                                     ^^
vyorkin commented 7 years ago

sorry for ad of other packages here, but @ideasman42 – general solves this problem ;)