-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtmux.conf
More file actions
45 lines (35 loc) · 1.55 KB
/
Copy pathtmux.conf
File metadata and controls
45 lines (35 loc) · 1.55 KB
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
##此类配置可以在命令行模式中输入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支持
# 将激活控制台的快捷键由Ctrl+b修改为Ctrl+a
set-option -g prefix C-a
unbind-key C-b
bind-key C-a send-prefix
setw -g mode-keys vi
setw -g xterm-keys on
unbind %
bind \ split-window -h
bind - split-window -v
#设置终端颜色为256色
#set -g default-terminal "screen-256color"
#将ctrl-r键设置为加载配置文件,并显示"reloaded!"信息
bind C-r source-file ~/.tmux.conf \; display "Reloaded!"
#tmux attach 如果无分离终端则新建
new-session
#选择分割的窗格,不需要松开ctrl键,多次跳转更方便
bind C-k selectp -U # 选择上窗格
bind C-j selectp -D # 选择下窗格
bind C-h selectp -L # 选择左窗格
bind C-l selectp -R # 选择右窗格
#调整窗格的大小
bind-key J resize-pane -D 10
bind-key K resize-pane -U 10
bind-key H resize-pane -L 10
bind-key L resize-pane -R 10
#开启鼠标模式
#set -g mouse-resize-pane on
#set -g mouse-select-pane on