|
| 1 | +set -g @plugin 'tmux-plugins/tpm' |
| 2 | +set -g @plugin 'tmux-plugins/tmux-sensible' |
| 3 | +set -g @plugin 'tmux-plugins/tmux-yank' |
| 4 | +set -g @plugin 'tmux-plugins/tmux-pain-control' |
| 5 | +set -g @plugin 'tmux-plugins/tmux-resurrect' |
| 6 | + |
1 | 7 | # Force vi mode keys if $EDITOR is not explicity 'vi' |
2 | 8 | setw -g mode-keys vi |
3 | 9 |
|
4 | | -set -g default-terminal "screen-256color" |
5 | | - |
6 | | -unbind C-b |
7 | | -set -g prefix C-z |
| 10 | +# Better project name in status bar |
| 11 | +set -g status-left-length 20 |
| 12 | +set -g status-left '#[fg=colour235,bg=colour76,bold] #S ' |
8 | 13 |
|
9 | 14 | bind z send-keys C-z |
10 | 15 | bind C-z last-window |
11 | 16 |
|
12 | | -bind | split-window -h |
13 | | - |
14 | | -bind h select-pane -L |
15 | | -bind j select-pane -D |
16 | | -bind k select-pane -U |
17 | | -bind l select-pane -R |
18 | 17 | bind ` select-window -t 0 |
19 | 18 |
|
20 | 19 | # Search for previous error |
21 | 20 | bind-key e copy-mode \; send-keys "?Error" C-m |
22 | 21 |
|
23 | | -set -sg escape-time 0 |
24 | | -
|
25 | | -# scrollback buffer size increase |
26 | | -set -g history-limit 100000 |
27 | | -
|
28 | 22 | # Use up and down arrows for temporary "maximize" |
29 | 23 | unbind Up; bind Up resize-pane -Z; unbind Down; bind Down resize-pane -Z |
30 | 24 |
|
31 | | -# Copy/paste interop |
32 | | -bind C-c run "tmux show-buffer | reattach-to-user-namespace pbcopy" |
33 | | -bind C-v run "reattach-to-user-namespace pbpaste | tmux load-buffer - && tmux paste-buffer" |
| 25 | +# scrollback buffer size increase |
| 26 | +set -g history-limit 100000 |
34 | 27 |
|
35 | | -bind -T copy-mode-vi y send-keys -X copy-pipe-and-cancel 'reattach-to-user-namespace pbcopy' |
36 | | -bind -T copy-mode-vi v send-keys -X begin-selection |
37 | | -bind -T copy-mode-vi V send-keys -X rectangle-toggle |
| 28 | +if-shell '[[ -e ~/.tmux.conf.local ]]' 'source-file ~/.tmux.conf.local' |
38 | 29 |
|
39 | 30 | # Clear screen/history |
40 | 31 | bind-key C-k send-keys -R \; clear-history |
41 | 32 | bind-key C-l send-keys -R |
42 | 33 |
|
43 | | -# Mouse options for tmux >= 2.5 |
44 | | -set-option -g -q mouse on |
45 | | -bind-key -T root WheelUpPane if-shell -F -t = "#{alternate_on}" "send-keys -M" "select-pane -t =; copy-mode -e; send-keys -M" |
46 | | -bind-key -T root WheelDownPane if-shell -F -t = "#{alternate_on}" "send-keys -M" "select-pane -t =; send-keys -M" |
47 | | -bind-key -T copy-mode-vi WheelUpPane send-keys -X halfpage-up |
48 | | -bind-key -T copy-mode-vi WheelDownPane send-keys -X halfpage-down |
49 | | -
|
50 | | -# Better project name in status bar |
51 | | -set -g status-left-length 18 |
52 | | -set -g status-left '#[fg=colour235,bg=colour76,bold] #S ' |
| 34 | +run '~/.tmux/plugins/tpm/tpm' |
53 | 35 |
|
54 | | -if-shell '[[ -e ~/.tmux.conf.local ]]' 'source-file ~/.tmux.conf.local' |
| 36 | +unbind C-b |
| 37 | +set -g prefix C-z |
0 commit comments