-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtmux.conf
73 lines (58 loc) · 1.93 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
# delays
set -g escape-time 0
set -g repeat-time 300
# set window and pane index to 1 (0 by default)
set -g base-index 1
set -g pane-base-index 1
# renumber windows when one is closed
set -g renumber-windows on
# big history
set -g history-limit 100000
# Prefix highlight
set -g @prefix_highlight_fg 'black' # default is 'colour231'
set -g @prefix_highlight_bg 'green' # default is 'colour04'
set -g status-right '#{prefix_highlight} | %a %Y-%m-%d %H:%M'
# vim style in copy and choice modes
setw -g mode-keys vi
# new windows/panes on current directory
bind c new-window -c "#{pane_current_path}"
bind % split-window -h -c "#{pane_current_path}"
bind '"' split-window -v -c "#{pane_current_path}"
# vim style for pane navigation
bind -r h select-pane -L
bind -r j select-pane -D
bind -r k select-pane -U
bind -r l select-pane -R
# vim style to resize panes
bind -r H resize-pane -L 2
bind -r J resize-pane -D 2
bind -r K resize-pane -U 2
bind -r L resize-pane -R 2
# move windows
bind -r < swap-window -t -1
bind -r > swap-window -t +1
# clear screen and buffer
bind C-k send -l "clear && tmux clear-history" \; send "Enter"
# ----------------
# | Mouse settings |
# ----------------
# enable mouse
set -g mouse on
bind-key -T root WheelUpPane if-shell -F -t = "#{alternate_on}" "send-keys -M" "select-pane -t =; copy-mode -e; send-keys -M"
bind-key -T root WheelDownPane if-shell -F -t = "#{alternate_on}" "send-keys -M" "select-pane -t =; send-keys -M"
# toggle mouse on
bind m \
set -g mouse on \;\
display "Mouse: ON"
# toggle mouse off
bind M \
set -g mouse off \;\
display "Mouse: OFF"
# List of plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'tmux-plugins/tmux-prefix-highlight'
set -g @plugin 'tmux-plugins/tmux-copycat'
set -g @plugin 'tmux-plugins/tmux-yank'
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run '~/.tmux/plugins/tpm/tpm'