preservim / vimux

easily interact with tmux from vim
MIT License
2.21k stars 161 forks source link

VimuxRunnerName doesn't find existing session when runner type is "pane" #219

Closed callumacrae closed 1 year ago

callumacrae commented 1 year ago

Here's an excerpt from my config:

let g:VimuxRunnerType = "pane"
let g:VimuxRunnerName = "vimuxout"

Whenever I restart vim, vimux opens a new pane for itself.

I believe this to be a difference in how tmux handles window name and pane names.

This works:

tmux rename-window vimuxout
tmux select-window -t vimuxout

This does not:

tmux select-pane -T vimuxout
tmux select-pane -t vimuxout

Results in "can't find pane: vimuxout" - only tmux select-pane -t 0 works. It looks like this is because you can't actually rename a pane, you can just set a title, and select-pane -t doesn't query the title?

Not really sure. Still trying to figure it out for myself but I've been trying for a while and not having much luck :(

callumacrae commented 1 year ago

duh, was missing let g:VimuxUseNearest = v:true - which did not do what i thought it does from the name 😅

alerque commented 1 year ago

Glad you figured it out. If there is any documentation that you were reading and didn't clarify things for you PRs are always welcome improving the docs so that the next folks along don't stumble over the same things.

mvanderkamp commented 1 year ago

For more advanced layouts, there's also g:VimuxRunnerQuery