1

I'm trying to set up magit to work nicely with evil mode. Ideally I'd be able to open the magit-status-mode buffer in normal mode and be able to stage/commit from that buffer with vim-like keybindings.

To open magit-status in normal mode, I have the following:

(evil-set-initial-state 'magit-status-mode 'normal)
(evil-define-key 'normal magit-status-mode-map
  "j" 'magit-goto-next-section
  "k" 'magit-goto-previous-section)

Is there a way to add keybindings to this map for staging/committing files? Or a better way to accomplish my stated goal above than this approach altogether?

3

evil-magit is certainly a good choice. It is well maintained.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.