preservim / vimux

easily interact with tmux from vim
MIT License
2.19k stars 158 forks source link

VimuxOpenRunner doesn't work any more #225

Open matawed opened 4 months ago

matawed commented 4 months ago

It seems that my nvim/vimux setup is broken with https://github.com/preservim/vimux/pull/217. If I run VimuxOpenRunner it silently fails, meaning that no terminal is opened.

Once I revert this change locally, my setup works again, meaning that terminal is opened as expected.

Tmux version 3.0a/ Ubuntu 20.04

matawed commented 4 months ago

Will provide more details upon request/once I have more time to check details.

mvanderkamp commented 4 months ago

Some more details would be helpful, can you share your configuration?

matawed commented 4 months ago

Steps to reproduce on Ubuntu 20.04 with tmux 3.0a

cd ~/.vim/
mkdir -p pack/vimux/start
git clone https://github.com/preservim/vimux

vim -V9/tmp/vim.txt

produces

vim.log

if you do

:VimuxOpenRunner

The problematic command is

tmux split-window -l 20% -v

See

image

matawed commented 4 months ago

Though -l size seems to be supported

image

but seems to be only for absolute values

image

matawed commented 4 months ago

Naive approach for fixing this issue is to check the exit code of this command and if it fails then issue the other command. I guess, it would be helpful in any case to check exit code and not only silently fail in this case. What do you think?

mvanderkamp commented 4 months ago

Ahh, thank you. I think I'll put a conditional in there based on the tmux version.

mvanderkamp commented 3 months ago

You know what... should we just say that it's up to the user to decide whether to include the percent sign? This will be a bit of a hiccup when the plugin is updated, since setting let g:VimuxHeight = "20" will have to change to let g:VimuxHeight = "20%".