-
Notifications
You must be signed in to change notification settings - Fork 3
/
.tmux.conf
52 lines (38 loc) · 1.34 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
# set path
set-environment -g PATH "/opt/homebrew/bin:/usr/local/bin:/bin:/usr/bin"
# reload tmux config
bind r source-file ~/.dotfiles/.tmux.conf \; display-message "Reloaded"
# start with 1-index (instead of 0-index)
set -g base-index 1
setw -g pane-base-index 1
# no delay for escape key press
set -sg escape-time 0
# remap prefix from 'C-b' to 'C-a'
set -g prefix C-a
bind C-a send-prefix
# sort sessions by name
bind s choose-tree -s -O name
# automatic pane rename
set-option -g automatic-rename on
set-option -g automatic-rename-format "#{b:pane_current_path}"
set -g status-interval 5
# automatic pane numbers
set-option -g renumber-windows on
# switch windows with shift-arrow
bind -n S-Left previous-window
bind -n S-Right next-window
# reorder windows (first / last)
bind-key F swap-window -t 1
bind-key L swap-window -t -1
# split panes in same directory with | and -
bind | split-window -h -c "#{pane_current_path}"
bind - split-window -v -c "#{pane_current_path}"
# toggle mouse mode with m
bind m set -g mouse\; display-message "Mouse is now [#{?mouse,on,off}]"
# enable plugins
set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @plugin 'tmux-plugins/tmux-continuum'
# automatic restore session
set -g @continuum-restore 'on'
# initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run '~/.tmux/plugins/tpm/tpm'