wellle / tmux-complete.vim

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

add neocomplcache integration #68

Closed javier-lopez closed 8 years ago

javier-lopez commented 8 years ago

Hello,

Thank you for the plugin, I've just installed it and find it useful, however in some systems I'm stuck with old vim versions 7.3-429 (Ubuntu 12.04 LTS)and therefore I use neocomplcache. This commit adds neocomplcache integration.

wellle commented 8 years ago

@chilicuil: Thanks for the integration! Looks very similar to what we already have for neocomplete. I noticed two differences:

  1. You set min_pattern_length while we don't set it for neocomplete.
  2. You inject a:context.complete_str into tmuxcomplete#complete while neocomplete injects ''.

Would it make sense to update the neocomplete integration to behave similar to your implementation?

javier-lopez commented 8 years ago

@wellle:

Not sure

  1. In my tests tmux-complete starts autocompleting after two characters and doesn't seem to exists a way to modify that behavior, so I made it honor g:neocomplcache_auto_completion_start_length which in my case is a higher value. Other persons may prefer the current state. The integration could also define its own global variable, eg: g:neocomplete#sources#tmux#min_keyword_length, g:neocomplcache_tmux_completion_start_length
  2. neocomplete seems to filter source results, so even when it passes '' the suggested completion words make sense, neocomplcache doesn't filter so I had to injecting a pattern to the sh script to only get desired words.
wellle commented 8 years ago

@chilicuil: Makes sense. I just tested your integration and it works great. Thanks for your contribution :+1: