-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.tmux.conf
37 lines (28 loc) · 1.17 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
unbind C-b
set -g prefix C-Space
bind C-Space send-prefix
is_vim="ps -o state= -o comm= -t '#{pane_tty}' \
| grep -iqE '^[^TXZ ]+ +(\\S+\\/)?g?(view|n?vim?x?)(diff)?$'"
is_fzf="ps -o state= -o comm= -t '#{pane_tty}' \
| grep -iqE '^[^TXZ ]+ +(\\S+\\/)?fzf$'"
bind -n C-h run "($is_vim && tmux send-keys C-h) || \
tmux select-pane -L"
bind -n C-j run "($is_vim && tmux send-keys C-j) || \
($is_fzf && tmux send-keys C-j) || \
tmux select-pane -D"
bind -n C-k run "($is_vim && tmux send-keys C-k) || \
($is_fzf && tmux send-keys C-k) || \
tmux select-pane -U"
bind -n C-l run "($is_vim && tmux send-keys C-l) || \
tmux select-pane -R"
bind-key h split-window -hb -c '#{pane_current_path}'
bind-key j split-window -v -c '#{pane_current_path}'
bind-key k split-window -vb -c '#{pane_current_path}'
bind-key l split-window -h -c '#{pane_current_path}'
bind-key -r J resize-pane -D 1
bind-key -r K resize-pane -U 1
bind-key -r H resize-pane -L 1
bind-key -r L resize-pane -R 1
bind-key -r I resize-pane -x 94
set -g status-right "%A, %d %b %Y %I:%M %p"
set-window-option -g mode-keys vi