Eclipse CDT (for C++/C development) how to invoke content assist automatically while typing like in Visual Assist for Visual Studio. In other words how to give triggers as all keyboard characters to invoke content assist. Please help me..
-
2I've spent the last year using Eclipse CDT. It seems like the orphan child of the eclipse universe. I've recently started to use Code:Blocks on windows and it works very well, including providing Visual Assist like functionality. – Lou Apr 01 '11 at 04:52
-
@Lou:+1 for the orphan child! I'm forced to use eclipse CDT for quite a while now and have seen several versions in that time. It's getting better and better in small steps but "Content assist" is still lousy. – chrmue Apr 01 '11 at 08:50
4 Answers
It seems that all the useful content assist options are turned off by default. Go to the preferences -> C++ -> Editor -> Content Assist -> Advanced, and check Parsing-based proposal for default (top list) and then some more (like parsing, word, template) in the bottom one.
Of course, you're free to check even more, but parsing-based is the one that matters the most. Of course, you also need to have indexing enabled, by at least that seems to be enabled by default.
And, of course, as already suggested, go to the Content Assist pane itself and make sure it's all turned on, and reduce the delay to make it show up faster (unless you want it to only show up when you press Ctrl+Space).

- 76,846
- 14
- 164
- 167
-
It worked for me after closing Eclipse and reopening it! It seems Eclipse needs restart to apply this change. – SuB Nov 07 '14 at 15:53
-
Content Assist still only seems to show up when I type `.` and similar keys or `CTRL+Space`. Anybody got any luck when enabling it to show up automatically when typing anything? – Aviv Cohn Nov 14 '19 at 11:55
The sad thing is that - at least to my knowledge - content assist didn't change in those 2 years. It is still only triggered by ".", "->" and "::" and there is no way to configure it. The Eclipse Java editor though can be freely configured as wished by Nadith Pathirage: You can add any keys you wish to trigger content assist there. I wonder why CDT can't achieve the same...
(I know this is an old thread, but the topic is still important in my opinion...)

- 436
- 4
- 12
ctrl+Space can work well. but configure as auto-complete just like emacs auto-complete or vim youcompleteme, when typing words will invoke proposal, no way.

- 49
- 1
- 5
Have you tried Ctrl+Space
? Also search for "Content Assist" in the preferences.

- 7,133
- 7
- 49
- 61
-
1@ Acme: In visual assist you get auto complete without pressing any key. even without Ctrl+space. So is there way to have the same functionality in eclipse. Because it helps me a lot to eliminate two key strokes and save my time in programming. By the way thankyou for your reply – Nadith Pathirage Apr 01 '11 at 16:16
-
Content assist is triggered by ".", "->" and "::" (after 500ms but can be lowered). For everything else you have to trigger it manually with Ctrl+Space. – trenki Apr 01 '11 at 19:06
-
I think for Ctrl+Space trigger, eclipse gives a callback to display the content assist. So if i get to know the place in the API to register several triggers for and i.e abcdef .... i may be able to trigger content assist as i type.... any clue ?? – Nadith Pathirage Apr 05 '11 at 04:46