-
Notifications
You must be signed in to change notification settings - Fork 0
/
.tmux.conf
92 lines (70 loc) · 2.5 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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
# scroll with the mouse
set -g mouse on
# don't lose window names when swapping windows
set -g allow-rename off
# properly set cursor when changing modes in vim
set -ga terminal-overrides '*:Ss=\E[%p1%d q:Se=\E[ q'
# no delay when <esc> in vim
set -sg escape-time 0
# start window numbers at 1 to match keyboard order with tmux window order
set -g base-index 1
set-window-option -g pane-base-index 1
# renumber windows sequentially after closing any of them
set -g renumber-windows on
# increase scrollback lines
set -g history-limit 50000
# show pane numbers for 3 seconds
set-option -g display-panes-time 3000
# show status bar on top
set-option -g status-position top
# show and set pane title
set -g pane-border-status top
set -g pane-border-format "#{pane_index} #{pane_title}"
# vscode colors for tmux
set -g window-active-style 'bg=colour235,fg=colour253'
set -g window-style 'bg=colour235,fg=colour253'
set -g pane-border-style 'bg=colour235, fg=colour59'
set -g pane-active-border-style 'bg=colour235, fg=colour59'
set -g status-style 'bg=colour32, fg=colour15'
set -g window-status-style 'bg=default, fg=default'
set -g window-status-current-style 'bg=colour39, fg=default'
# remove administrative debris (session name, hostname, time) in status bar
set -g status-left ''
set -g status-right ''
# list of plugins (install with `prefix` + `I`)
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @plugin 'tmux-plugins/tmux-continuum'
set -g @plugin 'tmux-plugins/tmux-yank' # makes yanking work from WSL
set -g @plugin 'christoomey/vim-tmux-navigator'
# initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run -b '~/.tmux/plugins/tpm/tpm'
# rebind action key
unbind C-b
set-option -g prefix C-a
# rebind pane splitting
bind | split-window -h
bind - split-window -v
# re-sourcing config
bind r source-file ~/.tmux.conf \; display-message "~/.tmux.conf reloaded"
bind M split -h "vim ~/.tmux.conf"
# switch windows like panes
bind -r C-h select-window -p
bind -r C-l select-window -n
# swap windows
bind -r C-j swap-window -t -1
bind -r C-k swap-window -t +1
# act like vscode panes
bind -n C-h select-pane -L
bind -n C-j select-pane -D
bind -n C-k select-pane -U
bind -n C-l select-pane -R
# resize panes
bind j resize-pane -D 5
bind k resize-pane -U 5
bind h resize-pane -L 5
bind l resize-pane -R 5
# vim commands in copy mode
setw -g mode-keys vi
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