forked from 582033/vim
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtmux.conf
59 lines (51 loc) · 1.77 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
#绑定C-a为新快捷键 unbind ^b
set -g prefix ^a
bind ^a send-prefix #由于prefix按键被tmux拦截,Emacs,VIm等软件可能会不能正常工作,这个设置可以让用户连按两次C-a,来向第三方软件发送prefix按键
#设置为vi模式
set-window-option -g mode-keys vi
#重新读取配置
unbind R
bind R source ~/.tmux.conf \; display "Config reloaded!";
#其他操作习惯
unbind %
unbind h
unbind j
unbind k
unbind l
bind | split-window -h #竖向切分
bind _ split-window #横线切分
bind H select-pane -L # h 向左移动光标
bind J select-pane -D # j 向下移动光标
bind K select-pane -U # k 向上移动光标
bind L select-pane -R # l 向右移动光标
#unbind x
#bind X kill-pane # K 关闭当前窗格
unbind &
bind k kill-window # k 关闭当前窗口
bind -n 'F2' new-window
bind -n 'F3' prev
bind -n 'F4' next
#定制状态行右侧
set -g status-left ""
set -g status-right "#[fg=white]#(hostname)@#(hostname) #(date +' %Y-%m-%d %H:%M:%S ')"
set -g status-utf8 on
set -g status-interval 1 #每1秒更新一次显示的时间,默认是15秒
setw -g monitor-activity on
set -g visual-activity on
#设置状态行的背景和前景色:
set -g status-bg '#333333'
set -g status-fg '#C000C0'
setw -g window-status-fg white
setw -g window-status-bg default
setw -g window-status-attr dim
setw -g window-status-current-fg '#C000C0'
setw -g window-status-current-bg white
setw -g window-status-current-attr bright
#设置tmux支持256色
set -g default-terminal "xterm-256color"
#设置支持鼠标滚屏及按住alt键复制
#setw -g mode-mouse off
#setw -g mode-mouse copy-mode
#setw -g mouse-resize-pane on
#setw -g mouse-select-pane on
#setw -g mouse-select-window on