From 2d9270835bb8e2cc1002945d9a3f2690ac7cc1d1 Mon Sep 17 00:00:00 2001 From: Steffen Rademacker Date: Thu, 13 May 2021 16:57:58 +0200 Subject: [PATCH] Simplify tmux config, use TPM for vim/tmux integration --- tmux.conf | 25 +++++++------------------ 1 file changed, 7 insertions(+), 18 deletions(-) diff --git a/tmux.conf b/tmux.conf index 6459234..2781b23 100644 --- a/tmux.conf +++ b/tmux.conf @@ -4,6 +4,8 @@ set -g default-shell $SHELL set -g prefix C-a set -g 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" # 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 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 set -g status-style bg=black,fg=yellow,default set -g pane-border-style fg=black @@ -53,16 +45,13 @@ setw -g clock-mode-colour green # Plugin configuration 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-boot-options 'iterm' # Plugins loading and tmux plugin manager initialization -set -g @plugin 'tmux-plugins/tpm' -set -g @plugin 'tmux-plugins/tmux-sensible' -set -g @plugin 'tmux-plugins/tmux-resurrect' -set -g @plugin 'tmux-plugins/tmux-continuum' +set -g @plugin 'christoomey/vim-tmux-navigator' 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'