# Use reattach-to-user-namespace so pbcopy/pbpaste work again.
# Use 256 color terminal
set-option -g default-terminal screen-256color
# Use C-t as my tmux prefix key
# set-option -g prefix C-t
# Other keybindings.
bind-key k kill-pane
bind-key r source-file ~/.tmux.conf \; display-message "Config reloaded..."
#bind-key '"' split-window -h
#bind-key % split-window
# I like screen's method of repeating the prefix key to switch
# back and forth between windows.
bind-key C-t last-window
# I want messages to be displayed long enough to read.
set-option -g display-time 2000
# Make it easy to open a new ssh window
bind-key S command-prompt "new-window -n %1 'ssh -oStrictHostKeyChecking=no %1'"
bind-key U command-prompt "new-window -n ubuntu@%1 'ssh -oStrictHostKeyChecking=no -l ubuntu %1'"
bind-key R command-prompt "new-window -n root@%1 'ssh -oStrictHostKeyChecking=no -l root %1'"
bind-key C-R respawn-window
# Make it easy to open a man page
bind-key / command-prompt "split-window -p 33 'man %1'"
# Pretty colors
source-file ~/zenburn.conf
# Layout
set-window-option -g aggressive-resize on
# Don't destroy windows on exit
set-window-option -g remain-on-exit on
# Easily move windows left and right
#bind-key Left swap-window -t -1
#bind-key Right swap-window -t +1
ini 我的Tmux配置风味
# Send Prefix
set-option -g prefix C-a
unbind-key C-a
bind-key C-a send-prefix
# Use Alt-arrow keys to switch panes
bind -n M-Left select-pane -L
bind -n M-Right select-pane -R
bind -n M-Up select-pane -U
bind -n M-Down select-pane -D
# Shift arrow to switch windows
bind -n S-Left previous-window
bind -n S-Right next-window
# Mouse Mode
set -g mouse on
# Set easier window split keys
bind-key v split-window -h
bind-key h split-window -v