-
Notifications
You must be signed in to change notification settings - Fork 0
/
.tmux.conf
102 lines (83 loc) · 1.91 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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
#
# Lots of history.
#
set -g history-limit 100000
#
# Rebind the prefix to CTRL-p.
#
unbind C-b
set -g prefix C-p
#
# Reload config file.
#
unbind r
bind r source-file ~/.tmux.conf
#
# Keep the current directory when creating new windows or panes.
#
if-shell "[[ `tmux -V` == *1.9* ]]" "source-file ~/.tmux.pathrc"
#
# NeoVim compatibility
#
set-option -sg escape-time 10
set-option -g focus-events on
#
# Use 256 colours when available.
#
set -g default-terminal "screen-256color"
#
# Rename the current window.
#
bind C-r command-prompt "rename-window '%%'"
#
# Improve appearance.
#
set -g status-left-length 20
set -g status-right ' %e %b %H:%m:%S '
#
# Quick pane cycling.
#
unbind ^N
bind ^N select-pane -t :.+
#
# hjkl pane traversal
#
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
#
# Make mouse-based scrolling Do The Right Thing.
#
set -g mouse on
bind -n WheelUpPane if-shell -F -t = "#{mouse_any_flag}" "send-keys -M" "if -Ft= '#{pane_in_mode}' 'send-keys -M' 'select-pane -t=; copy-mode -e; send-keys -M'"
bind -n WheelDownPane select-pane -t= \; send-keys -M
#
# "Zoom" for panes: promote to window, demote back to pane.
#
# Thanks to http://tangledhelix.com/blog/2012/06/16/tmux-and-mouse-mode.
#
bind + \
new-window -d -n zoom 'clear && echo "<< zoomed >>" && read' \; \
swap-pane -s zoom.0 \; \
select-window -t zoom
bind - \
last-window \; \
swap-pane -s zoom.0 \; \
kill-window -t zoom
#
# Send the "tmux: do stuff!" command to sub-tmuxes.
#
bind-key C-p send-prefix
#
# Keep the current directory when creating new windows or panes.
#
bind '"' split-window -v -c "#{pane_current_path}"
bind % split-window -h -c "#{pane_current_path}"
bind c new-window -c "#{pane_current_path}"
#
# Load local tmux configuration.
#
if-shell "test -e $HOME/.local/tmux.conf" "source-file $HOME/.local/tmux.conf"
set -g @plugin 'egel/tmux-gruvbox'
run '~/.tmux/plugins/tpm/tpm'