Skip to content
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

Add support to (un)staging hunks when using git: diff (with the same shortcuts) #669

Closed
3v1n0 opened this issue Jun 13, 2017 · 6 comments · Fixed by #695
Closed

Add support to (un)staging hunks when using git: diff (with the same shortcuts) #669

3v1n0 opened this issue Jun 13, 2017 · 6 comments · Fixed by #695

Comments

@3v1n0
Copy link
Contributor

3v1n0 commented Jun 13, 2017

When using the git: diff current file inline I can stage/unstage hunks by using h / H, I was expecting to be able to do the same when just using git: diff (and git: diff current file), hunk by hunk (no support for line adding of course in this case).

@3v1n0 3v1n0 changed the title Add support to (un)staging hunks when using git: diff Add support to (un)staging hunks when using git: diff (with the same shortcuts) Jun 14, 2017
@stoivo
Copy link
Member

stoivo commented Jun 14, 2017

If you ? you can see all commands for views like these. This should be a cool addon. Probably we just need to pass a --reset to apply if this is the case.

Is super+shift+ENTER a good key?

Would you like to open a PR?

@3v1n0
Copy link
Contributor Author

3v1n0 commented Jun 14, 2017

I'd just stay consistent using h/H as it happens in inline mode...

As Ctrl+Enter already does it.

@stoivo
Copy link
Member

stoivo commented Jun 14, 2017

@divmain, @randy3k, @asfaltboy. Is it too mush to have the keyboard shortcut from super+enter to h for it to have the same key binding as in the inline diff?
The view is read-only so the user shouldn't want to type h anyway.

Or maybe keep super+enter and then hand H.

@3v1n0
Copy link
Contributor Author

3v1n0 commented Jun 14, 2017

Yah, I'd keep Super/Ctrl+enter around... While adding h/H as alias.

I think those views should be consistent in keybinding, so if the views do the same things, they should use the same values.

@randy3k
Copy link
Collaborator

randy3k commented Jun 14, 2017

I prefer using h/l/H/L keybinds.

@divmain
Copy link
Collaborator

divmain commented Jun 20, 2017

Adding key aliases could make things messy pretty quick - the keybindings file is already pretty massive! However, I do like keeping Super+Enter for this use case, while it also completely makes sense to use H and L. So maybe we can make an exception for aliasing here. I'm fine adding the functionality, and adding h/l/H/L keybindings in the same PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants