forked from stoeffel/.dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tmux.conf
41 lines (31 loc) · 1.58 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
set -g prefix C-Space
unbind C-b
set -g default-terminal "screen-256color"
set-option -g default-command "reattach-to-user-namespace -l zsh"
# Smart pane switching with awareness of vim splits
bind -n C-h run "(tmux display-message -p '#{pane_current_command}' | grep -iqE '(^|\/)nvim$' && tmux send-keys C-h) || tmux select-pane -L"
bind -n C-j run "(tmux display-message -p '#{pane_current_command}' | grep -iqE '(^|\/)nvim$' && tmux send-keys C-j) || tmux select-pane -D"
bind -n C-k run "(tmux display-message -p '#{pane_current_command}' | grep -iqE '(^|\/)nvim$' && tmux send-keys C-k) || tmux select-pane -U"
bind -n C-l run "(tmux display-message -p '#{pane_current_command}' | grep -iqE '(^|\/)nvim$' && tmux send-keys C-l) || tmux select-pane -R"
bind -n C-\ run "(tmux display-message -p '#{pane_current_command}' | grep -iqE '(^|\/)nvim$' && tmux send-keys 'C-\\') || tmux select-pane -l"
bind v split-window -h
bind s split-window -v
bind -r H resize-pane -L 10
bind -r J resize-pane -D 10
bind -r K resize-pane -U 10
bind -r L resize-pane -R 10
bind -r C-s setw synchronize-panes
bind -r S list-session
setw -g mode-keys vi
## reload tmux.conf
bind r source-file ~/.tmux.conf \; display "Reloaded!"
set-option -g mouse-select-pane on
set-option -g mouse-select-window on
set-window-option -g mode-mouse on
set-window-option -g main-pane-height 45
set-window-option -g main-pane-width 60
# renumber windows sequentially after closing any of them
set -g renumber-windows on
set-option -g pane-active-border-fg blue
set-option -g pane-active-border-bg default
set-option -g pane-border-fg default