esamattis / slimux

SLIME inspired tmux integration plugin for Vim
http://esa-matti.suuronen.org/blog/2012/04/19/slimux-tmux-plugin-for-vim/
Other
217 stars 52 forks source link

vim hanging when using SlimuxREPLSendLine #61

Closed arifb closed 7 years ago

arifb commented 8 years ago

Hello, Great plugin, invaluable to me. Having issues however, may have been on upgrade to iTerm2 3.0, not sure.

When I issue a SlimuxREPLSendLine, MacVim is unresponsive, with the cursor remaining in the vim command line (bottom).

Looking at running processes, seems to be tmux load-buffer -b Slimux - the command that is causing the hanging. Killing that allows me to continue using vim.

Obviously I'm not able to send text out to the REPL however.

sunaku commented 8 years ago

Are you using tmux 2.2? It's a known issue: see https://github.com/tmux/tmux/pull/416 and try this workaround. :neckbeard:

arifb commented 8 years ago

@sunaku Appreciate the tip - I am using tmux 2.2. Setting that environment variable doesn't do the trick however. I will try to pull in your patch and recompile tmux later today.

arifb commented 8 years ago

Rebuilt tmux including https://github.com/tmux/tmux/pull/416 and the issue persists. If there is more debugging that would be helpful to provide, please let me know.

sunaku commented 8 years ago

Oops, I missed the fact that you're on a Mac. :sweat_smile: The workaround and patch you tried only apply to Linux. Report this issue upstream at tmux: it might be a Mac-related issue that they (have yet to?) know about.

gzagatti commented 8 years ago

Hi @arifb did you managed to find a way around the problem. I'm having exactly the same issue after updating tmux and trying to export EVENT_NOEPOLL=1 as suggested in the link above. Did you have any luck in fixing the issue? I'm also using OS X.

arifb commented 8 years ago

@gzagatti I downgraded to tmux 2.1 for now

gzagatti commented 8 years ago

Yes @arifb I did the same and it works.

sunaku commented 8 years ago

Okay, I've got it! :neckbeard: MacOSX users, please try these settings with tmux 2.2:

export EVENT_NOKQUEUE=1
export EVENT_NOPOLL=1

These magic environment variables come from tmux's MacOSX-specific osdep_event_init() function, whose source code is available at https://github.com/tmux/tmux/blob/2.2/osdep-darwin.c#L77-L78.

Note: This is the same approach I followed for solving this issue in tmux 2.2 running under Linux. :penguin:

gzagatti commented 8 years ago

Thanks @sunaku it works like a charm

slashfoo commented 7 years ago

@arifb can you confirm that it works? I also just pushed a change that lets you specify the path to your tmux, this should allow for better flexibility.

I had an issue with the same symptoms when the tmux session was running one version and slimux found a tmux of another version, hopefully either the mention above or the configuration will alleviate the problem.

hlegius commented 7 years ago

@slashfoo not sure if for @arifb worked, but I tried in tmux 2.2 and worked like a boss! 👍 Without those envs, vim crashes like described above.

slashfoo commented 7 years ago

thanks @hlegius I'll close this issue then.