-
Notifications
You must be signed in to change notification settings - Fork 3
/
tmux.conf
60 lines (47 loc) · 1.78 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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
set -g default-terminal 'screen-256color'
# Set Ctrl-Space as the leader key
set -g prefix C-a
unbind C-b
# shorten command delay
set -sg escape-time 2
# Status bar
set-option -g status on # turn the status bar on
set -g status-interval 5 # set update frequencey (default 15 seconds)
set -g status-justify centre # center window list for clarity
# resize panes using PREFIX H, J, K, L
bind C-c resize-pane -L 5
bind C-t resize-pane -D 5
bind C-s resize-pane -U 5
bind C-r resize-pane -R 5
bind-key / display-panes \; select-pane -t :.
# Vim flavoured bindings
bind -r c select-pane -L
bind -r t select-pane -D
bind -r s select-pane -U
bind -r r select-pane -R
set-window-option -g mode-keys vi
bind-key -t vi-copy c cursor-left
bind-key -t vi-copy s cursor-up
bind-key -t vi-copy r cursor-right
bind-key -t vi-copy t cursor-down
bind-key -t vi-copy b previous-word
bind-key -t vi-copy 'v' begin-selection
bind -t vi-copy y copy-pipe 'xclip -in -selection clipboard'
bind-key -t vi-copy 'é' next-word
# visual notification of activity in other windows
setw -g monitor-activity on
set -g visual-activity on
# switch windows using Alt+ Middle keys
bind-key -n M-a select-window -t 0
bind-key -n M-u select-window -t 1
bind-key -n M-i select-window -t 2
bind-key -n M-e select-window -t 3
# Use the yank command to copy to the clipboard
bind y run-shell "tmux show-buffer | xclip -sel clip -i" \; display-message "Copied tmux buffer to system clipboard"
bind n new-window
# Fix the clipboard
set-option -g default-command "reattach-to-user-namespace -l zsh"
bind v splitw -v -p 20 # vertical split using 80 / 20
set -g @plugin 'tmux-plugins/tmux-resurrect'
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run '~/.tmux/plugins/tpm/tpm'