Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .bb/plugins.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
{ "name": "slack", "source": "./plugins/slack" },
{ "name": "review-watch", "source": "./plugins/review-watch" },
{ "name": "pr-board", "source": "./plugins/pr-board" },
{ "name": "voice-transcription", "source": "./plugins/voice-transcription" }
{ "name": "voice-transcription", "source": "./plugins/voice-transcription" },
{ "name": "tmux-vim", "source": "./plugins/tmux-vim" }
]
}
2 changes: 1 addition & 1 deletion .github/workflows/plugins.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
strategy:
fail-fast: false
matrix:
plugin: [devbox-provider, github-watcher, html-preview, image-copy, kubernetes-provider, pr-board, pr-inbox, review-watch, stewards, team-setup, thread-briefs, workstreams]
plugin: [devbox-provider, github-watcher, html-preview, image-copy, kubernetes-provider, pr-board, pr-inbox, review-watch, stewards, team-setup, thread-briefs, tmux-vim, workstreams]
defaults:
run:
working-directory: plugins/${{ matrix.plugin }}
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ Plugins for [bb](https://getbb.app), maintained by Bit Complete.
| [review-watch](plugins/review-watch) | Queues the GitHub pull requests that need your review and opens a thread for one when you press Start |
| [pr-board](plugins/pr-board) | A plain-language board of your open GitHub pull requests: what can merge, what needs you, and who you wait on |
| [voice-transcription](plugins/voice-transcription) | Adds a voice-input service that transcribes through any OpenAI-compatible `/audio/transcriptions` endpoint from the server process |
| [tmux-vim](plugins/tmux-vim) | A tmux-style prefix key and vim-style keys for panes, threads and the sidebar, with a thread chooser, copy mode and pane resizing |

Install one:

Expand Down
2 changes: 2 additions & 0 deletions plugins/tmux-vim/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
dist/
node_modules/
61 changes: 61 additions & 0 deletions plugins/tmux-vim/PLUGIN_OVERVIEW.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
Move around bb without the mouse, using the keys you already know from tmux
and vim.

## What you get

- A **prefix key** (default `Ctrl-a`) followed by one key: `h` `j` `k` `l` to
move between panes, `Option-h` `j` `k` `l` to resize the focused pane (the
same keys work again without the prefix for a second), `v` or `s` to open a
thread, or start a new one, in a new pane to the right or below, `w` to open
one in the current pane, `c` for a new thread in the current pane, `z` to
zoom, `x` to close, `1` to `9`, `n` and `p` to switch threads, `?` for help.
- `Ctrl-h/j/k/l` to move between panes and into the sidebar without the prefix.
- **Browsing keys** while you are not typing: `j` `k` `Ctrl-d` `Ctrl-u` `gg`
`G` to scroll, `/` to find, `:` for the command palette, `H` `L` to switch
threads, `i` to type a message, `Space e` to toggle the sidebar, `,ff` for
the thread chooser and `,fg` for thread search.
- A **copy mode** like tmux's, for selecting conversation text without the
mouse: enter it with `v` or with the prefix then `[`, move with `h` `j` `k`
`l`, `w` `b` `e`, `0` `$`, `gg` `G` and more, press `v` to start selecting,
`y` to copy and `Escape` to leave.
- **Copy on select** (on by default): text you select with the mouse in a
conversation is copied when you release the button. The setting
`copyOnSelect` turns it off.
- A **thread chooser** popup and **sidebar keys**: `j` `k` to move, `Enter`,
`v` or `s` to open the thread here, to the right or below. When the chooser
was opened to split, its first row is **New thread**: `Enter` on it, or `c`
from any row, starts a new thread in the new pane.

## How it works

One key listener decides for every key press whether the cursor is in a text
field, the terminal, a dialog or a menu, and leaves the key alone there. Only
the prefix key and `Ctrl-h/j/k/l` are taken while you type; press the prefix
twice to send it through. The prefix key, the leader key, the timeouts and
where the keys apply can be changed under Settings, Installed plugins, or with
`bb plugin config tmux-vim set <key> <value>`.

Copying puts on the clipboard (where copied text waits until you paste it)
what `Cmd-C` would, because the plugin runs the browser's own Copy command.
If the browser refuses, the text is copied without formatting instead. Copy
mode works in conversations only, and a keyboard selection is lost when bb
unloads that part of a long conversation.

The plugin needs no account or network access. Several actions rely on bb's
page structure, last checked against the source code of bb 0.50.1, and may
need an update after a bb upgrade. Keys do not work while the cursor is inside
the embedded browser page, and "open below" also opens the thread in your
other bb windows. bb gives plugins no way to open a new pane with the New
thread screen in it, so a new thread in a new pane shows one of your existing
threads there for a moment before the New thread screen replaces it. bb's Back
button shows that thread again. bb has no call for resizing a pane either, so
the plugin imitates a mouse drag on the line between two panes; the steps are
coarse because bb pulls that line onto an even split when it comes close, and
nothing is resized while a pane is zoomed. The default keys were chosen for
macOS; on Windows and Linux `Ctrl-j`, `Ctrl-k`, `Ctrl-d` and `Ctrl-a` take
over shortcuts of bb itself unless you change the settings.

## For agents

The bundled `tmux-vim` skill lists the keys, the settings and the known limits,
so an agent can answer questions about this plugin or change a setting for you.
Loading