tmux配置

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-option -g status off #set-option -g status on #set-option -g status-interval 2 #set-option -g status-utf8 on #set-option -g status-justify “centre” #set-option -g status-left-length 60 #set-option -g status-right-length 90 #set-option -g status-left “#(~/path/to/tmux-powerline/powerline.sh left)” #set-option -g status-right “#(~/path/to/tmux-powerline/powerline.sh right)” #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 white #set-window-option -g window-status-current-bg default #set -g status-left-length 15 #set -g status-right-length 65 ##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=color243,bright][ #[fg=white]#H #[fg=white]]#[default] #[fg=color243,bright]- %Y.%m.%d #[fg=white]%H:%M " ##set-option -g status-left “#(~/path/to/tmux-powerline/powerline.sh left)” ##set-option -g status-right “#(~/path/to/tmux-powerline/powerline.sh right)” #将激活控制台的快捷键由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 #set -g status-left-length 52 #set -g status-right-length 451 #set -g status-fg white #set -g status-bg colour234 #set -g window-status-activity-attr bold set -g pane-border-fg colour245 set -g pane-active-border-fg colour39 #set -g message-fg colour16 #set -g message-bg colour221 #set -g message-attr bold #set -g status-left '#[fg=colour235,bg=colour252,bold] ❐ #S #[fg=colour252,bg=colour238,nobold]⮀#[fg=colour245,bg=colour238,bold] #(whoami) #[fg=colour238,bg=colour234,nobold]⮀' #set -g window-status-format "#[fg=white,bg=colour234] #I #W " #set -g window-status-current-format #[fg=colour234,bg=colour39]⮀#[fg=colour25,bg=colour39,noreverse,bold] #I ⮁ #W #[fg=colour39,bg=colour234,nobold]⮀"

你可能感兴趣的:(tmux配置)