-
Notifications
You must be signed in to change notification settings - Fork 1
/
.tmux.conf
120 lines (106 loc) · 4.21 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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
################################# messages #################################
display -p ""
display -p ""
display -p " 欢迎使用griffenliu的tmux配置~"
display -p " 该配置在版本2.1-1下验证通过"
display -p " 下面介绍配置的特性:"
display -p " 1.使用C-k代替了默认的C-b前缀"
display -p " 2.使用C-k r重新加载配置文件"
display -p " 3.按C-k两次可以将C-k发送给tmux打开的程序"
display -p " 4.窗口的默认索引从1开始"
display -p " 5.开启了窗口活动通知"
display -p " 6.开启窗口关闭后,窗口编号自动重新索引"
display -p " 7.开启鼠标支持"
display -p " 8. 快捷键:| 将窗口垂直分割为两个pane"
display -p " 9. 快捷键:_ 将窗口平行分割为两个pane(注意:不是-)"
display -p " 10.快捷键:\" 将pane从窗口拆离出来成为一个新的临时窗口,代替原来的'!'键"
display -p " 11.快捷键:b 显示buffer列表,代替原来的'#'键"
display -p " 12.快捷键:C-x 杀死窗口,代替原来的'&'键"
display -p " 13.快捷键:M-(0~9) 切换pane到指定的索引,方便快速在各个pane中切换"
display -p " 14.快捷键:M-(Shift 0~8) 切换pane到指定的索引,并自动最大化pane"
display -p " 15.快捷键:jhkl 在各个pane中进行左下上右的切换"
display -p " 16.快捷键:JHKL 根据方向将pane放大或者缩小5个列单位"
display -p " 17.自定义状态栏"
display -p " 本配置是根据个人喜好进行的定制,不喜勿用~~~囧"
################################# global #################################
bind r source-file ~/.tmux.conf \; display-message "Config reloaded.."
setw -g automatic-rename on
set -g prefix C-k
unbind C-b
bind C-k send-prefix
set -g visual-activity on
set -sg escape-time 1
set -g base-index 1
set -g history-limit 100000
set -g default-terminal "screen-256color"
set -g renumber-windows on
set -g display-time 3000
set -g repeat-time 1000
#set -g mouse on
#set -g mouse-utf8 on
setw -g pane-base-index 1
setw -g monitor-activity on
################################# session #################################
################################# window #################################
setw -g utf8 on
bind | split-window -h
bind _ split-window -v
################################# pane #################################
unbind '"'
bind '"' break-pane
unbind !
unbind '#'
bind b list-buffers
unbind %
unbind &
bind C-x confirm-before -p "kill-window #W?(y/n)" kill-window
bind M-1 select-pane -t .1
bind M-2 select-pane -t .2
bind M-3 select-pane -t .3
bind M-4 select-pane -t .4
bind M-5 select-pane -t .5
bind M-6 select-pane -t .6
bind M-7 select-pane -t .7
bind M-8 select-pane -t .8
bind M-9 select-pane -t .9
bind ! select-pane -t .1 \; resize-pane -Z
bind @ select-pane -t .2 \; resize-pane -Z
bind '#' select-pane -t .3 \; resize-pane -Z
bind $ select-pane -t .4 \; resize-pane -Z
bind % select-pane -t .5 \; resize-pane -Z
bind ^ select-pane -t .6 \; resize-pane -Z
bind & select-pane -t .7 \; resize-pane -Z
bind * select-pane -t .8 \; resize-pane -Z
unbind h
bind -r h select-pane -L
unbind j
bind -r j select-pane -D
unbind k
bind -r k select-pane -U
unbind l
bind -r l select-pane -R
bind -r H resize-pane -L 5
bind -r J resize-pane -D 5
bind -r K resize-pane -U 5
bind -r L resize-pane -R 5
set -g pane-active-border-fg '#55ff55'
set -g pane-border-fg '#555555'
# smart pane switching with awareness of vim splits
################################# status #################################
set -g status-utf8 on
set -g status-interval 60
set -g status-justify centre
set -g status-bg black
set -g status-fg white
set -g status-left-length 40
set -g status-right-length 20
set -g status-left "#[fg=green]Session:[#[fg=cyan]#S:#[fg=yellow]#I.#[fg=red]#P#[fg=green]]"
set -g status-right '#[fg=green][#[fg=yellow]%m-%d %H:%M#[fg=green]]'
setw -g window-status-fg default
setw -g window-status-bg cyan
setw -g window-status-attr dim
setw -g window-status-current-fg white
setw -g window-status-current-bg red
setw -g window-status-current-attr bright
setw -g window-status-format '#W-#I'
setw -g window-status-current-format '[#W-#I]'