Created
July 2, 2014 06:36
-
-
Save jouyouyun/0eef11478916f0714d4c to your computer and use it in GitHub Desktop.
tmux
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#此类配置可以在命令行模式中输入show-options -g查询 | |
#窗口的初始序号;默认为0,这里设置为1 | |
set-option -g base-index 1 | |
#提示信息的持续时间;设置足够的时间以避免看不清提示,单位为毫秒 | |
set-option -g display-time 5000 | |
#控制台激活后的持续时间;设置合适的时间以避免每次操作都要先激活控制台,单位为毫秒 | |
set-option -g repeat-time 1000 | |
#操作状态栏时的默认键盘布局;可以设置为vi或emacs | |
set-option -g status-keys vi | |
#状态栏右方的内容;这里的设置将得到类似23:59的显示 | |
#set-option -g status-right "#(date +%H:%M' ')" | |
#状态栏右方的内容长度;建议把更多的空间留给状态栏左方(用于列出当前窗口) | |
#set-option -g status-right-length 10 | |
#开启状态栏的UTF-8支持 | |
set-option -g status-utf8 on | |
#此类设置可以在命令行模式中输入show-window-options -g查询 | |
#复制模式中的默认键盘布局;可以设置为vi或emacs | |
set-window-option -g mode-keys vi | |
# Copy and paste like in vim | |
#unbind [ | |
#bind Escape copy-mode | |
bind -t vi-copy 'v' begin-selection | |
bind -t vi-copy 'y' copy-selection | |
bind y run "tmux save-buffer - | xclip -sel clip -i" | |
#开启窗口的UTF-8支持 | |
set-window-option -g utf8 on | |
#将激活控制台的快捷键由Ctrl+b修改为Ctrl+x | |
set-option -g prefix C-a | |
unbind-key C-b | |
bind-key C-a send-prefix | |
#添加自定义快捷键 | |
#按z结束当前会话;相当于进入命令行模式后输入kill-session | |
bind-key z kill-session | |
#按h将当前面板布局切换为even-horizontal;相当于进入命令行模式后输入select-layout even-horizontal | |
bind-key h select-layout even-horizontal | |
#按v将当前面板布局切换为even-vertical;相当于进入命令行模式后输入select-layout even-vertical | |
bind-key v select-layout even-vertical | |
# 设置终端类型为256色 | |
set -g default-terminal "screen-256color" | |
# 设置状态栏前景及背景色 | |
#set -g status-bg colour23 | |
set -g status-fg colour238 | |
# 设置窗口标签的前景及背景色 | |
setw -g window-status-fg colour232 | |
#setw -g window-status-bg colour130 | |
setw -g window-status-attr dim | |
# 设置当前窗口标签的前景及背景色 | |
setw -g window-status-current-fg colour88 | |
#setw -g window-status-current-bg colour130 | |
setw -g window-status-current-attr bright | |
# 设置窗口分割的边框颜色 | |
set -g pane-border-fg colour189 | |
#set -g pane-border-bg black | |
# 设置当前窗口分割的边框颜色 | |
set -g pane-active-border-fg white | |
#set -g pane-active-border-bg colour208 | |
# 设置提示信息的前景及背景色 | |
set -g message-fg colour232 | |
#set -g message-bg colour23 | |
set -g message-attr bright |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment