-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtmux.conf
32 lines (24 loc) · 1.24 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
#bind -n C-h select-pane -L
#bind -n C-l select-pane -R
#bind -n C-k select-pane -U
#bind -n C-j select-pane -D
# Use vim keybindings in copy mode
setw -g mode-keys vi
# Re-map prefix to C-j
unbind-key C-b
set -g prefix 'C-Space'
bind-key 'C-Space' send-prefix
#colors
set -g default-terminal "screen-256color"
# somehow tmux likes eating escapes
set -sg escape-time 0
# splits in current folder
bind '"' split-window -c "#{pane_current_path}"
bind % split-window -h -c "#{pane_current_path}"
# Start copy mode when scrolling up and exit when scrolling down to bottom.
# The "#{mouse_any_flag}" check just sends scrolls to any program running that
# has mouse support (like vim).
# Scrolling in tmux
set -g mouse on
bind -n WheelUpPane if-shell -F -t = "#{mouse_any_flag}" "send-keys -M; send-keys -M; send-keys -M; send-keys -M" "if -Ft= '#{pane_in_mode}' 'send-keys -M; send-keys -M; send-keys -M; send-keys -M' 'copy-mode -e; send-keys -M; send-keys -M; send-keys -M; send-keys -M'"
bind -n WheelDownPane if-shell -F -t = "#{mouse_any_flag}" "send-keys -M; send-keys -M; send-keys -M; send-keys -M" "if -Ft= '#{pane_in_mode}' 'send-keys -M; send-keys -M; send-keys -M; send-keys -M' 'copy-mode -e; send-keys -M; send-keys -M; send-keys -M; send-keys -M'"