emacs-evil / evil-magit

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

Commit message window cannot be finished from a key binding #52

Closed ChoppinBlockParty closed 5 years ago

ChoppinBlockParty commented 5 years ago

I have staged the files, pressed c, commit message with a diff window have opened, I have wrote a commit message, saved the buffer. After that whatever I do I cannot finish the commit. The only way to finally commit it was was typing with-editor-finish. What is a binding to finish the commit? If there is no one, please, advise, I was thinking to bind q as a finishing binding, how can I make such binding?

justbur commented 5 years ago

evil-magit doesn't touch the with-editor bindings. The default one for completing a commit is C-c C-c. There should be a message that reports the binding when you open the commit buffer. You can also use C-h f with-editor-finish RET in a commit buffer to find out where the function is currently bound for you.

ChoppinBlockParty commented 5 years ago

Thank you for the answer. I am new in Emacs. Could you suggest a function that would bind q for that in the commit message buffer?

justbur commented 5 years ago

To bind q in normal state,

(with-eval-after-load 'with-editor
  (evil-define-key 'normal with-editor-mode-map "q" 'with-editor-finish))
ChoppinBlockParty commented 5 years ago

Fantastic, thank you.