-
Notifications
You must be signed in to change notification settings - Fork 0
Add psmux-vim-navigator plugin (port of vim-tmux-navigator) #1
Description
Summary
Port vim-tmux-navigator as a psmux plugin. vim-tmux-navigator enables seamless Ctrl+h/j/k/l navigation between Vim splits and tmux panes without a prefix key, by detecting whether the active pane is running Vim.
Motivation
psmux-pain-control provides Prefix + h/j/k/l pane navigation, but it requires the prefix key and isn't Vim-aware. vim-tmux-navigator is one of the most popular tmux plugins because it makes Vim and tmux feel like a single unified workspace.
Prior Art
marlocarlo/psmux#30 confirmed the building blocks exist in psmux:
bind-key -n(root table bindings without prefix)if-shell(conditional execution)select-pane -L/-R/-U/-D
The missing piece was Windows-native foreground process detection for if-shell. The issue noted that psmux already detects foreground processes via CreateToolhelp32Snapshot for auto-rename, so extending this to if-shell conditions is feasible.
Proposed Behavior
Ctrl+h— move left (Vim split or psmux pane)Ctrl+j— move downCtrl+k— move upCtrl+l— move right- When the active pane is running Vim/Neovim, send the key to Vim instead of navigating panes
- When at the edge of Vim splits, fall through to psmux pane navigation
Workaround
Until this plugin exists, simplified (non-Vim-aware) bindings work:
bind-key -n C-h select-pane -L
bind-key -n C-j select-pane -D
bind-key -n C-k select-pane -U
bind-key -n C-l select-pane -R