1
0
mirror of https://github.com/jojojames/evil-collection.git synced 2024-06-30 08:00:54 +02:00
Commit Graph

2 Commits

Author SHA1 Message Date
William Carroll
799866e90e Add licensing information
Adds licensing copy, which was taken from another module in this repository.
2018-04-20 20:10:15 -07:00
William Carroll
9298988cc4 Support git-timemachine
Supports evil bindings for git-timemachine. On my machine, git-timemachine
starts with evil in normal mode, which is problematic when trying to access the
keybindings "n" and "p", which navigate to the next and previous revisions.
Additionally, normal mode eclispses "q", which exits the mode.

I tried using `(evil-set-initial-state 'git-timemachine-mode 'motion)`, but that
didn't work. I assume this is because `git-timemachine` is a minor-mode. To work
around this, I used `add-hook` to ensure motion mode was the initial state.

Once motion mode is the initial state, "p" and "q" become available.
Unfortunately, "n" is still not. To get around this, I used a buffer-local
binding in the local motion state map to map "n" appropriately. One known
shortcoming of this approach is that there is no cleanup done after exiting the
mode.

Any suggestions are eagerly welcomed. Forgive any crude techniques that I used
to get this functioning. I just wanted to broach the discussion with some of the
other maintainers to get some insights and hopefully augment my implementation
as needed.
2018-04-20 20:10:15 -07:00