-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtmux.conf
71 lines (56 loc) · 2.15 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
# ----------------------------------------------------------------------
# ~/.dotfiles/tmux.conf
# Mark Spain
# ----------------------------------------------------------------------
# set proper true colors
set -g default-terminal "tmux-256color"
set -ag terminal-overrides ",xterm-256color:RGB"
# change the default command prefix
set -g prefix C-a
unbind C-b
bind-key C-a send-prefix
# change keybinds for splitting windows
# (side-by-side)
unbind %
bind | split-window -h
# (top-bottom)
unbind '"'
bind - split-window -v
# change binding to reload tmux config
unbind r
bind r source-file $HOME/.tmux.conf
# bindings to resize panes
bind -r j resize-pane -D 5
bind -r k resize-pane -U 5
bind -r l resize-pane -R 5
bind -r h resize-pane -L 5
# maximize pane (same to "un-maximize")
bind -r m resize-pane -Z
# enable mouse support
set -g mouse on
# change how copy/paste works to match vim
set-window-option -g mode-keys vi
bind-key -T copy-mode-vi 'v' send -X begin-selection # start selecting text with "v"
bind-key -T copy-mode-vi 'y' send -X copy-selection # copy text with "y"
unbind -T copy-mode-vi MouseDragEnd1Pane # don't exit copy mode after dragging with mouse
# increase scrollback lines
set-option -g history-limit 5000
# tpm plugin
set -g @plugin 'tmux-plugins/tpm'
# list of tmux plugins
set -g @plugin 'jimeh/tmux-themepack' # tmux themes
set -g @plugin 'tmux-plugins/tmux-resurrect' # persist tmux sessions after computer restarts
set -g @plugin 'tmux-plugins/tmux-continuum' # automatically saves sessions every 15 minutes
# set tmux theme
set -g @themepack 'powerline/block/blue'
# configure resurrect and continuum
set -g @resurrect-capture-pane-contents 'on' # allow tmux-ressurect to capture pane contents
set -g @continuum-restore 'on' # enable tmux-continuum functionality
# install tmux plugin manager (tpm) and initialze plugins
if "test ! -d $HOME/.tmux/plugins/tpm" {
run "mkdir -p $HOME/.tmux/plugins"
run "git clone https://github.com/tmux-plugins/tpm $HOME/.tmux/plugins/tpm"
run "$HOME/.tmux/plugins/tpm/bindings/install_plugins"
}
# initialize tmux plugin manager (keep this line at the very bottom of tmux.conf)
run "$HOME/.tmux/plugins/tpm/tpm"