@@ -26,10 +26,15 @@ bind j select-pane -D
2626bind k select-pane -U
2727bind l select-pane -R
2828
29- bind -n C-h select-pane -L
30- bind -n C-j select-pane -D
31- bind -n C-k select-pane -U
32- bind -n C-l select-pane -R
29+ # unbind -n C-h select-pane -L
30+ # unbind -n C-j select-pane -D
31+ # unbind -n C-k select-pane -U
32+ # unbind -n C-l select-pane -R
33+
34+ # bind -n C-h select-pane -L
35+ # bind -n C-j select-pane -D
36+ # bind -n C-k select-pane -U
37+ # bind -n C-l select-pane -R
3338
3439bind ] swap-pane -D
3540bind [ swap-pane -U
@@ -205,12 +210,42 @@ set -ag status-right '#[fg=#{@thm_fg},bg=#1e1e2e] #(echo "#{pane_current_path}"
205210# run ~/.config/tmux/plugins/tmux-plugins/tmux-battery/battery.tux
206211
207212
213+ # Tmux Ressurect config
214+ # ========================================================================================================================
208215set -g @plugin ' tmux-plugins/tmux-resurrect'
209216# set -g @plugin 'tmux-plugins/tmux-continuum'
210217# set -g @continuum-restore 'on'
211218
219+ # FIX: I'm pretty sure this is not removing current sessions
212220set -g @resurrect-hook-pre-restore-pane-processes ' tmux switch-client -n && tmux kill-session -t=0'
213221
222+
223+ # Required integration settings
224+ set -g @plugin ' christoomey/vim-tmux-navigator'
225+ # Smart pane switching with awareness of Vim splits.
226+ # See: https://github.com/christoomey/vim-tmux-navigator
227+ # vim_pattern='(\S+/)?g?\.?(view|l?n?vim?x?|fzf)(diff)?(-wrapped)?'
228+ # is_vim="ps -o state= -o comm= -t '#{pane_tty}' \
229+ # | grep -iqE '^[^TXZ ]+ +${vim_pattern}$'"
230+ # bind-key -n 'C-h' if-shell "$is_vim" 'send-keys C-h' 'select-pane -L'
231+ # bind-key -n 'C-j' if-shell "$is_vim" 'send-keys C-j' 'select-pane -D'
232+ # bind-key -n 'C-k' if-shell "$is_vim" 'send-keys C-k' 'select-pane -U'
233+ # bind-key -n 'C-l' if-shell "$is_vim" 'send-keys C-l' 'select-pane -R'
234+ # tmux_version='$(tmux -V | sed -En "s/^tmux ([0-9]+(.[0-9]+)?).*/\1/p")'
235+ # if-shell -b '[ "$(echo "$tmux_version < 3.0" | bc)" = 1 ]' \
236+ # "bind-key -n 'C-\\' if-shell \"$is_vim\" 'send-keys C-\\' 'select-pane -l'"
237+ # if-shell -b '[ "$(echo "$tmux_version >= 3.0" | bc)" = 1 ]' \
238+ # "bind-key -n 'C-\\' if-shell \"$is_vim\" 'send-keys C-\\\\' 'select-pane -l'"
239+ #
240+ # bind-key -T copy-mode-vi 'C-h' select-pane -L
241+ # bind-key -T copy-mode-vi 'C-j' select-pane -D
242+ # bind-key -T copy-mode-vi 'C-k' select-pane -U
243+ # bind-key -T copy-mode-vi 'C-l' select-pane -R
244+ # bind-key -T copy-mode-vi 'C-\' select-pane -l
245+ # Prevent tmux from swallowing keys meant for Neovim
246+
247+ # set -g allow-rename off
248+
214249# TPM setup
215250# RUN LAST
216251set -g @plugin ' tmux-plugins/tpm'
0 commit comments