Skip to content

feat(keys): add move_tab_left and move_tab_right bindings - #4

Open
nierz wants to merge 7 commits into
tvaintrob:masterfrom
nierz:feat/move-tab-keybindings
Open

nierz wants to merge 7 commits into
tvaintrob:masterfrom
nierz:feat/move-tab-keybindings

Conversation

@nierz

@nierz nierz commented Aug 10, 2026

Copy link
Copy Markdown

Adds two optional keybindings to move the active tab one position left or right, so tabs can be reordered from the keyboard.

[keys]
move_tab_left = "ctrl+shift+left"
move_tab_right = "ctrl+shift+right"

Why

Tab reordering already works — but only by mouse drag. Workspace::move_tab and the tab.move socket API both exist; there was simply no keybinding wired to them. This closes that gap for keyboard-driven users (tmux's swap-window habit).

Notes

  • Both unset by default, so no existing binding changes.
  • Movement is clamped at the ends rather than wrapping — moving the first tab left is a no-op, matching how the drag behaviour already works.
  • Routes through move_tab_via_api so the move is broadcast identically to a mouse-driven one, rather than mutating workspace state directly.
  • Registered in all the usual places: NavigateAction variants, both dispatch paths, keys config, keybind help overlay, the default-config template, and the config reference.

Tests

cargo test --release --bin herdr -- --test-threads=12638 passed.

Depends on #2

master currently fails to compile under cfg(test) (NextBlockedAgent missing from a test-only match), so no tests run until #2 lands. The count above was measured with that fix applied locally, and CI here will stay red until #2 merges.

Note that #2 also needs to add keys.next_blocked_agent to the config reference — scripts/config_reference_check.py currently fails on master for that key independently of this PR.

🤖 Generated with Claude Code

tvaintrob and others added 7 commits July 16, 2026 13:30
Add ui.tab_bar_position, ui.show_clock, and ui.prefix_hint to the
versioned config reference so it stays in sync with the config model.
…ts (tvaintrob#1)

Adds a new configurable keybinding `next_blocked_agent` that focuses the
next agent in blocked state, wrapping around when reaching the end.
This allows quickly jumping to agents that need human input without
cycling through idle/working agents.

Configuration (in config.toml):
  [keys]
  next_blocked_agent = "prefix+shift+n"

Co-authored-by: tamir altshuler <tamir@tamirs-MacBook-Pro.local>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Adds two optional keybindings that move the active tab one position left
or right, so tabs can be reordered from the keyboard. Reordering was
previously mouse-drag only — Workspace::move_tab and the tab.move socket
API already existed, but nothing was bound to them.

Both are unset by default, so no existing binding changes. Example:

    [keys]
    move_tab_left = "ctrl+shift+left"
    move_tab_right = "ctrl+shift+right"

Movement is clamped at the ends rather than wrapping, and routes through
move_tab_via_api so the change is broadcast like a mouse-driven move.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants