-
Notifications
You must be signed in to change notification settings - Fork 0
/
tmux.conf
60 lines (46 loc) · 1.89 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
# default base index for tabs to 1
set -g base-index 1
# mouse scroll
set -g mouse on
set-window-option -g mouse on
set -g terminal-overrides 'xterm*:smcup@:rmcup@'
# Bindings for window cycling with alt + left/right
bind-key -n M-j next-window
bind-key -n M-k previous-window
# Binding for reloading tmux config
bind-key -n M-r source ~/.tmux.conf
# Activate arrow keys
set-option -gw xterm-keys on
# xterm colors ?
set-option -g default-terminal "screen-256color"
# Avoid delay when pressing ESC in Vim (we lose ESC bindings)
set -s escape-time 0
# bindings
bind-key -n C-t new-window -c '#{pane_current_path}'
bind-key y copy-mode
bind -T copy-mode-vi v send -X begin-selection
bind -T copy-mode-vi y send -X copy-selection
bind -T copy-mode-vi V send -X rectangle-toggle
bind % split-window -h -c '#{pane_current_path}'
bind '"' split-window -v -c '#{pane_current_path}'
# Set vi mode
set-window-option -g mode-keys vi
# Clipboard
# bind -T copy-mode-vi y send -X copy-pipe 'xclip -in -selection clipboard'
bind -T copy-mode-vi y send -X copy-pipe 'reattach-to-user-namespace pbcopy'
# bind-key -T copy-mode-vi C-c send-keys -X copy-pipe-and-cancel "reattach-to-user-namespace pbcopy"
# bind-key -T copy-mode-vi Enter send-keys -X copy-pipe-and-cancel "reattach-to-user-namespace pbcopy"
# restore global r-o-e
set -g remain-on-exit off
# Resolves some concerns with the ssh key management
set -g update-environment "SSH_ASKPASS SSH_AUTH_SOCK SSH_AGENT_PID SSH_CONNECTION"
# Hide/Move panels
bind-key j command-prompt -p "join pane from:" "join-pane -s '%%'"
bind-key b command-prompt -p "send pane to:" "break-pane -d -n '%%'"
# Pluggins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @plugin 'tmux-plugins/tmux-continuum'
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run '~/.tmux/plugins/tpm/tpm'