summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Chen <weichen2000121@gmail.com>2019-12-06 22:36:52 -0800
committerDavid Chen <weichen2000121@gmail.com>2019-12-06 22:36:52 -0800
commite425f1df871ecd3ea96214ed51acfa8c3db0896e (patch)
tree852864894d43cddb275f5f8bc340146dbacfb270
parentc89c35c6b37935def3341d85dc7a5ae9aa447a65 (diff)
suggested keybinding improvements
-rw-r--r--pkg/config/app_config.go18
-rw-r--r--pkg/gui/keybindings.go20
2 files changed, 19 insertions, 19 deletions
diff --git a/pkg/config/app_config.go b/pkg/config/app_config.go
index 1ff49da51..9c6e6467c 100644
--- a/pkg/config/app_config.go
+++ b/pkg/config/app_config.go
@@ -283,6 +283,7 @@ keybinding:
optionMenu: 'x'
optionMenu-alt1: '?'
select: '<space>'
+ goInto: '<enter>'
remove: 'd'
new: 'n'
edit: 'e'
@@ -293,14 +294,17 @@ keybinding:
scrollDownMain-alt1: 'J'
scrollUpMain-alt2: '<c-u>'
scrollDownMain-alt2: '<c-d>'
+ executeCustomCommand: 'X'
createRebaseOptionsMenu: 'm'
pushFiles: 'P'
pullFiles: 'p'
refresh: 'R'
createPatchOptionsMenu: '<c-p>'
+ nextBranchTab: ']'
+ prevBranchTab: '['
status:
checkForUpdate: 'u'
- recentRepos: 's'
+ recentRepos: '<enter>'
files:
commitChanges: 'c'
commitChangesWithoutHook: 'w'
@@ -313,24 +317,21 @@ keybinding:
toggleStagedAll: 'a'
viewResetOptions: 'D'
fetch: 'f'
- executeCustomCommand: 'X'
branches:
createPullRequest: 'o'
- checkoutBranchesByName: 'c'
+ checkoutBranchByName: 'c'
forceCheckoutBranch: 'F'
rebaseBranch: 'r'
mergeIntoCurrentBranch: 'M'
- FastForward: 'f'
+ fastForward: 'f'
pushTag: 'P'
- nextBranchTab: ']'
- prevBranchTab: '['
setUpstream: 'u'
commits:
squashDown: 's'
renameCommit: 'r'
renameCommitWithEditor: 'R'
- resetToThisCommit: 'g'
- fixupCommit: 'f'
+ viewResetOptions: 'g'
+ markCommitAsFixup: 'f'
createFixupCommit: 'F'
squashAboveCommits: 'S'
moveDownCommit: '<c-j>'
@@ -341,7 +342,6 @@ keybinding:
cherryPickCopy: 'c'
cherryPickCopyRange: 'C'
pasteCommits: 'v'
- viewCommitFiles: '<enter>'
tagCommit: 'T'
stash:
popStash: 'g'
diff --git a/pkg/gui/keybindings.go b/pkg/gui/keybindings.go
index b009f8f3d..558038714 100644
--- a/pkg/gui/keybindings.go
+++ b/pkg/gui/keybindings.go
@@ -594,7 +594,7 @@ func (gui *Gui) GetInitialKeybindings() []*Binding {
},
{
ViewName: "files",
- Key: gocui.KeyEnter,
+ Key: gui.getKey("universal.goInto"),
Modifier: gocui.ModNone,
Handler: gui.handleEnterFile,
Description: gui.Tr.SLocalize("StageLines"),
@@ -608,7 +608,7 @@ func (gui *Gui) GetInitialKeybindings() []*Binding {
},
{
ViewName: "files",
- Key: gui.getKey("files.executeCustomCommand"),
+ Key: gui.getKey("universal.executeCustomCommand"),
Modifier: gocui.ModNone,
Handler: gui.handleCustomCommand,
Description: gui.Tr.SLocalize("executeCustomCommand"),
@@ -632,7 +632,7 @@ func (gui *Gui) GetInitialKeybindings() []*Binding {
{
ViewName: "branches",
Contexts: []string{"local-branches"},
- Key: gui.getKey("branches.checkoutBranchesByName"),
+ Key: gui.getKey("branches.checkoutBranchByName"),
Modifier: gocui.ModNone,
Handler: gui.handleCheckoutByName,
Description: gui.Tr.SLocalize("checkoutByName"),
@@ -719,13 +719,13 @@ func (gui *Gui) GetInitialKeybindings() []*Binding {
},
{
ViewName: "branches",
- Key: gui.getKey("branches.nextBranchTab"),
+ Key: gui.getKey("universal.nextBranchTab"),
Modifier: gocui.ModNone,
Handler: gui.handleNextBranchesTab,
},
{
ViewName: "branches",
- Key: gui.getKey("branches.prevBranchTab"),
+ Key: gui.getKey("universal.prevBranchTab"),
Modifier: gocui.ModNone,
Handler: gui.handlePrevBranchesTab,
},
@@ -760,14 +760,14 @@ func (gui *Gui) GetInitialKeybindings() []*Binding {
},
{
ViewName: "commits",
- Key: gui.getKey("commits.resetToThisCommit"),
+ Key: gui.getKey("commits.viewResetOptions"),
Modifier: gocui.ModNone,
Handler: gui.handleCreateCommitResetMenu,
Description: gui.Tr.SLocalize("resetToThisCommit"),
},
{
ViewName: "commits",
- Key: gui.getKey("commits.fixupCommit"),
+ Key: gui.getKey("commits.markCommitAsFixup"),
Modifier: gocui.ModNone,
Handler: gui.handleCommitFixup,
Description: gui.Tr.SLocalize("fixupCommit"),
@@ -858,7 +858,7 @@ func (gui *Gui) GetInitialKeybindings() []*Binding {
},
{
ViewName: "commits",
- Key: gui.getKey("commits.viewCommitFiles"),
+ Key: gui.getKey("universal.goInto"),
Modifier: gocui.ModNone,
Handler: gui.handleSwitchToCommitFilesPanel,
Description: gui.Tr.SLocalize("viewCommitFiles"),
@@ -977,7 +977,7 @@ func (gui *Gui) GetInitialKeybindings() []*Binding {
},
{
ViewName: "commitFiles",
- Key: gocui.KeyEnter,
+ Key: gui.getKey("universal.goInto"),
Modifier: gocui.ModNone,
Handler: gui.handleEnterCommitFile,
Description: gui.Tr.SLocalize("enterFile"),
@@ -1341,7 +1341,7 @@ func (gui *Gui) GetInitialKeybindings() []*Binding {
{
ViewName: "branches",
Contexts: []string{"remotes"},
- Key: gocui.KeyEnter,
+ Key: gui.getKey("universal.goInto"),
Modifier: gocui.ModNone,
Handler: gui.handleRemoteEnter,
},