evil-leader icon indicating copy to clipboard operation
evil-leader copied to clipboard

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

Open ideasman42 opened this issue 7 years ago • 2 comments

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?

ideasman42 avatar Nov 26 '16 03:11 ideasman42

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 avatar Aug 19 '17 15:08 vyorkin

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

vyorkin avatar Aug 29 '17 12:08 vyorkin