1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-05-29 23:17:32 +02:00

Add global binding to open recent repos

This commit is contained in:
Liberatys 2021-05-27 16:22:33 +02:00 committed by Jesse Duffield
parent f92fcfbb47
commit 44f7fc6f7c
3 changed files with 10 additions and 0 deletions

View File

@ -98,6 +98,7 @@ keybinding:
optionMenu-alt1: '?' # show help menu
select: '<space>'
goInto: '<enter>'
openRecentRepos: '<c-r>'
confirm: '<enter>'
confirm-alt1: 'y'
remove: 'd'

View File

@ -160,6 +160,7 @@ type KeybindingUniversalConfig struct {
DiffingMenu string `yaml:"diffingMenu"`
DiffingMenuAlt string `yaml:"diffingMenu-alt"`
CopyToClipboard string `yaml:"copyToClipboard"`
OpenRecentRepos string `yaml:"openRecentRepos"`
SubmitEditorText string `yaml:"submitEditorText"`
AppendNewline string `yaml:"appendNewline"`
ExtrasMenu string `yaml:"extrasMenu"`
@ -372,6 +373,7 @@ func GetDefaultConfig() *UserConfig {
New: "n",
Edit: "e",
OpenFile: "o",
OpenRecentRepos: "<c-r>",
ScrollUpMain: "<pgup>",
ScrollDownMain: "<pgdown>",
ScrollUpMainAlt1: "K",

View File

@ -231,6 +231,13 @@ func (gui *Gui) GetInitialKeybindings() []*Binding {
Modifier: gocui.ModNone,
Handler: gui.handleTopLevelReturn,
},
{
ViewName: "",
Key: gui.getKey(config.Universal.OpenRecentRepos),
Handler: gui.handleCreateRecentReposMenu,
Alternative: "<c-r>",
Description: gui.Tr.SwitchRepo,
},
{
ViewName: "",
Key: gui.getKey(config.Universal.ScrollUpMain),