wellle / tmux-complete.vim

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

tmux-complete cannot play with YouCompleteMe #49

Closed kevin4fly closed 9 years ago

kevin4fly commented 9 years ago

Installing the latest YouCompleteMe and tmux-complete.vim plugins respectively. Add let g:tmuxcomplete#trigger = 'omnifunc' to ~/.vimrc.

Pressing <c-space> doesn't trigger tmux completion in vim.

Sean1708 commented 9 years ago

@wellle Any time.

wellle commented 9 years ago

@justinmk: After rebuilding youcompleteme it finally works! Thanks :+1:

Now I can look into the tmux-complete integration :wink:

justinmk commented 9 years ago

:cake: Glad we reached a resolution. Incidentally, regular Vim might work for you now that your python environment is sane...

wellle commented 9 years ago

My current Vim doesn't have +python and I'm fine with using neovim to test youcompleteme integration. I might actually start using neovim instead of vim in the near future.

sencer commented 9 years ago

Any updates on this one? I moved from neocomplete to ycm -and loved it far better. This is the only thing I miss.

wellle commented 9 years ago

@sencer: I'll see if I can make any progress this weekend.

wellle commented 9 years ago

Actually I've taken a quick look and it seems to work:

  1. I'm using NeoVim (version https://github.com/neovim/neovim/commit/2aa2513b8e023a0d7bd2071299f0ea59a4d4ce25, didn't manage to build current master)
  2. In my vimrc/nvimrc I have this (using NeoBundle, but shouldn't be relevant):

    if has('nvim')
       NeoBundle 'Valloric/YouCompleteMe', {'build':{'mac':'./install.sh'}}
       let g:tmuxcomplete#trigger = 'omnifunc'
    endif
  3. In any file, YouCompleteMe seems to work. When typing the beginning of an existing word it gets suggested automatically.
  4. Having a tmux split next to Vim containing words not in my current buffer (I did ls and see Makefile, which is not found in my vimrc which I have open in Vim)
  5. In insert mode, typing Make doesn't suggest anything automatically.
  6. Pressing C-XX-O after Make shows the tmux-complete suggestion Makefile.
  7. Pressing C-Space instead after Make also shows Makefile, so YouCompleteMe is successfully invoking tmux-complete via omnifunc.

Please reopen if this doesn't work for you.

sencer commented 9 years ago

OK, that is working. I was expecting to be able to use both tmux completion and whatever omnicompletion exists for a a filetype. I suppose it is not possible with YCM?

wellle commented 9 years ago

I guess it might be too slow for realtime suggestions so I think it's better to trigger it explicitly.

sencer commented 9 years ago

I am not sure I understand you point.

For example when writing a ruby code with YCM, this is what you get normally: completefunc=youcompleteme#Complete and omnifunc=rubycomplete#Complete.

How can one trigger tmux completion in this case?

justinmk commented 7 years ago

Neovim now includes a :CheckHealth command to hopefully make this less painful.