From 4393d978233e26e5d46735e2131f02e6190ac523 Mon Sep 17 00:00:00 2001 From: leardo taylor Date: Sat, 9 Nov 2024 15:12:33 +0200 Subject: [PATCH] tmux improve nav --- lua/custom/plugins/tmux.conf | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/lua/custom/plugins/tmux.conf b/lua/custom/plugins/tmux.conf index ea783a35..5742b1b6 100644 --- a/lua/custom/plugins/tmux.conf +++ b/lua/custom/plugins/tmux.conf @@ -1,5 +1,24 @@ # Smart pane switching with awareness of Vim splits. # See: https://github.com/christoomey/vim-tmux-navigator +set-option -sg escape-time 10 + +# vim-like pane resizing +bind -r C-k resize-pane -U +bind -r C-j resize-pane -D +bind -r C-h resize-pane -L +bind -r C-l resize-pane -R + +# and now unbind keys +unbind Up +unbind Down +unbind Left +unbind Right + +unbind C-Up +unbind C-Down +unbind C-Left +unbind C-Right + is_vim="ps -o state= -o comm= -t '#{pane_tty}' \ | grep -iqE '^[^TXZ ]+ +(\\S+\\/)?g?(view|l?n?vim?x?|fzf)(diff)?$'" bind-key -n 'C-h' if-shell "$is_vim" 'send-keys C-h' 'select-pane -L'