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