Question

I’m actively using it for Python and C++ development and it’s kind of frustrating that the menu always closes on me when I enter the function parentheses, because that’s normally when I need most of the help (types and order of parameters).

Was it helpful?

Solution

Vim's omni completion does not work exactly like Intellisense in IDEs; it helps completing an identifier or function name, but has no notion of function arguments and their types. That means: It can help you with typing frobnize, may even show the function prototype frobnize(Foo, Bar), but cannot help you with completing the function arguments. For that, the completion function would need to consider the full underlying syntax and the previous context, which most don't.

The only aid that some completions offer is that the function prototype is shown in the preview window (with :set completeopt+=preview, which is the default). The preview window stays open after the completion, so you still have the last function prototype visible. However, not all completions provide this information.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top