-
Notifications
You must be signed in to change notification settings - Fork 215
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Vimmier mappings #54
Comments
Keybindings definitly still have to be adjusted. Initially I just copied all of the keybindings from magit to not have to think about this. Automatically commiting when using |
I think vim-fugitive's implementation is here: Whether anyone but tpope can understand it is another question... |
Maybe could be done with The big question would be how to distinguish |
That is also why I didn't implement this in the beginning. I think there should be a way to do this. |
Not quite. What they do is, they set the $GIT_EDITOR env var to this: This is basically just a script that only exits when a certain The .exit seems to handle aborting when vim is exited, while the .edit file looks like a file to synchronize asynchronous jobs over in general, where the commit dialog is one of them. |
On that note, I actually prefer the way magit does it's... magic... in that regard. They use emac's remote capabilities to set Now, vim has a very similar feature (check The best shot for this, sans writing a client in a different language, seem to be a set of |
No, but |
@clason I don't think we should depend on an external executable for this. Requiring users to install a separate program just feels wrong. |
I know about That being said, since the original topic is about
Do we have to at all? I mean, all the solutions we discussed basically come down to "let git make the decision". But git does not care how the file was saved, afaik it just checks if there is content; the commit is aborted only if there is no commit message. |
We could make it so that writing the buffer commits the changes. I don't think you would write the buffer if you don't want to commit with the provided message anyways right? Example:
|
I don't know; it's an official neovim recommendation to install this, and other plugins (like vimtex) that need remote capabilities are happy to require it. So I don't see this as a big deal. But if you don't need it, even better, of course! |
So basically we commit on |
That was my initial thought as well, but then I thought "maybe people have muscle memory and |
If you do that, you could also wipe the buffer on |
Yeah I'm worrying about that too; I know I'm one of those people 😅 Personally I'd just commit on |
That was my thought as well; set a flag on The only question is whether |
(Leaves open the possibility that someone writes some text, |
From the docs:
|
This is now supported in the newest version. |
Closing this because I think this issue is done. |
Is there a way to remap keys in the NeogitCommitPopup? |
@kevintraver you could write a filetype plugin. What do you want to remap? |
It would be cool if mapped to Commit (c) |
@kevintraver you can remap |
Awesome! Thanks |
Another question: Is it possible to easily jump between staged / unstaged? Is there a key command for this? |
You could try to use |
I apologize for the click-baity issue title...
My request is quite specific: Right now, the commit window uses the Emacs mapping
<c-c><c-c>
to save the commit message and perform the commit. Coming fromvim-fugitive
, I just can't add this to my muscle memory -- I always try to do this with the standard vim mapping:wq
(like invim-fugitive
).Can this be (optionally) supported?
The text was updated successfully, but these errors were encountered: