How to get func prototype after func selection via omnicppcomplete?

Is there a way to force vim to insert the function arguments after selecting it via omnifunc (or at least display it after selecting it , but not before )? Sort of:

myObject.play ( int time, std :: string foo )

It might even allow you to enter arguments like those that these plugins allow you to do.

Is there such a plugin or feature? I think this is extremely helpful.

BTW, the omnifunc preview option is very slow and will not display after selecting a function.

0


a source to share


2 answers


Try code_complete .



It uses ctags to complete the function signature and allows you to loop through the list of arguments. It can also bundle other things - standard header files, blocks for()

/ switch()

etc.

+1


a source


you can get the snippetsEMU plugin from the vim website and then set up your own snippet for this function like this:   



:Snippet play myObject.play(int <{time}>, <{std::string}> <{foo}>)<{}>
      

Thus, all you have to do is enter the game and press the tab key so that it expands the curly braces so that you can insert arguments. Hope this is what you are looking for ...
-1


a source







All Articles