TMUX
Created: 2025-11-30
Updated: 2025-11-30
Comprehensive TMUX notes including essential commands and configuration. Check out my dotfiles for complete development environment configs.
Comprehensive TMUX notes including essential commands and configuration. Check out my dotfiles for complete development environment configs.
<prefix> I<prefix> U<prefix> opt u~/.tmux/plugins/tpm/bin/clean_pluginstmux / tmux new -s {newSessionName} / <prefix> :new -s {newSessionName}<prefix> $tmux ls / <prefix> s<preifx> w<prefix> ): next session<prefix> (: previous sessiontmux a / tmux a -t {SessionName}<prefix> dtmux kill-session -t {SessionName} / <prefix> :kill-session<prefix> c<prefix> ,<prefix> l<prefix> {number}<prefix> n: next window<prefix> p: previous window<prefix> :swap-window -s {number} -t {number}<prefix> &<prefix> %<prefix> "<prefix> ;<prefix> {arrowKeys ← → ↑ ↓ }<prefix> q + {number}<prefix> { and <prefix> }<prefix> z<prefix> <C-{hjkl}> as vim<prefix> !<prefix> x<prefix> :join-pane -s 1 -t 0<prefix> :join-pane -s 0.0 -t 1.2brew install tmux
git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm
mkdir ~/.config/tmux
touch ~/.config/tmux/tmux.conf
vim ~/.config/tmux/tmux.conf
~/.config/tmux/tmux.conf
# NOTE: Use <leader><S-I> to install plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'christoomey/vim-tmux-navigator'
set -g @plugin 'tmux-plugins/tmux-resurrect' # persist tmux sessions after computer restart
set -g @plugin 'tmux-plugins/tmux-continuum'
-g @resurrect-capture-pane-contents
-g @continuum-restore
set-option -g default-terminal
set-option -ga terminal-overrides
set-option -g default-shell
set-option -g default-command
set-option -g status-position top
set-option -g mouse on
set-option -g set-clipboard on
set-option -g focus-events on
set-option -s escape-time 0
set-option -g prefix C-Space
unbind-key C-b
bind-key C-Space send-prefix
-g base-index 1
setw -g pane-base-index 1
unbind-key r
bind-key r source-file ~/.tmux.conf
set-window-option -g mode-keys vi
bind-key -T copy-mode-vi send -X begin-selection
bind-key -T copy-mode-vi send -X copy-selection
unbind-key -T copy-mode-vi MouseDragEnd1Pane
c new-window -c
unbind-key %
bind-key | split-window -h -c
unbind-key
bind-key - split-window -c
bind-key < swap-window -t -1
bind-key > swap-window -t +1
unbind-key j
unbind-key k
unbind-key h
unbind-key l
bind-key -r J resize-pane -D 1
bind-key -r K resize-pane -U 1
bind-key -r H resize-pane -L 2
bind-key -r L resize-pane -R 2
bind-key -r m resize-pane -Z
bind-key h previous-window
bind-key l next-window
bind-key j last-window
bind-key u run-shell
-g @plugin
-g @nova-nerdfonts
-g @nova-nerdfonts-left
-g @nova-nerdfonts-right
-g @nova-pane-active-border-style
-g @nova-pane-border-style
-g @nova-status-style-bg
-g @nova-status-style-fg
-g @nova-status-style-active-bg
-g @nova-status-style-active-fg
-g @nova-status-style-double-bg
-g @nova-pane
-g @nova-segment-mode
-g @nova-segment-mode-colors
if-shell \
\
-g @nova-segment-custom-colors
if-shell \
\
-g @nova-segment-whoami-colors
-g @nova-rows 0
-g @nova-segments-0-left
-g @nova-segments-0-right
run
# List of plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
# Other examples:
# set -g @plugin 'github_username/plugin_name'
# set -g @plugin 'github_username/plugin_name#branch'
# set -g @plugin 'git@github.com:user/plugin'
# set -g @plugin 'git@bitbucket.com:user/plugin'
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run '~/.tmux/plugins/tpm/tpm'