-
Notifications
You must be signed in to change notification settings - Fork 96
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Utilize Tmux Plugin Manager to gain functionality
* tmux-sensible * tmux-yank * tmux-pain-control * tmux-resurrect Co-authored-by: Matt Polito <[email protected]>
- Loading branch information
1 parent
22ea31a
commit 0da80b2
Showing
1 changed file
with
15 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,54 +1,37 @@ | ||
set -g @plugin 'tmux-plugins/tpm' | ||
set -g @plugin 'tmux-plugins/tmux-sensible' | ||
set -g @plugin 'tmux-plugins/tmux-yank' | ||
set -g @plugin 'tmux-plugins/tmux-pain-control' | ||
set -g @plugin 'tmux-plugins/tmux-resurrect' | ||
|
||
# Force vi mode keys if $EDITOR is not explicity 'vi' | ||
setw -g mode-keys vi | ||
|
||
set -g default-terminal "screen-256color" | ||
|
||
unbind C-b | ||
set -g prefix C-z | ||
# Better project name in status bar | ||
set -g status-left-length 20 | ||
set -g status-left '#[fg=colour235,bg=colour76,bold] #S ' | ||
|
||
bind z send-keys C-z | ||
bind C-z last-window | ||
|
||
bind | split-window -h | ||
|
||
bind h select-pane -L | ||
bind j select-pane -D | ||
bind k select-pane -U | ||
bind l select-pane -R | ||
bind ` select-window -t 0 | ||
# Search for previous error | ||
bind-key e copy-mode \; send-keys "?Error" C-m | ||
set -sg escape-time 0 | ||
# scrollback buffer size increase | ||
set -g history-limit 100000 | ||
# Use up and down arrows for temporary "maximize" | ||
unbind Up; bind Up resize-pane -Z; unbind Down; bind Down resize-pane -Z | ||
# Copy/paste interop | ||
bind C-c run "tmux show-buffer | reattach-to-user-namespace pbcopy" | ||
bind C-v run "reattach-to-user-namespace pbpaste | tmux load-buffer - && tmux paste-buffer" | ||
# scrollback buffer size increase | ||
set -g history-limit 100000 | ||
bind -T copy-mode-vi y send-keys -X copy-pipe-and-cancel 'reattach-to-user-namespace pbcopy' | ||
bind -T copy-mode-vi v send-keys -X begin-selection | ||
bind -T copy-mode-vi V send-keys -X rectangle-toggle | ||
if-shell '[[ -e ~/.tmux.conf.local ]]' 'source-file ~/.tmux.conf.local' | ||
# Clear screen/history | ||
bind-key C-k send-keys -R \; clear-history | ||
bind-key C-l send-keys -R | ||
# Mouse options for tmux >= 2.5 | ||
set-option -g -q 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" | ||
bind-key -T copy-mode-vi WheelUpPane send-keys -X halfpage-up | ||
bind-key -T copy-mode-vi WheelDownPane send-keys -X halfpage-down | ||
# Better project name in status bar | ||
set -g status-left-length 18 | ||
set -g status-left '#[fg=colour235,bg=colour76,bold] #S ' | ||
run '~/.tmux/plugins/tpm/tpm' | ||
if-shell '[[ -e ~/.tmux.conf.local ]]' 'source-file ~/.tmux.conf.local' | ||
unbind C-b | ||
set -g prefix C-z |