Difference between user complete and omni complete in vim

4

1

I'm using neocomplcache in Vim 7.3. When entering some code I'd expect it to suggest completions based on the class of the variable:

$db = new MembersDatabase();
$db-> /* Sugest addMember, printMembers, __construct */

Instead vim just outputs

-- User defined completion (^U^N^P) Pattern not found

However if I hit <C-x><C-o> omni completion pops up and shows me what I expect.

Isn't neocomplcache supposed to be smarter than that? Can I just disable user complete since (in this instance) omni obviously is what I want.

Additional question, on some screenshots for neocomplcache they show method signatures when suggesting completions, how do I enable those?

Link to my vim config Pastibin of .vimrc

Kristoffer Sall-Storgaard

Posted 2012-12-02T08:36:14.290

Reputation: 203

Answers

1

let g:neocomplcache_omni_patterns.php = '[^. \t]->\h\w*\|\h\w*::'

is supposed to kick the plugin into omnicompletion mode after a -> or a ::. You should post an issue on GitHub.

Also I don't see method signatures in any of those screenshots but the PHP omnicompletion script already does that in small preview window.

romainl

Posted 2012-12-02T08:36:14.290

Reputation: 19 227