From 52f41ab0d5f367cd01ab385d0ad500833b6baa8a Mon Sep 17 00:00:00 2001 From: Jesse Duffield Date: Sat, 28 Mar 2020 14:08:54 +1100 Subject: [PATCH] update cheatsheet --- docs/keybindings/Keybindings_en.md | 43 +++++++++++++++++++++++++++++- docs/keybindings/Keybindings_nl.md | 43 +++++++++++++++++++++++++++++- docs/keybindings/Keybindings_pl.md | 43 +++++++++++++++++++++++++++++- pkg/gui/keybindings.go | 18 +++++++------ pkg/i18n/english.go | 15 +++++++++++ 5 files changed, 151 insertions(+), 11 deletions(-) diff --git a/docs/keybindings/Keybindings_en.md b/docs/keybindings/Keybindings_en.md index beeecea33..ed8416305 100644 --- a/docs/keybindings/Keybindings_en.md +++ b/docs/keybindings/Keybindings_en.md @@ -40,7 +40,11 @@ f: fast-forward this branch from its upstream g: view reset options R: rename branch + ,: previous page + .: next page + <: scroll to top /: start search + >: scroll to bottom ## Branches Panel (Remote Branches (in Remotes tab)) @@ -53,7 +57,11 @@ d: delete branch r: rebase checked-out branch onto this branch u: set as upstream of checked-out branch + ,: previous page + .: next page + <: scroll to top /: start search + >: scroll to bottom ## Branches Panel (Remotes Tab) @@ -63,7 +71,11 @@ n: add new remote d: remove remote e: edit remote + ,: previous page + .: next page + <: scroll to top /: start search + >: scroll to bottom ## Branches Panel (Tags Tab) @@ -74,7 +86,11 @@ P: push tag n: create tag g: view reset options + ,: previous page + .: next page + <: scroll to top /: start search + >: scroll to bottom ## Commit Files Panel @@ -86,7 +102,11 @@ o: open file space: toggle file included in patch enter: enter file to add selected lines to the patch + ,: previous page + .: next page + <: scroll to top /: start search + >: scroll to bottom ## Commits Panel @@ -94,7 +114,6 @@
   ]: next tab
   [: previous tab
-  /: start search
 
## Commits Panel (Commits Tab) @@ -122,6 +141,11 @@ i: select commit to diff with another commit T: tag commit ctrl+r: reset cherry-picked (copied) commits selection + ,: previous page + .: next page + <: scroll to top + /: start search + >: scroll to bottom ## Commits Panel (Reflog Tab) @@ -129,6 +153,11 @@
   space: checkout commit
   g: view reset options
+  ,: previous page
+  .: next page
+  <: scroll to top
+  /: start search
+  >: scroll to bottom
 
## Files Panel @@ -151,7 +180,11 @@ enter: stage individual hunks/lines f: fetch g: view upstream reset options + ,: previous page + .: next page + <: scroll to top /: start search + >: scroll to bottom ## Main Panel (Merging) @@ -214,7 +247,11 @@
   esc: close menu
   q: close menu
+  ,: previous page
+  .: next page
+  <: scroll to top
   /: start search
+  >: scroll to bottom
 
## Stash Panel @@ -223,7 +260,11 @@ space: apply g: pop d: drop + ,: previous page + .: next page + <: scroll to top /: start search + >: scroll to bottom ## Status Panel diff --git a/docs/keybindings/Keybindings_nl.md b/docs/keybindings/Keybindings_nl.md index 74940b4b5..9b26b0ce8 100644 --- a/docs/keybindings/Keybindings_nl.md +++ b/docs/keybindings/Keybindings_nl.md @@ -40,7 +40,11 @@ f: fast-forward this branch from its upstream g: bekijk reset opties R: rename branch + ,: previous page + .: next page + <: scroll to top /: start search + >: scroll to bottom ## Branches Panel (Remote Branches (in Remotes tab)) @@ -53,7 +57,11 @@ d: verwijder branch r: rebase branch u: set as upstream of checked-out branch + ,: previous page + .: next page + <: scroll to top /: start search + >: scroll to bottom ## Branches Panel (Remotes Tab) @@ -63,7 +71,11 @@ n: add new remote d: remove remote e: edit remote + ,: previous page + .: next page + <: scroll to top /: start search + >: scroll to bottom ## Branches Panel (Tags Tab) @@ -74,7 +86,11 @@ P: push tag n: create tag g: bekijk reset opties + ,: previous page + .: next page + <: scroll to top /: start search + >: scroll to bottom ## Commit bestanden Panel @@ -86,7 +102,11 @@ o: open bestand space: toggle file included in patch enter: enter file to add selected lines to the patch + ,: previous page + .: next page + <: scroll to top /: start search + >: scroll to bottom ## Commits Panel @@ -94,7 +114,6 @@
   ]: next tab
   [: previous tab
-  /: start search
 
## Commits Panel (Commits Tab) @@ -122,6 +141,11 @@ i: select commit to diff with another commit T: tag commit ctrl+r: reset cherry-picked (copied) commits selection + ,: previous page + .: next page + <: scroll to top + /: start search + >: scroll to bottom ## Commits Panel (Reflog Tab) @@ -129,6 +153,11 @@
   space: checkout commit
   g: bekijk reset opties
+  ,: previous page
+  .: next page
+  <: scroll to top
+  /: start search
+  >: scroll to bottom
 
## Bestanden Panel @@ -151,7 +180,11 @@ enter: stage individuele hunks/lijnen f: fetch g: view upstream reset options + ,: previous page + .: next page + <: scroll to top /: start search + >: scroll to bottom ## Hoofd Panel (Merging) @@ -214,7 +247,11 @@
   esc: close menu
   q: close menu
+  ,: previous page
+  .: next page
+  <: scroll to top
   /: start search
+  >: scroll to bottom
 
## Stash Panel @@ -223,7 +260,11 @@ space: toepassen g: pop d: drop + ,: previous page + .: next page + <: scroll to top /: start search + >: scroll to bottom ## Status Panel diff --git a/docs/keybindings/Keybindings_pl.md b/docs/keybindings/Keybindings_pl.md index 851274584..2fa2b8205 100644 --- a/docs/keybindings/Keybindings_pl.md +++ b/docs/keybindings/Keybindings_pl.md @@ -40,7 +40,11 @@ f: fast-forward this branch from its upstream g: view reset options R: rename branch + ,: previous page + .: next page + <: scroll to top /: start search + >: scroll to bottom ## Gałęzie Panel (Remote Branches (in Remotes tab)) @@ -53,7 +57,11 @@ d: usuń gałąź r: rebase branch u: set as upstream of checked-out branch + ,: previous page + .: next page + <: scroll to top /: start search + >: scroll to bottom ## Gałęzie Panel (Remotes Tab) @@ -63,7 +71,11 @@ n: add new remote d: remove remote e: edit remote + ,: previous page + .: next page + <: scroll to top /: start search + >: scroll to bottom ## Gałęzie Panel (Tags Tab) @@ -74,7 +86,11 @@ P: push tag n: create tag g: view reset options + ,: previous page + .: next page + <: scroll to top /: start search + >: scroll to bottom ## Commit files Panel @@ -86,7 +102,11 @@ o: otwórz plik space: toggle file included in patch enter: enter file to add selected lines to the patch + ,: previous page + .: next page + <: scroll to top /: start search + >: scroll to bottom ## Commity Panel @@ -94,7 +114,6 @@
   ]: next tab
   [: previous tab
-  /: start search
 
## Commity Panel (Commits Tab) @@ -122,6 +141,11 @@ i: select commit to diff with another commit T: tag commit ctrl+r: reset cherry-picked (copied) commits selection + ,: previous page + .: next page + <: scroll to top + /: start search + >: scroll to bottom ## Commity Panel (Reflog Tab) @@ -129,6 +153,11 @@
   space: checkout commit
   g: view reset options
+  ,: previous page
+  .: next page
+  <: scroll to top
+  /: start search
+  >: scroll to bottom
 
## Pliki Panel @@ -151,7 +180,11 @@ enter: zatwierdź pojedyncze linie f: fetch g: view upstream reset options + ,: previous page + .: next page + <: scroll to top /: start search + >: scroll to bottom ## Main Panel (Merging) @@ -214,7 +247,11 @@
   esc: close menu
   q: close menu
+  ,: previous page
+  .: next page
+  <: scroll to top
   /: start search
+  >: scroll to bottom
 
## Schowek Panel @@ -223,7 +260,11 @@ space: zastosuj g: wyciągnij d: porzuć + ,: previous page + .: next page + <: scroll to top /: start search + >: scroll to bottom ## Status Panel diff --git a/pkg/gui/keybindings.go b/pkg/gui/keybindings.go index 98a269b8f..accb30ede 100644 --- a/pkg/gui/keybindings.go +++ b/pkg/gui/keybindings.go @@ -1503,9 +1503,9 @@ func (gui *Gui) GetInitialKeybindings() []*Binding { {ViewName: listView.viewName, Contexts: []string{listView.context}, Key: gocui.MouseWheelUp, Modifier: gocui.ModNone, Handler: listView.handlePrevLine}, {ViewName: listView.viewName, Contexts: []string{listView.context}, Key: gui.getKey("universal.nextItem-alt"), Modifier: gocui.ModNone, Handler: listView.handleNextLine}, {ViewName: listView.viewName, Contexts: []string{listView.context}, Key: gui.getKey("universal.nextItem"), Modifier: gocui.ModNone, Handler: listView.handleNextLine}, - {ViewName: listView.viewName, Contexts: []string{listView.context}, Key: gui.getKey("universal.prevPage"), Modifier: gocui.ModNone, Handler: listView.handlePrevPage}, - {ViewName: listView.viewName, Contexts: []string{listView.context}, Key: gui.getKey("universal.nextPage"), Modifier: gocui.ModNone, Handler: listView.handleNextPage}, - {ViewName: listView.viewName, Contexts: []string{listView.context}, Key: gui.getKey("universal.gotoTop"), Modifier: gocui.ModNone, Handler: listView.handleGotoTop}, + {ViewName: listView.viewName, Contexts: []string{listView.context}, Key: gui.getKey("universal.prevPage"), Modifier: gocui.ModNone, Handler: listView.handlePrevPage, Description: gui.Tr.SLocalize("prevPage")}, + {ViewName: listView.viewName, Contexts: []string{listView.context}, Key: gui.getKey("universal.nextPage"), Modifier: gocui.ModNone, Handler: listView.handleNextPage, Description: gui.Tr.SLocalize("nextPage")}, + {ViewName: listView.viewName, Contexts: []string{listView.context}, Key: gui.getKey("universal.gotoTop"), Modifier: gocui.ModNone, Handler: listView.handleGotoTop, Description: gui.Tr.SLocalize("gotoTop")}, {ViewName: listView.viewName, Contexts: []string{listView.context}, Key: gocui.MouseWheelDown, Modifier: gocui.ModNone, Handler: listView.handleNextLine}, {ViewName: listView.viewName, Contexts: []string{listView.context}, Key: gocui.MouseLeft, Modifier: gocui.ModNone, Handler: listView.handleClick}, }...) @@ -1521,17 +1521,19 @@ func (gui *Gui) GetInitialKeybindings() []*Binding { bindings = append(bindings, []*Binding{ { ViewName: listView.viewName, + Contexts: []string{listView.context}, Key: gui.getKey("universal.startSearch"), Modifier: gocui.ModNone, Handler: openSearchHandler, Description: gui.Tr.SLocalize("startSearch"), }, { - ViewName: listView.viewName, - Contexts: []string{listView.context}, - Key: gui.getKey("universal.gotoBottom"), - Modifier: gocui.ModNone, - Handler: gotoBottomHandler, + ViewName: listView.viewName, + Contexts: []string{listView.context}, + Key: gui.getKey("universal.gotoBottom"), + Modifier: gocui.ModNone, + Handler: gotoBottomHandler, + Description: gui.Tr.SLocalize("gotoBottom"), }, }...) } diff --git a/pkg/i18n/english.go b/pkg/i18n/english.go index 3aa11224e..e2db241f0 100644 --- a/pkg/i18n/english.go +++ b/pkg/i18n/english.go @@ -1068,6 +1068,21 @@ func addEnglish(i18nObject *i18n.Bundle) error { }, &i18n.Message{ ID: "MustStashTitle", Other: "Must stash", + }, &i18n.Message{ + ID: "ConfirmationTitle", + Other: "Confirmation Panel", + }, &i18n.Message{ + ID: "prevPage", + Other: "previous page", + }, &i18n.Message{ + ID: "nextPage", + Other: "next page", + }, &i18n.Message{ + ID: "gotoTop", + Other: "scroll to top", + }, &i18n.Message{ + ID: "gotoBottom", + Other: "scroll to bottom", }, ) }