Coming from Visual Studio, I've grown accustomed to having automatic autocomplete when I type a non-alphanumeric character:

At this point in time, if I press space (or ), ;, etc.), Visual Studio will assume I want public and will insert it for me.
I'd like this functionality in Vim. The default autocomplete is close (pressing Ctrl+P while in Insert mode), but I'd like to have the autocomplete dropdown open automatically.
I tried out the AutoComplPop plugin, which pops open the options dropdown automatically, but also requires the user to press Enter to actually insert the selection:

Is there a plugin that provides Visual Studio-style autocomplete functionality? Or is there a way to configure Vim's default autocomplete to behave in this manner?
Just to be clear, I'm not asking about the suggestions provided by Vim's autocomplete (I've found plenty of documentation about adding custom dictionaries), but rather the mechanics of the autocomplete itself.
Unlike <Down> and <Up> which only move down and up the popup menu, <C-n> and <C-p> also insert the selected suggestion so you can just keep typing (a <space>, a .…) without having to press <CR>.
For what it's worth, I've forked AutoComplPop to add PHP and JavaScript support and just hacked in support for the kind of interaction you want.

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With