-
Notifications
You must be signed in to change notification settings - Fork 0
/
tmux.conf
54 lines (44 loc) · 1.56 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
# set window notifications
setw -g monitor-activity on
set -g visual-activity on
# automatically set window title
setw -g automatic-rename
# set scrollback to 10000 lines
set -g history-limit 10000
# correct scrolling
set -g terminal-overrides 'xterm*:smcup@:rmcup@'
# resize pane
bind -r < resize-pane -L 4
bind -r > resize-pane -R 4
bind -r _ resize-pane -D 4
bind -r + resize-pane -U 4
# split pane
unbind %
bind \\ split-window -h -c '#{pane_current_path}'
bind - split-window -v -c '#{pane_current_path}'
# vim style control for copy mode
setw -g mode-keys vi
# vim style pane switching
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
# vim style window switching
bind-key -r C-h select-window -t :-
bind-key -r C-l select-window -t :+
# enable xterm-keys
set-window-option -g xterm-keys
# enable mouse scrolling
# to copy: hold down Option key to diable mouse mode
# setw -g mode-mouse on
# set -g mouse-resize-pane off
# set -g mouse-select-pane on
# set -g mouse-select-window on
set -g mouse on
bind -n WheelUpPane if-shell -F -t = "#{mouse_any_flag}" "send-keys -M" "if -Ft= '#{pane_in_mode}' 'send-keys -M' 'select-pane -t=; copy-mode -e; send-keys -M'"
bind -n WheelDownPane select-pane -t= \; send-keys -M
bind -n C-WheelUpPane select-pane -t= \; copy-mode -e \; send-keys -M
bind-key -T copy-mode-vi WheelUpPane send-keys -X halfpage-up
bind-key -T copy-mode-vi WheelDownPane send-keys -X halfpage-down
bind-key -T copy-mode WheelUpPane send-keys -X halfpage-up
bind-key -T copy-mode WheelDownPane send-keys -X halfpage-down