-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.tmux.conf
38 lines (30 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
38
# Smart pane switching with awareness of vim splits
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"
# Vim style pane selection
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
# Use vim keybindings in copy mode
setw -g mode-keys vi
bind-key -n C-h split-window -h # Split panes horizontal
bind-key -n C-g split-window -v # Split panes vertically
# Start at 1 not 0
set -g base-index 1
# Just click it
# set-option -g mouse-select-pane on
# set-option -g mouse-select-window on
# set-option -g mouse-resize-pane on
# set -g mouse-utf8 off
# Scroll your way into copy mode (scrollback buffer)
# and select text for copying with the mouse
#setw -g mode-mouse on
# Clipboard support
bind-key -t vi-copy y copy-pipe 'xclip -selection clipboard >/dev/null'
# avoid escape key delay
set -s escape-time 0