diff --git a/config/tmux/tmux.conf b/config/tmux/tmux.conf index eb692b87..c8641d9b 100644 --- a/config/tmux/tmux.conf +++ b/config/tmux/tmux.conf @@ -29,24 +29,6 @@ bind -n C-M-S-Down resize-pane -D 5 bind -n C-M-S-Up resize-pane -U 5 bind -n C-M-S-Right resize-pane -R 5 -# Smart pane switching with awareness of Vim splits. -# See: https://github.com/christoomey/vim-tmux-navigator -is_vim="ps -o state= -o comm= -t '#{pane_tty}' \ - | grep -iqE '^[^TXZ ]+ +(\\S+/)?g?\\.?(view|l?n?vim?x?|fzf)(diff)?(-wrapped)?$'" -bind-key -n 'C-h' if-shell "$is_vim" 'send-keys C-h' 'select-pane -L' -bind-key -n 'C-j' if-shell "$is_vim" 'send-keys C-j' 'select-pane -D' -bind-key -n 'C-k' if-shell "$is_vim" 'send-keys C-k' 'select-pane -U' -bind-key -n 'C-l' if-shell "$is_vim" 'send-keys C-l' 'select-pane -R' -if-shell -b '[ "$(echo "$(tmux -V | sed -En "s/^tmux ([0-9]+(.[0-9]+)?).*/\1/p") < 3.0" | bc)" = 1 ]' \ - "bind-key -n 'C-\\' if-shell \"$is_vim\" 'send-keys C-\\' 'select-pane -l'" -if-shell -b '[ "$(echo "$(tmux -V | sed -En "s/^tmux ([0-9]+(.[0-9]+)?).*/\1/p") >= 3.0" | bc)" = 1 ]' \ - "bind-key -n 'C-\\' if-shell \"$is_vim\" 'send-keys C-\\\\' 'select-pane -l'" - -bind-key -T copy-mode-vi 'C-h' select-pane -L -bind-key -T copy-mode-vi 'C-j' select-pane -D -bind-key -T copy-mode-vi 'C-k' select-pane -U -bind-key -T copy-mode-vi 'C-l' select-pane -R -bind-key -T copy-mode-vi 'C-\' select-pane -l # Window navigation bind r command-prompt -I "#W" "rename-window -- '%%'" diff --git a/migrations/1771386669.sh b/migrations/1771386669.sh deleted file mode 100644 index 4916a285..00000000 --- a/migrations/1771386669.sh +++ /dev/null @@ -1,24 +0,0 @@ -echo "Add vim-tmux-navigator plugin for seamless tmux/nvim navigation" - -mkdir -p ~/.config/nvim/lua/plugins - -cat > ~/.config/nvim/lua/plugins/tmux-navigator.lua << 'EOF' -return { - "christoomey/vim-tmux-navigator", - cmd = { - "TmuxNavigateLeft", - "TmuxNavigateDown", - "TmuxNavigateUp", - "TmuxNavigateRight", - "TmuxNavigatePrevious", - "TmuxNavigatorProcessList", - }, - keys = { - { "", "TmuxNavigateLeft" }, - { "", "TmuxNavigateDown" }, - { "", "TmuxNavigateUp" }, - { "", "TmuxNavigateRight" }, - { "", "TmuxNavigatePrevious" }, - }, -} -EOF