-
Notifications
You must be signed in to change notification settings - Fork 281
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
let certain minor-mode's key bindings override evil's default key bindings #511
Comments
Original comment by Bin Chen (Bitbucket: redguardtoo, GitHub: redguardtoo): doesn't work, here is my setup. use the dev version of evil: (eval-after-load 'git-timemachine (require 'evil) ;; enable evil-mode |
Original comment by Frank Fischer (Bitbucket: lyro, GitHub: lyro): Please try
Updating key bindings according to some minor-modes or keymaps is very difficult in Emacs, because there is no reliable way (that I know of) to detect whether some minor mode is activated or some keymap becomes active (there are hooks like The hook for Note that this gives all bindings of git-timemachine higher priority than any Evil binding (but only in normal state). If this is not what you want you could do the following:
Btw, it might be a good idea to make git-timemachine come up in motion-state instead of normal-state. |
Originally reported by: Bin Chen (Bitbucket: redguardtoo, GitHub: redguardtoo)
for example, git-timemachine will use "n", "p", "q" "g" key bindings.
I need a list like evil-set-initial-state, but it's for minor-modes.
for certain minor-modes, I could:
use the keybindings defined in major-mode, but let this minor mode take precedence
OR, use emacs keybindings if the minor is loaded and restore its original key bindings if the minor-mode is turned off.
The text was updated successfully, but these errors were encountered: