-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.tmux.conf.local
26 lines (20 loc) · 1.25 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
# My .tmux.conf is a symlink to the one from https://github.com/gpakosz/.tmux
# This file adds my personal customisation on top of it
unbind C-b
set -g prefix `
bind-key ` send-prefix
set -g history-limit 100000
# Allow different window sizes in the same session
setw -g aggressive-resize on
# Use vim keybindings in copy mode
setw -g mode-keys vi
# Use current directory for new splits
tmux_conf_new_pane_retain_current_path=true
bind '%' split-window -h # Split panes horizontal
bind '"' split-window -v # Split panes vertically
# Smart pane switching with awareness of vim splits
# https://github.com/christoomey/vim-tmux-navigator
bind -n C-h run "(tmux display-message -p '#{pane_current_command}' | grep -iqE '(^|\/)g?(view|n?vim?)(diff)?$' && tmux send-keys C-h) || tmux select-pane -L"
bind -n C-j run "(tmux display-message -p '#{pane_current_command}' | grep -iqE '(^|\/)g?(view|n?vim?)(diff)?$' && tmux send-keys C-j) || tmux select-pane -D"
bind -n C-k run "(tmux display-message -p '#{pane_current_command}' | grep -iqE '(^|\/)g?(view|n?vim?)(diff)?$' && tmux send-keys C-k) || tmux select-pane -U"
bind -n C-l run "(tmux display-message -p '#{pane_current_command}' | grep -iqE '(^|\/)g?(view|n?vim?)(diff)?$' && tmux send-keys C-l) || tmux select-pane -R"