版本 tmux 2.1+
# Base settingsset -g default-terminal "screen-256color"set -g display-time 3000set -g escape-time 0set -g history-limit 65535set -g base-index 1set -g pane-base-index 1# Prefix bindset -g prefix C-aunbind C-bbind C-a send-prefix# Split windowbind - splitw -vbind | splitw -h# Select windowbind k select-pane -Ubind j select-pane -Dbind h select-pane -Lbind l select-pane -Rbind -r C-h select-window -t :-bind -r C-l select-window -t :+# Start mouseset-option -g mouse on# Copy --> vim modesetw -g mode-keys vi# Update config filebind R source-file ~/.tmux.conf \; display "Reloaded!"set -g status-bg colour235set -g status-fg whiteset-option -g status-justify centreset-option -g status-left '#[bg=black,fg=green][#[fg=cyan]#(echo $USER)@#H#[fg=red]:#[fg=blue]#S#[fg=green]]'set-option -g status-left-length 30setw -g automatic-rename onset-window-option -g window-status-format '#[dim]#I:#[default]#W#[fg=grey,dim]'set-window-option -g window-status-current-format '#[fg=cyan,bold]#I#[fg=blue]:#[fg=cyan]#W#[fg=dim]'set-window-option -g window-status-current-fg colour208set -g status-right '#[fg=green][#[fg=cyan]%H:%M %Y-%m-%d#[fg=green]]'# List of pluginsset -g @plugin 'tmux-plugins/tpm'set -g @plugin 'tmux-plugins/tmux-sensible'set -g @plugin 'nhdaly/tmux-better-mouse-mode'# Plugin optionsset -g @scroll-speed-num-lines-per-scroll 3# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)run '~/.tmux/plugins/tpm/tpm'
