forked from hexorx/dotfiles-old
/
tmux.conf
67 lines (51 loc) · 2.2 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
57
58
59
60
61
62
63
64
65
66
67
set -g visual-bell off
# Use vim keybindings in copy mode
setw -g mode-keys vi
# Setup 'v' to begin selection as in Vim
bind-key -T copy-mode-vi v send-keys -X begin-selection
# Update default binding of `Enter` to also use copy-pipe
# unbind-key -T copy-mode-vi Enter
set-option -g default-shell /bin/zsh
set -g prefix C-s
bind a send-prefix
set -g history-limit 10000
set-option -g history-limit 50000
# bind C clear-history
# splits
unbind s
bind s split-window
bind v split-window -h
# don't wait for an escape sequence after hitting
# Esc. fixes insert mode exit lag in vim
set -sg escape-time 0
# highlight window when it has new activity
setw -g monitor-activity off
# set -g visual-activity on
# increase repeat time for repeatable commands
set -g repeat-time 1000
# soften status bar color from harsh green to light gray
set -g status-bg '#666666'
set -g status-fg '#aaaaaa'
# set mark that prefix has been pressed
set -g status-right '#{?client_prefix,#[reverse]<Prefix>#[noreverse] ,}"#22T" %H:%M %d-%b-%y'
# force a reload of the config file
unbind r
bind r source-file ~/.tmux.conf
# 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 s split-window -v -c '#{pane_current_path}'
bind v split-window -h -c '#{pane_current_path}'
bind c new-window -c '#{pane_current_path}'
set -g default-terminal 'tmux-256color'
set -ga terminal-overrides ',tmux-256color:Tc'
# List of plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-resurrect'
# set -g @plugin 'tmux-plugins/tmux-pain-control'
set -g @plugin 'tmux-plugins/tmux-yank'
set -g @plugin 'tmux-plugins/tmux-continuum'
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run '~/.tmux/plugins/tpm/tpm'