general.el
general.el copied to clipboard
Unable to bind key with prefix in a specific major mode
Hi, I've been banging away at this for a while and haven't made any progress. I want to to bind a key behind a prefix in the normal, motion, and visual evil states only in a specific major mode. For example:
(general-def :prefix "SPC" :states '(normal visual motion) :keymaps 'org-mode-map ">" 'test)
However, when I evaluate this, SPC > gets bound to the test command globally, not just in org-mode. What am I doing wrong here?
I cannot replicate this behavior. Are you on the latest version of general.el? I'll double check to make sure I don't have any local changes or configuration that would cause this.
Also, if you are using general-def already, you can use this syntax if you want:
(general-def '(normal visual motion) org-mode-map
:prefix "SPC"
">" 'test)