mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-05-11 20:36:03 +02:00
update options
This commit is contained in:
parent
5dbe262d2d
commit
001ea1002d
3 changed files with 18 additions and 15 deletions
|
@ -108,15 +108,15 @@ func handleIgnoreFile(g *gocui.Gui, v *gocui.View) error {
|
||||||
|
|
||||||
func renderfilesOptions(g *gocui.Gui, gitFile *GitFile) error {
|
func renderfilesOptions(g *gocui.Gui, gitFile *GitFile) error {
|
||||||
optionsMap := map[string]string{
|
optionsMap := map[string]string{
|
||||||
"tab": "next panel",
|
"← → ↑ ↓": "navigate",
|
||||||
"S": "stash files",
|
"S": "stash files",
|
||||||
"c": "commit changes",
|
"c": "commit changes",
|
||||||
"o": "open",
|
"o": "open",
|
||||||
"s": "open in sublime",
|
"s": "sublime",
|
||||||
"v": "open in vscode",
|
"v": "vscode",
|
||||||
"i": "ignore",
|
"i": "ignore",
|
||||||
"d": "delete",
|
"d": "delete",
|
||||||
"space": "toggle staged",
|
"space": "toggle staged",
|
||||||
}
|
}
|
||||||
if state.HasMergeConflicts {
|
if state.HasMergeConflicts {
|
||||||
optionsMap["a"] = "abort merge"
|
optionsMap["a"] = "abort merge"
|
||||||
|
|
5
gui.go
5
gui.go
|
@ -67,7 +67,10 @@ func handleRefresh(g *gocui.Gui, v *gocui.View) error {
|
||||||
}
|
}
|
||||||
|
|
||||||
func keybindings(g *gocui.Gui) error {
|
func keybindings(g *gocui.Gui) error {
|
||||||
if err := g.SetKeybinding("", gocui.KeyTab, gocui.ModNone, nextView); err != nil {
|
if err := g.SetKeybinding("", gocui.KeyArrowRight, gocui.ModNone, nextView); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
if err := g.SetKeybinding("", gocui.KeyArrowLeft, gocui.ModNone, previousView); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
if err := g.SetKeybinding("", 'q', gocui.ModNone, quit); err != nil {
|
if err := g.SetKeybinding("", 'q', gocui.ModNone, quit); err != nil {
|
||||||
|
|
|
@ -236,11 +236,11 @@ func switchToMerging(g *gocui.Gui) error {
|
||||||
|
|
||||||
func renderMergeOptions(g *gocui.Gui) error {
|
func renderMergeOptions(g *gocui.Gui) error {
|
||||||
return renderOptionsMap(g, map[string]string{
|
return renderOptionsMap(g, map[string]string{
|
||||||
"up/down": "pick hunk",
|
"↑ ↓": "select hunk",
|
||||||
"left/right": "previous/next commit",
|
"← →": "navigate conflicts",
|
||||||
"space": "pick hunk",
|
"space": "pick hunk",
|
||||||
"b": "pick both hunks",
|
"b": "pick both hunks",
|
||||||
"z": "undo",
|
"z": "undo",
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue