Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

netbeans c auto popup code completion

Tags:

c

netbeans

I'm using Netbeans 7 to program C.

Imagine if I type prin and CTRL+SPACE a popup window will come up with the printf suggestion.

How can I make this popup to show as I type? I don't want to use CTRL+SPACE.

like image 246
Favolas Avatar asked Jun 03 '12 16:06

Favolas


People also ask

How do I enable completion code in Netbeans?

To invoke code completion press Ctrl + Space or, choose Source > Complete Code…

Does Netbeans have code completion?

Under Preferences -> Editor -> Code Completion is where you can find the auto complete properties. You can disable the 'Auto Popup Completion Window' to keep it from automatically popping. Also while the completion window is displayed, pressing the esc will close it without inserting an autocomplete value.

What is auto completion code?

Autocomplete, or word completion, is a feature in which an application predicts the rest of a word a user is typing. In Android and iOS smartphones, this is called predictive text. In graphical user interfaces, users can typically press the tab key to accept a suggestion or the down arrow key to accept one of several.


1 Answers

If you have Netbeans with the C/C++ plugin installed, you can go to Tools -> Options -> Editor -> Code Completion.

Switch the Language drop down to C/C++. You can then modify the Auto Popup Triggers for C/C++ Identifiers to something like this:

.;->;.*;->*;::;new ; ;a;b;c;d;e;f;g;h;i;j;k;l;m;n;o;p;q;r;s;t;u;v;w;x;y;z;

This will cause the auto completion window to popup once any of the above patterns are entered. Tested in Netbeans 8.0.2 works like a charm for me.

like image 180
Mike Kuenzi Avatar answered Oct 06 '22 09:10

Mike Kuenzi