-
Notifications
You must be signed in to change notification settings - Fork 4
/
tmux.conf.symlink
65 lines (51 loc) · 2.03 KB
/
tmux.conf.symlink
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
source ~/etc/dotfiles/tmux.reset
# unbind some default keybindings
unbind C-b
# term
set-option -g default-terminal screen-256color
set -g default-terminal "screen-256color"
set -g history-limit 20000
# start window indexes at 1 instead of 0
set -g base-index 1
set-window-option -g pane-base-index 1
# disable mouse support (at least while we're learning)
setw -g mode-mouse off
set -g mouse-select-pane off
set -g mouse-resize-pane off
set -g mouse-select-window off
# use vim style binding
setw -g mode-keys vi
# copy/paste using vim-style keys
bind Escape copy-mode
unbind p
bind p paste-buffer
bind -t vi-copy 'v' begin-selection
bind -t vi-copy 'y' copy-selection
# set prefix key to ctrl-a
set -g prefix C-a
bind C-a send-prefix
# better mnemonics for splitting panes!
bind | split-window -h
bind _ split-window -v
# More binding
bind [ previous-window
bind ] next-window
# Pane switching, see https://github.com/christoomey/vim-tmux-navigator
# Smart pane switching with awareness of vim splits
bind -n C-h run "(tmux display-message -p '#{pane_current_command}' | grep -iqE '(^|\/)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 '(^|\/)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 '(^|\/)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 '(^|\/)vim(diff)?$' && tmux send-keys C-l) || tmux select-pane -R"
bind -n C-\ run "(tmux display-message -p '#{pane_current_command}' | grep -iqE '(^|\/)vim(diff)?$' && tmux send-keys 'C-\\') || tmux select-pane -l"
# Pane resizing
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
# colours
set -g pane-border-fg colour102
set -g pane-active-border-fg colour244
set -g message-fg white
set -g message-bg black
set -g message-attr bright
source ~/etc/dotfiles/tmux-airline.conf