-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtmux.conf
43 lines (32 loc) · 1.57 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
set -g default-terminal "screen-256color"
setw -g mode-keys vi
set -g prefix C-b
set -s escape-time 0
unbind r
bind r source-file ~/.tmux.conf
unbind %
bind-key \\ split-window -h
bind-key - split-window -v
# smart pane switching with awareness of vim splits
bind-key -n C-h run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys C-h) || tmux select-pane -L"
bind-key -n C-j run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys C-j) || tmux select-pane -D"
bind-key -n C-k run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys C-k) || tmux select-pane -U"
bind-key -n C-l run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys C-l) || tmux select-pane -R"
bind-key -n C-\\ run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys 'C-\\') || tmux select-pane -l"
set-option -sg escape-time 10
setw -g monitor-activity on
set -g visual-activity on
setw -g mouse on
set -g @scroll-speed-num-lines-per-scroll "6"
unbind [
bind-key Escape copy-mode
unbind p
bind-key p paste-buffer
bind-key -T vi-copy 'v' send -X begin-selection
bind-key -T vi-copy 'y' send -X copy-selection-and-cancel
##CLIPBOARD selection integration
##Requires prefix key before the command key
#Copy tmux paste buffer to CLIPBOARD
bind-key C-c run "tmux show-buffer | xclip -i -selection clipboard"
#Copy CLIPBOARD to tmux paste buffer and paste tmux paste buffer
bind-key C-v run "tmux set-buffer -- \"$(xclip -o -selection clipboard)\"; tmux paste-buffer"