emacs-evil / evil-magit

Black magic or evil keys for magit
https://github.com/justbur/evil-magit
GNU General Public License v3.0
273 stars 16 forks source link

request magit-repolist-mode support #35

Closed ambihelical closed 6 years ago

ambihelical commented 6 years ago

Currently this mode (via magit-list-repositories) doesn't work very well with evil, a few important bindings such as RET are hidden by evil. For now I have it in the 'evil-emacs-state-modes list, but it would be nice if it was supported in evil-magit.

justbur commented 6 years ago

That looks like a new command. I can add support for it. I think I would do this in this case

(evil-set-initial-state 'magit-repolist-mode 'motion)
(evil-define-key 'motion magit-repolist-mode-map
  (kbd "RET") 'magit-repolist-status
  (kbd "gr")  'magit-list-repositories)

Is that what you would expect?

ambihelical commented 6 years ago

That seems reasonable, assuming motion mode allows "q" to quit the mode.

justbur commented 6 years ago

It does. I just pushed that change. Feel free to repoen this issue if you notice something odd.