-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.tmux.conf
53 lines (41 loc) · 1.69 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
#set-option -g status-utf8 on
if-shell "tmux -V|awk '{if($2 < 2.2) {exit 0} else {exit 1}}'" "set-option -g status-utf8 on"
set-option -g base-index 1
set-option -g status-right-length 10
set -g pane-base-index 1
set-option -g mouse on
# make scrolling with wheels work
bind -n WheelUpPane if-shell -F -t = "#{mouse_any_flag}" "send-keys -M" "if -Ft= '#{pane_in_mode}' 'send-keys -M' 'select-pane -t=; copy-mode -e; send-keys -M'"
bind -n WheelDownPane select-pane -t= \; send-keys -M
set-window-option -g mode-keys vi #复制模式中的默认键盘布局;可以设置为vi或emacs
#set-window-option -g utf8 on
if-shell "tmux -V|awk '{if($2 < 2.2) {exit 0} else {exit 1}}'" "set-window-option -g utf8 on"
#将激活控制台的快捷键由Ctrl+b修改为Ctrl+a
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 r source-file ~/.tmux.conf \; display “Reloaded!” # reload tmux.conf file
unbind '"'
bind - splitw -v
unbind %
bind | splitw -h
# bind-key C-1 select-pane -t 1
# bind-key C-2 select-pane -t 2
# bind-key C-3 select-pane -t 3
# bind-key C-4 select-pane -t 4
# bind-key C-5 select-pane -t 5
# bind-key C-6 select-pane -t 6
# bind-key C-7 select-pane -t 7
# bind-key C-8 select-pane -t 8
# bind-key C-9 select-pane -t 9
# bind-key C-0 select-pane -t 0
# Highlight active window
set-window-option -g window-status-current-bg black
set-window-option -g window-status-current-fg red
# auto rename
setw -g automatic-rename
set -g automatic-rename
# move tmux copy buffer into x clipboard
bind C-y run "tmux save-buffer - | xclip -i"