Skip to content

Commit 0da80b2

Browse files
Matt Politomattpolito
authored andcommitted
Utilize Tmux Plugin Manager to gain functionality
* tmux-sensible * tmux-yank * tmux-pain-control * tmux-resurrect Co-authored-by: Matt Polito <matt.polito@gmail.com>
1 parent 22ea31a commit 0da80b2

1 file changed

Lines changed: 15 additions & 32 deletions

File tree

.tmux.conf

Lines changed: 15 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,54 +1,37 @@
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+
17
# Force vi mode keys if $EDITOR is not explicity 'vi'
28
setw -g mode-keys vi
39

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

914
bind z send-keys C-z
1015
bind C-z last-window
1116

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
1817
bind ` select-window -t 0
1918
2019
# Search for previous error
2120
bind-key e copy-mode \; send-keys "?Error" C-m
2221
23-
set -sg escape-time 0
24-
25-
# scrollback buffer size increase
26-
set -g history-limit 100000
27-
2822
# Use up and down arrows for temporary "maximize"
2923
unbind Up; bind Up resize-pane -Z; unbind Down; bind Down resize-pane -Z
3024
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
3427
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'
3829
3930
# Clear screen/history
4031
bind-key C-k send-keys -R \; clear-history
4132
bind-key C-l send-keys -R
4233
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'
5335
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

Comments
 (0)