vimux
vimux copied to clipboard
Vimux doesn't accept all tmux pane identifiers
In my config I have logic to dynamically select which pane to run a command in by setting g:VimuxRunnerIndex
prior to calling VimuxRunCommand
. However, if I set g:VimuxRunnerIndex
to "{down-of}"
, Vimux will not run the command in the correct pane due to this line which, as far as I can tell, is supposed to check if the pane exists. The issue is that s:hasRunner
doesn't account for these special pane identifiers.
Understood. I would be happy to accept a PR that fixes this bug if you (or anyone else reading this) has any idea how to make it happen.
The issue as I see it is that g:VimuxRunnerIndex
is really only intended for internal use, as a way of consistently tracking the runner pane even if it is moved around. I'm not sure that broadcasting that this variable exists and allowing something like "{down-of}"
inside it makes sense in that context.
It sounds like what's wanted here is an option to supply the exact target-pane
search string to use when connecting a runner.
That said, looks like these search strings have been available since tmux 2.2. I think we should not only support them, but use them for the "nearest index" search instead of the current search approach (which doesn't really find the nearest, exactly).
Also, might make sense to rename the internal functions to make it more clear that we are actually looking at the pane/window id, not merely its index.