-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathtmux.conf
84 lines (65 loc) · 2.29 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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
# Use Ctrl-O instead of Ctrl-B
unbind-key C-b
set-option -g prefix C-o
bind-key o send-prefix
# Bind <prefix><C-l> to capture the full current pane's full log
unbind-key C-l
bind-key C-l capture-pane -S -100000 -b log\; save-buffer -b log ~/tmux.log
# I never want to change the layout
unbind Space
# vi-mode navigating
set-window-option -g mode-keys vi
bind-key -T copy-mode-vi 'v' send -X begin-selection
bind-key -T copy-mode-vi 'C-v' send -X rectangle-toggle
bind-key -T copy-mode-vi 'V' send -X select-line
if-shell "uname | grep -q Darwin" \
"bind-key -T copy-mode-vi 'y' send -X copy-pipe-and-cancel 'pbcopy'" \
"bind-key -T copy-mode-vi 'y' send -X copy-selection-and-cancel"
# Set the word separators to get closer to vim's
set-option -g word-separators " -()@.,[]{}:=/"
# Quick window cycling
bind-key C-a last-window
# Move between panes vim style
bind-key h select-pane -L
bind-key j select-pane -D
bind-key k select-pane -U
bind-key l select-pane -R
# Clear scrollback buffer
unbind-key C-k
bind-key C-k send-keys C-l\; run-shell "sleep 0.1"\; clear-history
# Turn on activity monitor for hidden windows
set-window-option -g monitor-activity on
set-option -g visual-activity on
# Start window numbering at 1, not 0
set-option -g base-index 1
set-option -g pane-base-index 1
# Automatically renumber windows when we close one
set-option -g renumber-windows on
# Increase scrollback buffer
set-option -g history-limit 10000
# Allow more colors
set-option -g default-terminal 'screen-256color'
set-option -ga terminal-overrides ',*:Tc'
# Allow mouse
set-option -g mouse on
# Make new splits use the current directory
bind '"' split-window -v -c "#{pane_current_path}"
bind '%' split-window -h -c "#{pane_current_path}"
# Plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @plugin 'tmux-plugins/tmux-continuum'
set -g @plugin 'jimeh/tmux-themepack'
# Plugin config
set -g @resurrect-save 'S'
set -g @resurrect-restore 'R'
# -- This is handled by continuum
set -g @resurrect-save-shell-history 'off'
set -g @resurrect-capture-pane-contents 'on'
set -g @continuum-save-interval '5'
set -g @continuum-restore 'on'
# Theme
set -g @themepack 'powerline/block/gray'
# Initialize tmux plugin manager
run '~/.tmux/plugins/tpm/tpm'