-
Notifications
You must be signed in to change notification settings - Fork 566
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 some nice keyboard shortcuts for staging and selecting #4884
Conversation
Pressing 'Escape' will close the commit input file
Add the ability to control externally when the commit message text input is focused. Also: Opent the commit input when a file is selected and the space bar is pressed
Stage or unstage the files by pressing the space-bar on the selected files. Click enter to focus on the commit message input field
Select all files with meta-key + 'a'. Also, `fileIdSelection` will make sure that the no duplicates are added to the selection
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
5048f16
to
5137517
Compare
return; | ||
} | ||
|
||
// Stage/unstage files |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe remove these comments as they are not super helpful.
// Only one file selected | ||
// | ||
// Select all hunks if none are selected, | ||
// otherwise ignore all hunks |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any chance you could format and punctuate this a bit better? I see one comma, and two questionable line breaks 😂
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't, you, like
.them?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Haha, I'll just remove them 👍
a31fc3b
to
c9a5d7a
Compare
☕️ Reasoning
As seen in #4734
DISCLAIMER
Not all items in that issue are implemented in this PR.
It would be great if we and stage/un-stage files using only the keys!
🧢 Changes
'Escape'
will close the commit message input field (both the modal and the lane field)Ctrl or cmd + 'a'
will select all files in the listspace-bar
will open the commit message input from the lane.space-bar
will toggle the staging of the selected files.