evil-leader
evil-leader copied to clipboard
Add evil-leader/set-local-key
Not as clean as I initially thought, because there is no convention that minor modes should have hooks. So we have to resort to advices to set local keys. Usage example:
(defun pandoc-local-keys (&rest args)
(evil-leader/set-local-key
"ps" 'some-command
"po" 'other-command))
(advice-add 'pandoc-mode :after #'pandoc-local-keys)
If someone has a better approach to the problem of minor-mode specific leader keys, please suggest it.
Possible alternative: http://endlessparentheses.com/define-context-aware-keys-in-emacs.html