flash.nvim-style navigation for tmux copy-mode: incremental multi-character search over the visible pane text, with jump labels. Type a few characters, matches narrow live, press the label next to the one you want, and the copy-mode cursor jumps there — extending your selection if one is active.
Screen.Recording.2026-07-18.at.4.15.52.am.mov
flash.nvim's workflow in visual mode: start a selection with v, press
s, type a string, press the label — and your selection now ends exactly
where you wanted. Nothing in the tmux ecosystem replicated that:
- tmux-jump only reads a single
character (a limitation of
tmux command-prompt -1, its input mechanism) and cancels copy-mode before jumping, destroying any active selection. - tmux-thumbs / tmux-fingers hint pre-defined patterns (URLs, paths, hashes) for copying, not free-text navigation.
- tmux's built-in copy-mode search (
/) searches the entire scrollback history, not just what you're looking at — and has no labels.
tmux can't hand a script a live keystroke stream — command-prompt gives you
one key per invocation. tmux-flash gets around this with the replica-pane
technique (pioneered by tmux-fingers):
- The trigger key runs
flash.sh, which snapshots the pane's visible text, geometry, cursor, and scroll position. - It spawns
flash.pyin a detached window andswap-panes it over the real pane. The replica owns its own tty, so it can read raw keystrokes in a loop and render matches/labels with ANSI styling. Your real pane sits untouched in the background window, still in copy-mode, selection and scroll intact. - When you pick a target, the replica swaps itself back out and positions
the real pane's copy-mode cursor using plain cursor motions
(
top-line/cursor-down/cursor-right). Motions — unlike any kind of goto — extend an active selection, which is what makes thev→ search → label workflow behave exactly like flash.nvim.
Behavior deliberately mirrors flash.nvim's defaults:
| flash.nvim | tmux-flash |
|---|---|
| exact-match search mode | same |
| smartcase (lowercase = insensitive) | same |
| labels shown from the first typed character | same |
| label drawn after the match | same |
| labels that could continue the search are skipped | same |
| matches labeled nearest-to-cursor first | same |
| backdrop dimming | same |
| jump lands on match start | same |
set -g @plugin 'AndreVicencio/tmux-flash'Then prefix + I to install.
git clone https://github.com/AndreVicencio/tmux-flash ~/.config/tmux/tmux-flash# in tmux.conf
run-shell ~/.config/tmux/tmux-flash/flash.tmux| Key | Action |
|---|---|
prefix + [ |
enter copy-mode (tmux built-in) |
s |
start flash search |
| type characters | narrow matches live |
| label key | jump to that match |
Enter |
jump to the closest match |
Backspace |
edit the pattern |
Esc / Ctrl-C |
cancel, leaving copy-mode state untouched |
The selection workflow: prefix + [ → v → s → type → label →
selection now spans from your anchor to the target → y to yank.
Set in tmux.conf (defaults shown):
set -g @flash-key 's' # trigger key in copy-mode-vi
set -g @flash-labels 'asdfghjklqwertyuiopzxcvbnm' # label alphabet, in order- tmux ≥ 3.1 (needs the
copy_cursor_x/yformats; developed and tested on 3.6) - Python 3 (preinstalled on macOS with the developer tools, and on effectively every Linux distro — no third-party packages used)
mode-keys vi(set-window-option -g mode-keys vi) — the binding lives in thecopy-mode-vikey table
No dependency on any other tmux plugin. TPM is optional (see manual install). Coexists happily with tmux-yank, vim-tmux-navigator, catppuccin, resurrect/continuum, etc.
- Searches the visible viewport only — by design, like flash.nvim's current window. Scroll first, then flash.
- While the search is active, a transient window named
flashexists in the session (the hidden half of the pane swap). It disappears the moment the search ends. - On lines containing double-width characters (CJK), the label may render visually shifted; the jump itself still lands on the correct character.
- flash.nvim by @folke — the behavior this plugin mirrors.
- tmux-fingers — origin of the replica-pane technique.