The sane tmux config, explained line by line

Every tmux thread ends the same way: someone posts a 400-line config, someone else says the defaults are fine, and a third person quietly links the same ten fixes everyone actually uses. These are those fixes — each line with its why, so you own your config instead of cargo-culting it.

The whole thing

Copy this, read the rest of the page to understand it, delete what you disagree with:

~/.tmux.conf
# terminal & colors — see the colors guide for the deep dive
set -g default-terminal "tmux-256color"
set -ga terminal-features ",*:RGB"

# behavior
set -g mouse on               # wheel, click-to-focus, drag borders
set -g history-limit 50000    # default scrollback is tiny
set -g escape-time 10         # kill the Esc lag in vim
set -g focus-events on        # let vim/nvim see focus changes
set -g set-clipboard on       # copies reach the OS clipboard (OSC 52)

# numbering that matches your keyboard
set -g base-index 1
setw -g pane-base-index 1
set -g renumber-windows on

# keys that make sense
bind | split-window -h -c "#{pane_current_path}"
bind - split-window -v -c "#{pane_current_path}"
bind c new-window -c "#{pane_current_path}"
bind r source-file ~/.tmux.conf \; display "reloaded"

# vi copy mode: v selects, y copies, like god intended
setw -g mode-keys vi
bind -T copy-mode-vi v send -X begin-selection
bind -T copy-mode-vi y send -X copy-selection-and-cancel

The two terminal lines (the ones people get wrong)

default-terminal tells programs *inside* tmux what they're running in — it must be a tmux-* or screen-* value, and tmux-256color enables italics and modern features where plain screen-256color doesn't. terminal-features ",*:RGB" tells tmux the *outer* terminal can do 24-bit color. Miss either and your editor theme looks washed out — this pair is the answer to the two most-viewed tmux questions on Stack Exchange.

escape-time: the vim-feel fix

tmux waits 500ms by default after Esc to see if it's the start of an escape sequence. vim users feel that as mode-switch lag every few seconds, forever. 10 is effectively instant and safe on any modern setup; neovim's :checkhealth explicitly asks for ≤ 300.

The split keys

% and " are the most-mocked defaults in tmux. | and - are pictograms of what they create. The -c '#{pane_current_path}' part matters more than the keys: without it, new panes open in the directory where the session started, which is never where you are now.

What deliberately isn't here

No prefix remap (C-b is fine for most people, and default muscle memory works on every server you'll ever SSH into — remap to C-a or C-Space only once you know you want it). No theme (looks are personal; the status bar section of the generator has a quiet baseline). No plugins (add tmux-resurrect when you know you need reboot persistence, not before). A config you fully understand beats an impressive one.

Reload and verify

Apply with tmux source ~/.tmux.conf (or your new prefix r). Two verification tricks worth knowing: tmux info | grep -i rgb confirms true color registered, and if something misbehaves, tmux -f /dev/null starts a totally clean instance for comparison — the fastest way to prove whether your config or your terminal is at fault.

Verified against tmux 3.6 · updated July 2026 · more guides · cheat sheet