-
Notifications
You must be signed in to change notification settings - Fork 5
/
.tmux.conf
56 lines (46 loc) · 1.52 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
52
53
54
55
56
# remap prefix to Control + a
set -g prefix C-a
unbind C-b
bind C-a send-prefix
bind a last-window
# set vim mode
set -g mode-keys vi
# tmux theme from vim-tmuxline
source-file $HOME/.config/tmuxsnapshot.sh
# undo window list centering
set -g status-justify left
# start index at 1
set -g base-index 1
setw -g pane-base-index 1
# renumber windows after one gets deleted
set-option -g renumber-windows on
# Identify activity in other windows
setw -g monitor-activity on
set -g visual-activity on
# enable copy paste with pref-C+y and pref-p, visual v, yank y, esc cancel
unbind [
unbind p
bind C-y copy-mode
bind p paste-buffer
bind-key -t vi-copy v begin-selection
bind-key -t vi-copy y copy-selection
bind-key -t vi-copy Escape cancel
# Smart pane switching with awareness of vim splits
is_vim='echo "#{pane_current_command}" | grep -iqE "(^|\/)g?(view|n?vim?)(diff)?$"'
bind -n C-h if-shell "$is_vim" "send-keys C-W 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"
# PLUGINS
set -g @tpm_plugins ' \
tmux-plugins/tpm \
tmux-plugins/tmux-resurrect \
tmux-plugins/tmux-sensible \
tmux-plugins/tmux-pain-control \
tmux-plugins/tmux-sessionist \
tmux-plugins/tmux-yank \
tmux-plugins/tmux-continuum \
'
# must be at the bottom
run-shell '~/.tmux/plugins/tpm/tpm'