/
tmux.conf
80 lines (59 loc) · 2.19 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
# Plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-yank'
set -g @plugin 'nhdaly/tmux-better-mouse-mode'
set -g @plugin 'tmux-plugins/tmux-resurrect'
# Set zsh as default shell
set -g default-command /bin/zsh
set -g default-shell /bin/zsh
# Use 256 term for pretty colors
set -g default-terminal "screen-256color"
# increase scroll-back history
set -g history-limit 5000
# use vim key bindings
setw -g mode-keys vi
# increase repeat time for repeatable commands
set -g repeat-time 1000
unbind C-b
set -g prefix C-s
bind-key r source-file ~/.tmux.conf \; display-message "~/.tmux.conf reloaded"
is_vim='echo "#{pane_current_command}" | grep -iqE "(^|\/)g?(view|n?vim?)(diff)?$"'
bind -n C-h if-shell "$is_vim" "send-keys C-h" "select-pane -L"
bind -n C-j if-shell "$is_vim" "send-keys C-j" "select-pane -D"
bind -n C-k if-shell "$is_vim" "send-keys C-k" "select-pane -U"
bind -n C-l if-shell "$is_vim" "send-keys C-l" "select-pane -R"
bind -n C-\\ if-shell "$is_vim" "send-keys C-\\" "select-pane -l"
bind-key - split-window -v -c '#{pane_current_path}'
bind-key | split-window -h -c '#{pane_current_path}'
bind -n S-Left resize-pane -L 2
bind -n S-Right resize-pane -R 2
bind -n S-Down resize-pane -D 1
bind -n S-Up resize-pane -U 1
bind -n C-Left resize-pane -L 10
bind -n C-Right resize-pane -R 10
bind -n C-Down resize-pane -D 5
bind -n C-Up resize-pane -U 5
bind c new-window -c '#{pane_current_path}'
set-option -g base-index 1
set-option -g renumber-windows on
bind-key b break-pane -d
bind-key C-j choose-tree -s
set -g status on
set -g status-bg default
set -g status-left " "
set -g status-justify centre
setw -g window-status-format ' #(echo "#{pane_current_command}") '
setw -g window-status-current-format ' #(echo "#{pane_current_command}") '
set -g status-right " "
# set pane border colors
set -g pane-border-style 'fg=white,bg=default'
set -g pane-active-border-style 'fg=white,bg=default'
set -g status-style 'fg=black,bg=black'
# Enable mouse
set-option -g mouse on
set -sg escape-time 0
# activity
set -g monitor-activity on
set -g visual-activity off
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run '~/.tmux/plugins/tpm/tpm'