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

'c' just opens popup #12

Closed davidpdrsn closed 8 years ago

davidpdrsn commented 8 years ago

I'm new to Emacs and I'm having trouble figuring out how to commit. When I press 'c' it just opens a popup with switches and options.

justbur commented 8 years ago

You simply type the option you want from the popup. A "standard" commit is cc. To run git commit --amend you can do ca, for example. Evil-magit changes the key bindings, but not the way magit functions. For that you can refer to magit.vc for the manual.

On Tue, Dec 15, 2015 at 1:15 PM David Pedersen notifications@github.com wrote:

I'm new to Emacs and I'm having trouble figuring out how to commit. When I press 'c' it just opens a popup with switches and options.

— Reply to this email directly or view it on GitHub https://github.com/justbur/evil-magit/issues/12.

davidpdrsn commented 8 years ago

Then emacs says "c is undefined".

justbur commented 8 years ago

Can you tell me in steps what you are doing and when you see that message?

On Tue, Dec 15, 2015 at 1:27 PM David Pedersen notifications@github.com wrote:

Then emacs says "c is undefined".

— Reply to this email directly or view it on GitHub https://github.com/justbur/evil-magit/issues/12#issuecomment-164847864.

davidpdrsn commented 8 years ago

I recorded a quick video https://dl.dropboxusercontent.com/u/2155997/Magit%20commit%20not%20working.mov

justbur commented 8 years ago

Hm, ok thanks. After the popup appears what does C-h v evil-state RET say the value of evil-state is? It should be 'emacs'

On Tue, Dec 15, 2015 at 1:41 PM David Pedersen notifications@github.com wrote:

I recorded a quick video https://dl.dropboxusercontent.com/u/2155997/Magit%20commit%20not%20working.mov

— Reply to this email directly or view it on GitHub https://github.com/justbur/evil-magit/issues/12#issuecomment-164850859.

davidpdrsn commented 8 years ago

It said 'motion'.

I played around my init.el file and after removing the line

(setq evil-motion-state-modes (append evil-emacs-state-modes evil-motion-state-modes))

it works.

Not quite sure what that line does, but I appreciate your help a lot :smile:

justbur commented 8 years ago

Yep that would have screwed it up. The evil-state used in the magit buffers is important for evil-magit, so changing them will have unintended effects like this. c is undefined in the motion state map. In emacs state, c just inserts the character, which is what the magit popups are expecting you to do.

On Tue, Dec 15, 2015 at 2:02 PM David Pedersen notifications@github.com wrote:

It said 'motion'.

I played around my init.el file and after removing the line

(setq evil-motion-state-modes (append evil-emacs-state-modes evil-motion-state-modes))

it works.

Not quite sure what that line does, but I appreciate your help a lot [image: :smile:]

— Reply to this email directly or view it on GitHub https://github.com/justbur/evil-magit/issues/12#issuecomment-164856327.

davidpdrsn commented 8 years ago

Okay I see. Thanks for your help!