This repository was archived by the owner on Dec 15, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 409
This repository was archived by the owner on Dec 15, 2022. It is now read-only.
Keyboard interactions for Git committing #174
Copy link
Copy link
Closed
Milestone
Description
Before we staff ship, it should be possible to commit via this package without ever touching the mouse. Here's some initial thinking I did with @maxbrunsfeld on a comprehensive keybinding scheme.
- Focusing and toggling the Git and GitHub panels. These bindings are based on a logical extension of the existing binding for toggling focus on the tree view. Since they're based on numbers, we could potentially extend this scheme even further to manage other panels:
- Existing binding
ctrl-0– focus/blur the tree view
- Proposed new bindings:
ctrl-shift-0– show/hide the tree viewctrl-9– focus/blur the Git panelctrl-shift-9– show/hide the Git panelctrl-8– focus/blur the GitHub panel ("8" for "Octocat")ctrl-shift-8– show/hide the GitHub panelescblurs the panel, returning focus to the active pane item
- Existing binding
- Moving focus between elements of the Git panel. When you focus the Git panel, either the unstaged/staged file list is focused or the commit message editor is focused.
- "Sub-focus" is retained across panel focus/blur events, so you could blur the panel with the commit message editor focused, then still have the editor focused when you restore focus to the panel.
tabmoves forward between merge conflicts, unstaged files, staged files and finally to the commit message editor. Once focus is in the editor, we do not change focus ontabbut instead insert tabs / spaces into the editor. To return to the lists, useshift-tab.shift-tabmoves backward from the commit message editor to the staged files, unstaged files, and finally merge conflicts. To match behavior of tab going forward, we don't cycle around.- Intuitive arrow navigation
downon the last entry in the file list focuses the commit editor.upat position(0, 0)of the editor moves to the last item of the file list.
- Navigating unstaged/staged files
upanddownnavigate both unstaged and staged file lists as a single list.lefttransfers focus from the panel to the currently selected diffrighttransfers focus to the current diff back to the panelentertoggles staging status on the selected file and selects the next item in the list.
- Committing
cmd-enter(ctrl-enteron Win/Linux) anywhere in the git panel with a non-empty commit message creates a commit.cmd-enterwith an empty commit message focuses the commit editor.
/cc @atom/core
maxbrunsfeld, simurai and as-cii
Metadata
Metadata
Assignees
Labels
No labels