Skip to content

Commit 06274da

Browse files
Matt Politomattpolito
andcommitted
Utilize Tmux Plugin Manager to gain functionality
* tmux-sensible * tmux-yank * tmux-pain-control * tmux-resurrect Co-authored-by: Matt Polito <[email protected]>
1 parent 405c379 commit 06274da

File tree

1 file changed

+27
-32
lines changed

1 file changed

+27
-32
lines changed

.tmux.conf

Lines changed: 27 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,49 +1,44 @@
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'
118
setw -g mode-keys vi
219

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 '
723

824
bind z send-keys C-z
925
bind C-z last-window
1026

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
1727
bind ` select-window -t 0
1828
1929
# Search for previous error
2030
bind-key e copy-mode \; send-keys "?Error" C-m
2131
22-
set -sg escape-time 0
23-
24-
# scrollback buffer size increase
25-
set -g history-limit 100000
26-
2732
# Use up and down arrows for temporary "maximize"
2833
unbind Up; bind Up resize-pane -Z; unbind Down; bind Down resize-pane -Z
2934
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
3337
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'
3739
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'
4441
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

Comments
 (0)