nvim-tmux-navigation
nvim-tmux-navigation copied to clipboard
optimization: Speed up pane switching by circumventing shell and tmux CLI when possible
- Motivation for circumventing Shell: Shell startup time is significant. For some reason, as @isaksamsten mentioned on #16, switching is significantly slower in Fish shell than in other shells. I did some experimentation and found that
vim.fn.system(<string>)
is slow when theshell
option is set to Fish. This change removes dependence on the shell entirely when switching tmux panes, sincesystem
doesn't use a shell when a table is provided in place of a string. - Motivation for short circuiting zoom check: This lets us cut out the latency from invoking
tmux
at all, when a faster boolean check would rule out the conditional