keys: g opens lazygit, t opens the tool chooser, l stays navigation

This commit is contained in:
Sam
2026-11-13 09:47:34 +11:00
parent cba45f82f8
commit 32fb35633a
9 changed files with 497 additions and 11 deletions

View File

@@ -227,9 +227,10 @@ func (m projectModel) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
case "t":
m.tools = true
return m, nil
case "l":
case "g":
// lazygit in the project folder: the tool that stages, excludes and
// commits. `t` is the chooser, as it is on every other pane.
// commits. `t` is the chooser, as it is on every other pane, and `l`
// stays a navigation key.
if err := openTool(m.folder, "lazygit"); err != nil {
m.err = err
}
@@ -248,13 +249,13 @@ func (m projectModel) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
}
}
return m, nil
case "(", "[":
case "(", "[", "h":
if m.tab > 0 {
m.tab--
m.scroll = 0
}
return m, nil
case ")", "]", "tab":
case ")", "]", "l", "tab":
if m.tab < len(projectTabs)-1 {
m.tab++
m.scroll = 0
@@ -320,8 +321,9 @@ func (m projectModel) View() string {
return helpOverlay("the project", [][2]string{
{"( )", "overview, git, facts, costs, settings, projects"},
{"t", "open a tool pane here (lazygit, yazi, nvim, …)"},
{"l", "lazygit, straight away"},
{"[ ] h l", "previous and next tab"},
{"g", "lazygit, straight away"},
{"h l", "previous and next tab"},
{"[ ]", "previous and next tab"},
{"↑ ↓ j k", "scroll"},
{"r", "read again"},
{"R", "rebuild every pane"},
@@ -373,7 +375,7 @@ func (m projectModel) View() string {
footer := hintLine([]string{
keyHint("( )", "tab"),
keyHint("t", "tools"),
keyHint("l", "lazygit"),
keyHint("g", "lazygit"),
keyHint("↑↓", "scroll"),
keyHint("r", "refresh"),
keyHint("R", "rebuild"),