I know that I can get word completion through CTRL+N & CTRL+P and code completion through omnifunc with CTRL+X CTRL+O. I additionally tried Supertab (very nice), because I'm used to TAB-completion. That all worked all right. I would like to see possible matches while I'm typing, so I also tried autocomplpop.vim, witch does just that.
What I like to accomplish though, would be a combination of both together with a little twist: I would like to see suggestions pop up as I type (just like with autocompop) but when I use TAB the word should be expanded only to the largest common match:
foo bar testor booze test baz teter
te<TAB>
After I type te in the 2nd line, the popup should suggest test, teter and testor.
When I press TAB, it should do nothing, because there is no more common ground than te. After I typed an additional s and press TAB, it should expand tes to test (because it is the smallest common ground) and to testor after a 2nd TAB.
Edit: I try to be more clear...
te<TAB>- should do nothing because "we" don't know if a 't' (te*t*er) or an 's' (te*s*t, te*s*tor) should follow.
tes<TAB>- should expand to
test(because that works for both - test and testor - and teter is no longer a possible match).
- should expand to
test<TAB>- should expand to
testor(only possible match).
- should expand to
Well, the suggestions popup is just bonus, but I really would love to see the TAB behavior. Hope I don't get to esoteric here and you can help me out with some script-tricks or plugins to tame VIM to do just that.