wellle / tmux-complete.vim

Vim plugin for insert mode completion of words in adjacent tmux panes
MIT License
515 stars 21 forks source link

hangs in osx #65

Closed paulhybryant closed 8 years ago

paulhybryant commented 8 years ago

It works fine in ubuntu but hangs in OSX.

paulhybryant commented 8 years ago

Digging a bit more, the following two command hangs sh ~/.vim/bundle/tmux-complete.vim/sh/tmuxcomplete -l '-a' sh ~/.vim/bundle/tmux-complete.vim/sh/tmuxcomplete -p 'foo'

But this works fine initially, and hangs afterwords sh ~/.vim/bundle/tmux-complete.vim/sh/tmuxcomplete -s lines

paulhybryant commented 8 years ago

tmux capture-pane -p hangs for some reason, and it only happens in OSX, but not ubuntu.

paulhybryant commented 8 years ago

The issue seems to be caused by the shell option. Setting it to /bin/sh and it works fine then. My SHELL is zsh, but it is wired that it works fine in ubuntu

wellle commented 8 years ago

@paulhybryant: Thanks for reaching out, but I don't really follow what was the issue here and would like to understand. I'm using OSX myself without any problems.

  1. What exactly did you do to make it hang?
  2. Does it hang when invoked in Vim as completion or when you run the script manually or both?
  3. What do you mean by "shell option"?

I'm guessing that it hangs when you invoke it from your terminal like this

sh ~/.vim/bundle/tmux-complete.vim/sh/tmuxcomplete -l '-a'

but it works fine when invoked like this:

/bin/sh ~/.vim/bundle/tmux-complete.vim/sh/tmuxcomplete -l '-a'

If that is the case, I would like to know what sh is in your case. Could you run ls -awhich sh`` and try if any of these show anything interesting?

sh --version
sh -v
sh -V

Thanks!

paulhybryant commented 8 years ago

@wellle Thanks for the reply. To answer the first two questions, I use vim and it hangs in insert mode, when neocomplete kicks in. It takes a long time to gather complete candidates. By shell options I mean the vim 'shell' option. e.g. set shell=/bin/sh I think the reason it hangs is because if 'shell' is not set, it uses $SHELL, which is zsh in my case, and for some reason zsh causes the system() call in vim to be slow. By setting 'shell' to /bin/sh, everything works well.