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

Initial state of magit-popup #47

Open A6GibKm opened 6 years ago

A6GibKm commented 6 years ago

I have to put

(general-define-key
 :states 'emacs
 :keymaps 'magit-popup-mode-map
 "j"     'forward-button
 "k"     'backward-button)

in my config since magit-popup uses emacs-state by default (contrary to magit-status), can this be changed to normal state? In the past I tried to manually change it to normal state using evil-initial-state resulting in breakage of magit-popup.

BooAA commented 5 years ago

Having same viewpoint here, I think using normal-state for all magit related mode will be better. Many people will set evil-emacs-state-modes , evil-insert-state-modes and evil-motion-state-modes to nil, which is conflict with some modes defined in evil-magit-untouched-modes. I think making all modes start in normal-state can fix this problem.

justbur commented 5 years ago

Magit popups don't use regular keymaps to get key bindings. If I remember right, they intercept keypresses in such a way that you have to actually be inserting the character corresponding to the shortcut into the buffer. In terms of evil, that means you should be in emacs state or insert state in those buffers. I don't think insert makes much sense.