-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtmux.conf.local
30 lines (23 loc) · 1.06 KB
/
tmux.conf.local
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
# Smart pane switching with awareness of vim splits
# (requires vim-tmux-navigator plugin for vim)
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"
bind-key l last-window
# Open new windows and splits with the current working directory
bind '"' split-window -c "#{pane_current_path}"
bind % split-window -h -c "#{pane_current_path}"
bind c new-window -c "#{pane_current_path}"
# look and feel
set -g pane-active-border-style fg=magenta
set -g status-right '#{session_name} '
setw -g clock-mode-style 12
# address vim mode switching delay (http://superuser.com/a/252717/65504)
set -s escape-time 0
# mouse stuff
set -g mouse on
# something for copy/paste in vim
set -g default-command "reattach-to-user-namespace -l ${SHELL}"