-
Notifications
You must be signed in to change notification settings - Fork 0
/
tmux.conf
44 lines (37 loc) · 1.37 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
# screen style prefix
set-option -g prefix C-a
bind-key C-a last-window
bind-key a send-keys C-a
# reload config
bind r source-file ~/.tmux.conf \; display-message "Config reloaded..."
# start numbering at 1
set -g base-index 1
# use 256 color
set -g default-terminal "screen-256color"
# vim-style navigation
set-window-option -g mode-keys vi
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
# fix vi mode-keys
if-shell "[ `tmux -V | awk '{print ($2 < 2.4)}'` = 1 ]" \
"bind-key -t vi-copy v begin-selection; \
bind-key -t vi-copy y copy-selection" \
"bind-key -Tcopy-mode-vi v send -X begin-selection; \
bind-key -Tcopy-mode-vi y send -X copy-selection-and-cancel"
# allow mouse mode
if-shell "[ `tmux -V | awk '{print ($2 < 2.1)}'` = 1 ]" \
"set -g mouse-resize-pane on; \
set -g mouse-select-pane on; \
set -g mouse-select-window on; \
set -g mode-mouse on" \
"set -g mouse on"
# fix default-path for new windows
if-shell "[ `tmux -V | awk '{print ($2 >= 1.9)}'` = 1 ]" \
"bind c new-window -c \"#{pane_current_path}\"; \
bind v split-window -h -c \"#{pane_current_path}\"; \
bind b split-window -c \"#{pane_current_path}\"; \
bind % split-window -h -c \"#{pane_current_path}\"; \
bind '\"' split-window -c \"#{pane_current_path}\"" \
"bind v split-window -h; bind b split-window"