My Tmux Setup: A Keyboard-First Terminal Multiplexer
My Tmux Setup
Most developers never touch tmux until they are forced to. And when they finally do, they usually suffer through the default keybindings long enough to convince themselves they don't need it. The truth is that tmux is only as good as its config, and with the right few lines, it becomes the terminal experience you have been missing.
Here is how I turned a stock tmux into a keyboard-first multiplexer that matches my Neovim workflow.
Breaking the Default Mould
The first thing I did was unbind the default Ctrl+b prefix. Reaching across the keyboard for a stretch key feels wrong when your hands are already in home position. I moved everything to Ctrl+a, which sits comfortably under the left thumb:
unbind C-b
set-option -g prefix C-a
bind-key C-a send-prefix
Two lines and suddenly the multiplexer stops fighting your muscle memory.
Vim-Style Pane Navigation
The biggest productivity boost came from making tmux behave like Vim. I bound pane navigation to hjkl and split to _ (horizontal) and - (vertical), both opening in the current directory:
bind _ split-window -h -c "#{pane_current_path}"
bind - split-window -v -c "#{pane_current_path}"
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
bind -r H resize-pane -L 5
bind -r J resize-pane -D 5
bind -r K resize-pane -U 5
bind -r L resize-pane -R 5
The -r flag on the resize bindings enables repeat, so I can hold H and keep resizing without pressing the prefix again. Resizing a pane becomes a continuous motion instead of a key-chord marathon.
Copy Mode: Vi Keys
I enabled vi mode for copy mode and mapped the essentials:
set-window-option -g mode-keys vi
bind-key -T copy-mode-vi v send-keys -X begin-selection
bind-key -T copy-mode-vi y send-keys -X copy-selection-and-cancel
bind p paste-buffer
Now v starts a selection, y copies and exits, and p pastes, identical to Vim, which means zero context switching between my editor and my terminal.
Windows, Sessions & Safety Nets
A few bindings keep window management fast: w creates a new window, n/p cycle through them, and X asks for confirmation before killing a pane. I also enabled mouse on for the occasional scroll-back and set base-index 1 so windows and panes start at 1 instead of 0.
For long-running work, I rely on tmux-resurrect, a plugin that restores my entire session after a reboot. Combined with session-created hooks that name sessions after their directory, my terminal looks exactly the way I left it, every single time.
The Aesthetic
Since my entire setup uses the GitHub Dark palette, I carried it into tmux: muted gray status text on a #0d1117 background, a blue highlight for the active window, and matching pane borders. It sounds trivial, but a terminal that visually matches your editor reduces the mental context switch with every glance.
Conclusion
Tmux's real power is not in what it does out of the box, it is in what it can become. By relocating the prefix, adopting vim keys, and persisting sessions, my terminal went from a tool I tolerated to the surface I work on all day.
The full configuration lives in my dotfiles repository, fork it and make it yours.