-
Notifications
You must be signed in to change notification settings - Fork 0
/
.tmux.conf
63 lines (49 loc) · 1.79 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
61
62
63
set -sg escape-time 1
bind T swap-window -t 1
set -g default-terminal "xterm-256color"
# Hide statusbar
set -g status off
# Set scrollback history to 10000
set -g history-limit 10000
# Default window title colors
set-window-option -g window-status-fg white
set-window-option -g window-status-bg default
set-window-option -g window-status-attr dim
# Active window title colors
set-window-option -g window-status-current-fg white
set-window-option -g window-status-current-bg default
set-window-option -g window-status-current-attr bright
# Start numbering at 1
set -g base-index 1
# Rather than constraining window size to the maximum size of any client
# connected to the *session*, constrain window size to the maximum size
# of any client connected to *that window*. Much more reasonable.
setw -g aggressive-resize on
# Highlight active window
set-window-option -g window-status-current-bg red
# VI copypaste mode:
set-window-option -g mode-keys vi
if-shell "tmux -V | awk '{exit($2<2.4?0:1)}'" \
"bind-key -t vi-copy 'v' begin-selection; bind-key -t vi-copy 'y' copy-selection" \
"bind-key -T copy-mode-vi 'v' send -X begin-selection; bind-key -T copy-mode-vi 'y' send -X copy-selection"
# Use PREFIX | or \ to split window horizontally and PREFIX - to split vertically
bind | split-window -h
bind \ split-window -h
bind - split-window -v
# HJKL resize pane
bind-key J resize-pane -D 5
bind-key K resize-pane -U 5
bind-key H resize-pane -L 5
bind-key L resize-pane -R 5
# hjkl pane traversal
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
# HJKL pane traversal without prefix
bind -n M-H select-pane -L
bind -n M-J select-pane -D
bind -n M-K select-pane -U
bind -n M-L select-pane -R
# Reload config
bind r source-file ~/.tmux.conf \; display-message "Config reloaded..."