-
Notifications
You must be signed in to change notification settings - Fork 0
/
.tmux.conf
71 lines (53 loc) · 1.9 KB
/
.tmux.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
# 保证在tmux中能正常显示颜色
# 建议在/etc/profile中加入 `export TERM=screen-256color`,然后`soucre /etc/profile`
# 如果不行再设置这一个
set -g default-terminal "screen-256color"
# shorten command delay
set -sg escape-time 1
set -sg repeat-time 1000
# set window and pane index to 1 (0 by default)
set-option -g base-index 1
setw -g pane-base-index 1
# 设置滚屏
set-option -g mouse on
# 窗口列表
setw -g automatic-rename on
set-window-option -g window-status-format '#[dim]#I:#[default]#W'
set-window-option -g window-status-current-format '[#[fg=black,blod]#I#[fg=black]:#[fg=black]#W#[fg=dim]*]'
# 将前缀键设置为Ctrl-a (C-b在Vim中被占用)
unbind C-b
set -g prefix C-a
# 重新导入配置
bind r source-file ~/.tmux.conf \; display-message "Config reloaded..."
# 映射|-分别为横分屏和竖分屏
bind | split-window -h
bind - split-window -v
# 映射hjkl,在跳转窗格的时候变成方向键
bind k select-pane -U
bind j select-pane -D
bind h select-pane -L
bind l select-pane -R
# Vi keymapping
set-window-option -g automatic-rename on
# 自动重新编号 window
set -g renumber-windows on
# 设置自动刷新的时间间隔
set -g status-interval 1
# 状态栏左对齐
set -g status-justify left
# 状态栏左侧宽度
set -g status-left-length 20
# 状态栏右侧宽度
set -g status-right-length 60
# 状态栏背景颜色(灰色)
set -g status-bg '#333333'
# 状态栏前景颜色(白色))
set -g status-fg 'white'
# 状态栏左侧显示 session 的名字
set -g status-left '#[fg=white bg=#00bb00] [#S] #[default] '
# 当前激活窗口在状态栏的展位格式
setw -g window-status-current-format '#[bg=red, fg=white, bold]*[#I] #W*'
# 未激活每个窗口占位的格式
setw -g window-status-format '#[fg=white, bg=#8B8386] [#I] #W '
# 状态栏右下角显示时间
set -g status-right "#[fg=white]#S #I:#P #[fg=white]%F #[fg=white]%H:%M:%S"