C code autocomplete in Eclipse
Solution 1
Although the eclipse doesn't provide perfect auto-complete, but it works.. This sometimes happens when you have the indexer turned off.
Try to enable the indexer and rebuild the index.
See this question in CDT FAQ. It contains info about how to find indexer error which might prevent auto-complete.
Solution 2
Use the Advanced panel in the Preferences window to configure the behavior of the Content Assist (Ctrl+Space) command.
Go to Preferences->C/C++->Editor->Content Assist->Advanced.
Check the parsing-based-Proposals in Default Proposal kinds.
Ittai
Updated on December 24, 2020Comments
-
Ittai over 3 years
I'm a Java developer and I've downloaded the Eclipse for C (course purposes) and to my amazement the control+space shortcut (for autocomplete) did not work. I've created a new project and a new class using the wizzards and started to type "print" and then tried to find an autocomplete feature. After a bit of googling I arrived at
C/C++
->Editor
->Content Assist
->Advanced
and there I verified thatHelp proposals
,Parsing-based proposals
andTemplate proposals
options were checked. I then went over to theKeys
preferences page using the link at that page and entered a binding for all relevant content assist from beforeC\C++ Content Assist (type...)
and chose in theWhen
box theC\C++ Editor
option. But alas no autocompletion was offered. Can someone please point me to the right direction?UPDATE: I'm accepting the answer not because I'm sure it's right but because I've realised I've made some mistakes with the configuration of the eclipse and have seen that with another installation/configuration (i.e. a friend of mines) eclipse does auto complete, even if it still lack many of the java version features.