-
Notifications
You must be signed in to change notification settings - Fork 0
/
.tmux.conf
76 lines (62 loc) · 2.64 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
set-option -g prefix C-t
unbind-key C-b
bind-key C-t send-prefix
bind-key t send-prefix
bind-key R {
source-file ~/.tmux.conf
display-message "Reloaded .tmux.conf"
}
bind-key -r + break-pane
bind-key -r '"' split-window -v -c "#{pane_current_path}"
bind-key -r % split-window -h -c "#{pane_current_path}"
bind-key -r n select-window -t :+
bind-key -r p select-window -t :-
bind-key -n C-S-Right select-window -t :+
bind-key -n C-S-Left select-window -t :-
bind-key -r Tab select-pane -t .+
bind-key -r C-n select-pane -t .+
bind-key -r C-p select-pane -t .-
bind-key -r Down resize-pane -D
bind-key -r Up resize-pane -U
bind-key -r Right resize-pane -R
bind-key -r Left resize-pane -L
bind-key -r D resize-pane -D 5
bind-key -r U resize-pane -U 5
bind-key -r > resize-pane -R 5
bind-key -r < resize-pane -L 5
bind-key -r C-[ swap-window -t:-1
bind-key -r C-] swap-window -t:+1
bind-key -T copy-mode-vi v send-keys -X begin-selection
bind-key -T copy-mode-vi y send-keys -X copy-pipe "reattach-to-user-namespace pbcopy"
unbind-key Escape
set-option -g default-command "reattach-to-user-namespace -l zsh"
set-option -g default-terminal screen-256color
set-option -ga terminal-overrides ",xterm-256color:Tc"
# Eliminate Esc key delay for Neovim.
# See https://github.com/neovim/neovim/wiki/FAQ#esc-in-tmux-or-gnu-screen-is-delayed
set-option -sg escape-time 10
set-option -g mouse
# Smart pane switching with awareness of Vim splits.
# See: https://github.com/christoomey/vim-tmux-navigator
is_vim="ps -o state= -o comm= -t '#{pane_tty}' \
| grep -iqE '^[^TXZ ]+ +(\\S+\\/)?g?(view|n?vim?x?)(diff)?$'"
bind-key -n C-Left if-shell "$is_vim" "send-keys C-Left" "select-pane -L"
bind-key -n C-Left if-shell "$is_vim" "send-keys C-Left" "select-pane -L"
bind-key -n C-Down if-shell "$is_vim" "send-keys C-Down" "select-pane -D"
bind-key -n C-Up if-shell "$is_vim" "send-keys C-Up" "select-pane -U"
bind-key -n C-Right if-shell "$is_vim" "send-keys C-Right" "select-pane -R"
bind-key -T copy-mode-vi C-Left select-pane -L
bind-key -T copy-mode-vi C-Down select-pane -D
bind-key -T copy-mode-vi C-Up select-pane -U
bind-key -T copy-mode-vi C-Right select-pane -R
%if "#{SSH_CONNECTION}"
set -g status-style fg=colour0,bg=colour30
set -g pane-active-border-style fg=colour30
set -g pane-border-style fg=colour238
set -g window-status-current-style bg=colour37
%else
set -g status-style fg=colour0,bg=colour64
set -g pane-active-border-style fg=colour64
set -g pane-border-style fg=colour238
set -g window-status-current-style bg=colour106
%endif