forked from loc1129/vi_ide_script
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtmux.conf
35 lines (27 loc) · 1.68 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
#此类配置可以在命令行模式中输入show-options -g查询
set-option -g base-index 1 #窗口的初始序号;默认为0,这里设置为1
set-option -g status-keys vi #操作状态栏时的默认键盘布局;可以设置为vi或emacs
set-option -g status-utf8 on #开启状态栏的UTF-8支持
#此类设置可以在命令行模式中输入show-window-options -g查询
set-window-option -g mode-keys vi #复制模式中的默认键盘布局;可以设置为vi或emacs
set-window-option -g utf8 on #开启窗口的UTF-8支持
set -g history-limit 65535
#将激活控制台的快捷键由Ctrl+b修改为Ctrl+a
set-option -g prefix C-w
unbind-key C-b
bind-key C-w send-prefix
#添加自定义快捷键
bind-key z kill-session #按z结束当前会话;相当于进入命令行模式后输入kill-session
bind-key H select-layout even-horizontal #按h将当前面板布局切换为even-horizontal;相当于进入命令行模式后输入select-layout even-horizontal
bind-key V select-layout even-vertical #按v将当前面板布局切换为even-vertical;相当于进入命令行模式后输入select-layout even
bind-key -r k select-pane -U
bind-key -r j select-pane -D
bind-key -r h select-pane -L
bind-key -r l select-pane -R
bind i send-keys "clear"\; send-keys "Enter"\; clear-history
#Setup 'v' to begin selection as in Vim
bind-key -t vi-copy v begin-selection
bind-key -t vi-copy y copy-pipe "reattach-to-user-namespace pbcopy"
# Update default binding of `Enter` to also use copy-pipe
unbind-key -t vi-copy Enter
bind-key -t vi-copy Enter copy-pipe "reattach-to-user-namespace pbcopy"