What
Every key inside herdr-plus's two TUIs is hardcoded. I'd love to be able to rebind them
from config.toml, the same way [worktree] branch_prefix is configurable today.
To be clear about scope: this isn't the [[keys.command]] binding covered in
docs/keybindings — that binds a
herdr key to launch the plugin. This is the keys inside the projects browser and the
quick-actions launcher, once they're open.
Current state
As of v0.1.20, in projectsmodel.go and quickactionspicker.go:
| Keys |
Action |
up, ctrl+p |
move highlight up |
down, ctrl+n |
move highlight down |
enter |
activate |
esc |
back / quit |
ctrl+c |
quit |
ctrl+g |
open as worktree (projects only) |
Why
Muscle memory differs, and the current set has no vim-style pair — coming from vim,
ctrl+k/ctrl+j is what my fingers reach for, and it isn't bound to anything. Rather
than argue about which extra defaults to bake in, letting people declare their own seems
like the more general answer.
One constraint worth stating, since it shapes any design: plain j/k can never be
navigation here. Both pickers filter continuously, so every printable rune has to go to
the query. Only modified keys are available. (fzf has the same constraint, and ships
ctrl-j/ctrl-k for exactly this reason.)
Possible shape
Something like a [keys] section in the optional config.toml that already holds
[worktree]:
[keys]
up = ["up", "ctrl+p", "ctrl+k"]
down = ["down", "ctrl+n", "ctrl+j"]
select = ["enter"]
cancel = ["esc"]
worktree = ["ctrl+g"]
Anything not listed keeps today's behavior, so an absent [keys] changes nothing.
That's only meant to show what I'm asking for — does something along these lines fit how
you think about the plugin's config?
What
Every key inside herdr-plus's two TUIs is hardcoded. I'd love to be able to rebind them
from
config.toml, the same way[worktree] branch_prefixis configurable today.To be clear about scope: this isn't the
[[keys.command]]binding covered indocs/keybindings — that binds a
herdr key to launch the plugin. This is the keys inside the projects browser and the
quick-actions launcher, once they're open.
Current state
As of v0.1.20, in
projectsmodel.goandquickactionspicker.go:up,ctrl+pdown,ctrl+nenterescctrl+cctrl+gWhy
Muscle memory differs, and the current set has no vim-style pair — coming from vim,
ctrl+k/ctrl+jis what my fingers reach for, and it isn't bound to anything. Ratherthan argue about which extra defaults to bake in, letting people declare their own seems
like the more general answer.
One constraint worth stating, since it shapes any design: plain
j/kcan never benavigation here. Both pickers filter continuously, so every printable rune has to go to
the query. Only modified keys are available. (fzf has the same constraint, and ships
ctrl-j/ctrl-kfor exactly this reason.)Possible shape
Something like a
[keys]section in the optionalconfig.tomlthat already holds[worktree]:Anything not listed keeps today's behavior, so an absent
[keys]changes nothing.That's only meant to show what I'm asking for — does something along these lines fit how
you think about the plugin's config?