vim修改~/.tmux.conf文件,没有则新增,添加如下内容。默认前缀更改为Ctrl+a。强烈建议更换Caps lock键位与Ctrl键位,用过的都说好,换过就回不来了。
bash
unbind C-b
set -g prefix C-a
bind a send-prefix
set -sg escape-time 1
bind r source-file ~/.tmux.conf \; display "Reloaded!"
# split window
unbind '"'
bind s splitw -v
unbind '%'
bind v splitw -h
bind -r h select-pane -L
bind -r j select-pane -D
bind -r k select-pane -U
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
bind -r C-h select-window -t :-
bind -r C-l select-window -t :+
setw -g mode-mouse off
set -g mouse-select-pane off
set -g mouse-resize-pane off
set -g mouse-select-window off
bind q killp
bind ^q killw
bind-key C-l select-window -l
setw -g mode-keys vi
#set encode
setw -gq utf8 off
set -gq status-utf8 on