-
Notifications
You must be signed in to change notification settings - Fork 1
/
tmux.conf
76 lines (55 loc) · 2.17 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
set-option -g default-shell $SHELL
# Italics a256 colors for vim
set-option -g default-terminal "xterm-256color"
# set -as terminal-overrides ',xterm*:sitm=\E[3m'
# Change prefix to be Ctrl-space
set-option -g prefix C-space
# Sort sessions by name
bind s choose-tree -s -O name
# Start window numbering at 1
set-option -g base-index 1
set-window-option -g pane-base-index 1
# Open splits in the same directory
bind c new-window -c "#{pane_current_path}"
# split panes using \ and -
# It really should be | instead of \, but \ requires one less keystroke
bind '\' split-window -h -c "#{pane_current_path}"
bind - split-window -v -c "#{pane_current_path}"
unbind '"'
# move windows with CTRL-SHIFT and arrow keys
bind-key -n C-S-Left swap-window -t -1\; select-window -t -1
bind-key -n C-S-Right swap-window -t +1\; select-window -t +1
# Create a new session and change to HOME directory
bind N new -c "${HOME}"
# Reload config with a key
bind-key r source-file ~/.tmux.conf \; display "Config reloaded!"
# Mouse works as expected
set-option -g mouse on
# # Scrolling works as expected
# set -g terminal-overrides 'xterm*:smcup@:rmcup@'
# # Make it possible for vim to reload files
set -g focus-events on
# Use vim keybindings in copy mode
setw -g mode-keys vi
set-option -s set-clipboard on
# # Setup 'v' to begin selection as in Vim
bind-key -T copy-mode-vi v send-keys -X begin-selection
# Resurrect ViM session of Session.vim file exists
set -g @resurrect-strategy-vim 'session'
# Restoring pane contents
set -g @resurrect-capture-pane-contents 'on'
# set -g @resurrect-strategy-vim 'session'
set -g @resurrect-processes '~Vim -> vim bundle'
# Turn on continuous saving of session
set -g @continuum-restore 'on'
set -g @continuum-save-interval '15'
# Show status of tmux-continuum
set -g status-right 'Continuum status: #{continuum_status}'
# Evenly distribute panes vertically stacked
bind-key w select-layout tiled
bind-key z resize-pane -Z
# Platform-dependent configurations
if-shell 'test "$(uname -s)" = Darwin' 'source-file ~/.tmux/tmux-macos.conf'
source-file ~/.tmux/plugins.conf
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run '~/.tmux/plugins/tpm/tpm'