-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtmux.config
41 lines (33 loc) · 1.38 KB
/
tmux.config
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
set -g mouse on
set -g prefix C-s
unbind r
bind r source-file ~/.tmux.conf
# Enable RGB (truecolor)
set -a terminal-features '*:RGB'
# Enable clored underlines (e.g. in Vim)
set -a terminal-features '*:usstyle'
set -ga terminal-overrides ",*256col*:Tc"
# fix the cursor shape https://github.com/neovim/neovim/issues/5096#issuecomment-469027417
set -ga terminal-overrides '*:Ss=\E[%p1%d q:Se=\E[ q'
# undercurl support
set -as terminal-overrides ',*:Smulx=\E[4::%p1%dm'
# underscore colours - needs tmux-3.0
set -as terminal-overrides ',*:Setulc=\E[58::2::%p1%{65536}%/%d::%p1%{256}%/%{255}%&%d::%p1%{255}%&%d%;m'
# Use extended keys (CSI u)
set -g extended-keys on
set -g escape-time 10
set -g focus-events on
## update the TERM variable of terminal emulator when creating a new session or attaching a existing session
set -g update-environment 'DISPLAY SSH_ASKPASS SSH_AGENT_PID SSH_CONNECTION WINDOWID XAUTHORITY TERM'
# use vi mode
setw -g mode-keys vi
bind -T copy-mode-vi v send -X begin-selection
bind -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "pbcopy"
bind P paste-buffer
bind -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel "pbcopy"
bind-key -T copy-mode-vi v send-keys -X begin-selection
bind-key -T copy-mode-vi y send-keys -X copy-selection-and-cancel
bind-key h select-pane -L
bind-key j select-pane -D
bind-key k select-pane -U
bind-key l select-pane -R