cofi / evil-leader

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

map whole keymap-prefix in one go? #39

Open unhammer opened 7 years ago

unhammer commented 7 years ago

Say I there's a bunch of keybindings under the C-c x prefix already defined, e.g. C-c x s, C-c x f etc. Now I want to also have the same bindings under <leader> x s/f/etc. Is it possible to say something like (evil-leader/set-keys-from-prefix "x" "C-c x") (assuming the C-c x bindings are already loaded) instead of hardcoding individual (evil-leader/set-key "x s" #'do-the-x-s-thing "f" #'do-the-x-f-thing …)?

alanpearce commented 6 years ago

I just found this issue as I wanted to do the same thing.

(evil-leader/set-key "w" evil-window-map) seems to do the right thing.