2
0
mirror of https://github.com/webgefrickel/dotfiles synced 2024-11-11 07:10:40 +00:00

Simplify tmux config, use TPM for vim/tmux integration

This commit is contained in:
Steffen Rademacker 2021-05-13 16:57:58 +02:00
parent 6f5d3cb20f
commit 2d9270835b

View File

@ -4,6 +4,8 @@ set -g default-shell $SHELL
set -g prefix C-a set -g prefix C-a
set -g base-index 1 set -g base-index 1
setw -g pane-base-index 1 setw -g pane-base-index 1
setw -g xterm-keys on
setw -g mode-keys vi
set-option -as terminal-overrides ",xterm*:RGB" set-option -as terminal-overrides ",xterm*:RGB"
# Copy & Paste with clipper -- see https://github.com/wincent/clipper # Copy & Paste with clipper -- see https://github.com/wincent/clipper
@ -23,16 +25,6 @@ bind -n WheelUpPane if-shell -F -t = "#{mouse_any_flag}" "send-keys -M" "if -Ft=
bind -n WheelDownPane select-pane -t= \; send-keys -M bind -n WheelDownPane select-pane -t= \; send-keys -M
bind -n C-WheelUpPane select-pane -t= \; copy-mode -e \; send-keys -M bind -n C-WheelUpPane select-pane -t= \; copy-mode -e \; send-keys -M
# Vim/nvim integration fixes
setw -g xterm-keys on
setw -g mode-keys vi
is_vim='echo "#{pane_current_command}" | grep -iqE "(^|\/)g?(view|n?vim?)(diff)?$"'
bind -n C-h if-shell "$is_vim" "send-keys C-h" "select-pane -L"
bind -n C-j if-shell "$is_vim" "send-keys C-j" "select-pane -D"
bind -n C-k if-shell "$is_vim" "send-keys C-k" "select-pane -U"
bind -n C-l if-shell "$is_vim" "send-keys C-l" "select-pane -R"
bind -n 'C-\' if-shell "$is_vim" "send-keys C-\\" "select-pane -l"
# Custom statusbar # Custom statusbar
set -g status-style bg=black,fg=yellow,default set -g status-style bg=black,fg=yellow,default
set -g pane-border-style fg=black set -g pane-border-style fg=black
@ -53,16 +45,13 @@ setw -g clock-mode-colour green
# Plugin configuration # Plugin configuration
set -g @resurrect-processes 'l nnn v vim nvim m mutt neomutt' set -g @resurrect-processes 'l nnn v vim nvim m mutt neomutt'
set -g @resurrect-strategy-vim 'session'
set -g @resurrect-strategy-nvim 'session'
set -g @continuum-boot 'on'
set -g @continuum-restore 'on' set -g @continuum-restore 'on'
set -g @continuum-boot-options 'iterm'
# Plugins loading and tmux plugin manager initialization # Plugins loading and tmux plugin manager initialization
set -g @plugin 'tmux-plugins/tpm' set -g @plugin 'christoomey/vim-tmux-navigator'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @plugin 'tmux-plugins/tmux-continuum'
set -g @plugin 'schasse/tmux-jump' set -g @plugin 'schasse/tmux-jump'
set -g @plugin 'tmux-plugins/tmux-continuum'
set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'tmux-plugins/tpm'
run '~/.tmux/plugins/tpm/tpm' run '~/.tmux/plugins/tpm/tpm'