Tmux configuration

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/huangkangying/article/details/82025479

Below is my tmux configuration:

# fix vim color issue under tmux
set -g default-terminal "screen-256color"

# enable mouse, press 'shift' when using mouse's middle key
set -g mouse on

# use vim short key for tmux
set-window-option -g mode-keys vi
# start selecting text typing 'v' key (once you are in copy mode)
bind-key -t vi-copy v begin-selection
# copy selected text to the system's clipboard
bind-key -t vi-copy y copy-pipe "reattach-to-user-namespace pbcopy"
# use h, j, k, l to switch tmux windows
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
# unbind C-b as prefix key
unbind C-b
# use C-x as tmux prefix key
set -g prefix C-x

# split window
unbind '"'
# vertical split (prefix -)
bind - splitw -v
unbind %
bind | splitw -h # horizontal split (prefix |)

猜你喜欢

转载自blog.csdn.net/huangkangying/article/details/82025479