.tmux.conf

set -g default-terminal "screen-256color"
set -g display-time 3000                   
set -g escape-time 0
set -g history-limit 65535                 
set -g base-index 1                        
setw -g utf8 on                           

# split window
unbind '"'
bind - splitw -v # vertical split (prefix -)
unbind %
bind | splitw -h # horizontal split (prefix |)

# select pane
bind k selectp -U # above (prefix k)
bind j selectp -D # below (prefix j)
bind h selectp -L # left (prefix h)
bind l selectp -R # right (prefix l)

# resize pane
bind -r ^k resizep -U 5 # upward (prefix Ctrl+k)
bind -r ^j resizep -D 5 # downward (prefix Ctrl+j)
bind -r ^h resizep -L 5 # to the left (prefix Ctrl+h)
bind -r ^l resizep -R 5 # to the right (prefix Ctrl+l)

# swap pane
bind ^u swapp -U # swap with the previous pane (prefix Ctrl+u)
bind ^d swapp -D # swap with the next pane (prefix Ctrl+d)

# misc
bind e lastp  # select the last pane (prefix e)
bind ^e last  # select the last window (prefix Ctrl+e)
bind q killp  # kill pane (prefix q)
bind ^q killw # kill window (prefix Ctrl+q)

# copy mode
bind Escape copy-mode             # enter copy mode (prefix Escape)
bind ^p pasteb                    # paste buffer (prefix Ctrl+p)
bind -t vi-copy v begin-selection # select (v)
bind -t vi-copy y copy-selection  # copy (y)

# zoom pane <-> window
# see also: http://tmux.svn.sourceforge.net/viewvc/tmux/trunk/examples/tmux-zoom.sh
bind ^z run "tmux-zoom"

# app
bind ! splitw htop                                     # htop (prefix !)
bind m command-prompt "splitw 'exec man %%'"           # man (prefix m)
bind @ command-prompt "splitw 'exec perldoc -t -f %%'" # perl func (prefix @)
bind * command-prompt "splitw 'exec perldoc -t -v %%'" # perl var (prefix *)
bind % command-prompt "splitw 'exec perldoc -t %%'"    # perl doc (prefix %)
bind / command-prompt "splitw 'exec ri %%'"            # ruby doc (prefix /)

# reload config (prefix r)
bind r source ~/.tmux.conf \; display "Configuration reloaded!"

setw -g mode-keys vi
setw -g automatic-rename off

#-- colorscheme --#
# see also: https://github.com/daethorian/conf-tmux/blob/master/colors/zenburn.conf

# modes
setw -g clock-mode-colour colour223
setw -g mode-attr bold
setw -g mode-fg colour223
setw -g mode-bg colour235

# panes
set -g pane-border-bg default
set -g pane-border-fg colour234
set -g pane-active-border-bg default
set -g pane-active-border-fg green

# messages
set -g message-attr bold
set -g message-fg colour223
set -g message-bg default

#-- statusbar --#
set -g status-utf8 on
set -g status-interval 1
set -g status-keys vi
set -g status-justify left
set -g display-time 3000
#set -g status-bg default
#set -g status-fg white
#set-window-option -g window-status-current-attr default
#set-window-option -g window-status-current-fg red
#set-window-option -g window-status-current-bg default
#set -g status-left-length 15
#set -g status-right-length 55
##set -g status-left "#[fg=white,bg=blue] > #I #W < #[default] |" # 0:bash
#set -g status-left "#[fg=white,bg=default] > #S < #[default] |" # session-name
#set -g status-right "#[fg=red,bright][ #[fg=cyan]#H #[fg=red]]#[default] #[fg=yellow,bright]- %Y.%m.%d #[fg=green]%H:%M #[default]#[fg=magenta,bright](load: #(cat /proc/loadavg | cut -d \" \" -f 1,2,3))#[default]"


 #将激活控制台的快捷键由Ctrl+b修改为Ctrl+a,Ctrl+a是Screen的快捷键
set-option -g prefix C-a   
unbind-key C-b   
bind-key C-a send-prefix   
 
#添加自定义快捷键   
bind-key z kill-session                     #按z结束当前会话;相当于进入命令行模式后输入kill-session   
#bind-key h select-layout even-horizontal    #按h将当前面板布局切换为even-horizontal;相当于进入命令行模式后输入select-layout even-horizontal   
#bind-key v select-layout even-vertical      #按v将当前面板布局切换为even-vertical;相当于进入命令行模式后输入select-layout even-vertical   

你可能感兴趣的:(.tmux.conf)