-
Notifications
You must be signed in to change notification settings - Fork 0
/
tmux.conf
51 lines (40 loc) · 1.51 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
45
46
47
48
49
50
51
# remap prefix to Control + a
set -g prefix C-a
unbind C-b
bind C-a send-prefix
# force a reload of the config file
unbind r
bind r source-file ~/.tmux.conf
# Start number at 1
set -g base-index 1
# UTF-8
set-option -g status-utf8 on
# supposedly fixes pausing in vim
set -s escape-time 1
# Vi copypaste mode
set-window-option -g mode-keys vi
bind-key -t vi-copy 'v' begin-selection
bind-key -t vi-copy 'y' copy-selection
bind p paste-buffer
unbind %
unbind '"'
unbind [
bind | split-window -h
bind - split-window -v
bind ^C-s copy-mode
set-option -g default-shell /bin/zsh
setw -g history-limit 10000
#quick pane cycling
unbind ^A
bind ^A select-pane -t :.+
# Clear pane
bind C-l send-keys -R \; clear-history
# smart pane switching with awareness of vim splits
bind -n C-h run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys C-h) || tmux select-pane -L"
bind -n C-j run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys C-j) || tmux select-pane -D"
bind -n C-k run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys C-k) || tmux select-pane -U"
bind -n C-l run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys C-l) || tmux select-pane -R"
bind -n C-\ run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys 'C-\\') || tmux select-pane -l"
set -s escape-time 0
# add airline to tmux status bar
if shell "test -f ~/.tmuxlinesnapshot" "source ~/.tmuxlinesnapshot"