-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.tmux.conf
30 lines (25 loc) · 1.09 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
#########################################
#########################################
### ###
### tmux ###
### ###
#########################################
#########################################
set -g default-terminal "screen-256color"
set -g prefix C-space
set -g mouse on
set -g history-limit 100000
set -g -a terminal-overrides ',*:Ss=\E[%p1%d q:Se=\E[2 q'
unbind C-b
unbind r
unbind % # Spilt vertically
unbind '"' # Split horizontally
bind r source-file ~/.tmux.conf \;
bind v split-window -h -c "{#pane_current_path}"
bind h split-window -v -c "{#pane_current_path}"
is_vim="ps -o state= -o comm= -t '#{pane_tty}' \ | grep -iqE '^[^TXZ ]+ +(\\S+\\/)?g?(view|n?vim?x?)(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"