The definitive guide to building a persistent, scriptable, multi-pane terminal workflow around Neovim, Git, Claude Code, and your entire TUI toolchain.
Tmux organizes everything into three levels: sessions contain windows (tabs), which contain panes (splits). Think of sessions as project contexts, windows as task groups within a project, and panes as side-by-side views for a single task.
One per project or context. Survive disconnects and reboots (with plugins). Switch instantly with fzf.
Tabs within a session. Name them for tasks: editor, server, tests, logs.
Splits within a window. Editor + terminal, logs side-by-side, etc.
tmux new -As name attaches to "name" if it exists, creates it otherwise. Use this as your default. Never manually check for existing sessions again.
Session groups share windows but maintain independent focus. Attach a grouped session on your second monitor and switch windows independently. This is the correct solution for multi-monitor tmux — not two separate sessions.
A complete, annotated configuration targeting tmux 3.2+. Every line exists to solve a real pain point. Copy wholesale or pick sections.
default-terminal and terminal-overrides only apply when the tmux server starts. source-file won't apply them — you must tmux kill-server and restart.
Tmux ships with five preset layouts accessible via prefix + Alt-1 through Alt-5, or cycle with prefix + Space. Click a layout below to see it in action.
:set main-pane-height 40 or :set main-pane-width 120. The main-vertical layout is ideal for an editor taking 2/3 of the screen with terminal panes stacked on the right.
The key integrations: unified navigation between tmux panes and Neovim splits, shared clipboard via OSC 52, and correct color/undercurl rendering.
Use Ctrl-h/j/k/l to move between tmux panes and Neovim splits transparently. The plugin detects whether the active pane is running Neovim and routes the key accordingly.
The modern approach. OSC 52 escape sequences tell your terminal to set the system clipboard — works transparently over SSH. Neovim 0.10+ has built-in support:
xclip/xsel instead.
Enter with prefix + [. With vi mode keys enabled, you get full vim-style navigation.
Install TPM first, then manage everything declaratively from tmux.conf.
status-right. If a theme plugin overwrites it, place continuum after the theme in your plugin list, or it silently stops saving.
One named session per repo. Switch instantly. Each session has windows for editor, server, tests, git.
Fuzzy-find over project directories, auto-create sessions on demand. The ThePrimeagen pattern.
Declarative YAML layout definitions per project. Reproducible dev environments.
lazygit, btop, Claude Code as floating popups. Dismiss and resume without losing state.
display-popup (tmux 3.2+) creates floating overlay windows. The key insight for stateful tools like Claude Code: back the popup with a hidden tmux session so closing the popup merely detaches, keeping the process alive.
Creates a unique background session per project directory. Dismiss the popup, summon it again — Claude is right where you left off.
"teammateMode": "tmux" in ~/.claude/settings.json and Claude automatically splits panes for each teammate agent. Claude can also read other panes via tmux capture-pane — run a dev server in one pane and tell Claude to monitor it.
The F12 toggle pattern disables all outer keybindings, passing everything through to the inner session. Status bar dims to show outer is disabled.
After reattaching over a new SSH connection, existing panes still reference the dead socket. Quick fix:
terminal-features xterm-kitty:RGBAll bindings assume prefix = C-a and the custom config from this guide. Type to filter.