贴个配置文件,版本大于1.7
#!/usr/local/bin/tmux
# vim: syntax=tmux
# rebind bind key (screen)
#set -g prefix C-a
#bind C-a last-window
#
bind C-b last-window
bind C-z run-shell '/usr/local/bin/
tmux-zoom.sh'
# reload config
bind r source-file ~/.tmux.conf \; display-message "Config reloaded..."
# troggle statusbar
bind q set status
# display time
set -g display-time 2500
set -g history-limit 65535
# Look good
#set -g default-terminal "screen-256color"
# Start tab numbering at 1
set -g base-index 1
# Enable mouse support
setw -g mode-mouse off
set -g mouse-select-pane on
set -g mouse-resize-pane on
set -g mouse-select-window on
# enable resize for attaching via different resolution display
setw -g aggressive-resize on
# enable monitor
setw -g monitor-activity on
set -g visual-activity on
# Act like Vim
setw -g mode-keys vi
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
# use different keys to split vertical and horizonal
bind | split-window -h
bind - split-window -v
bind -n M-v split-window -h
bind -n M-s split-window -v
#--Status-Bar-------------------------------------------------------------------
# status bar
set -g status-utf8 on
# Default colors
set -g status-bg black
set -g status-fg white
## Left side of status bar : Show session-name and host-name
set -g status-left-length 20
set -g status-left '#[fg=green][#[bg=black,fg=cyan]#S#[fg=green]]'
## Middle of status bar, window labels
#Inactive
setw -g window-status-format '#[fg=cyan,dim]#I#[fg=blue]:#[default]#W#[fg=grey,dim]#F'
# Current or active
setw -g window-status-current-format '#[bg=blue,fg=cyan,bold]#I#[bg=blue,fg=cyan]:#[fg=white]#W#[fg=dim]#F'
# Alerted window in status bar. Windows which have an alert (bell, activity or content).
setw -g window-status-bell-fg red
setw -g window-status-bell-bg white
## Right side of status bar
# show current window title, date and time in my choice of colors
set -g status-right '#[fg=green][#[fg=white]#T#[fg=green]][#[fg=blue]%Y-%m-%d #[fg=white]%H:%M#[default]#[fg=green]]'
set -g status-position top