Using Content Assist
Use Content Assist to insert C/C++ elements of your project, and code templates into your code. You can insert a code template into your source code rather than retyping
commonly-used snippets of code.
To insert a code template or element:
- In the C/C++ editor, type at least the first letter of a code template or
element then Ctrl+Space.
A list displays the code templates
followed by the elements that start with the letter combination you typed.
- Do one of the following:
- Continue typing. The list shortens. When there is only one item in the
list, it is automatically inserted.
- Double-click an item in the list to insert it into your code.
- Press Esc to close the Content Assist Window.
To set Content Assist preferences:
- Click Window > Preferences.
- Expand C/C++, and click C/C++ Editor.
- Click the Content Assist tab.

- Do the following:
- To change the scope from which Content Assist retrieves its proposals, select
either Search current file and included files or Search current project
by selecting the appropriate the radio button.
- To insert an element when you open Content Assist and it is the only
item in the list, select the Insert single proposals automatically check box.
- To automatically insert a proposal, if it is the only one found when Content Assist is invoked, select the Enable auto activation checkbox.
- To display proposals in alphabetical order, rather than by relevance, select the Present proposals in alphabetical order checkbox.
- To change the amount of time Content Assist is permitted to parse proposals enter the value for Content Assist parsing timeout in the text box area.
- Enable Auto activation of content assist for ".", "->" or "::" triggers by selecting the appropriate checkboxes.
- To change the delay before Content Assist is automatically invoked for the triggers (shown above), enter the new delay in the Auto activation delay text box area.
- To change the background color of the Content Assist dialog box, click the color palette button.
- To change the foreground color of the Content Assist dialog box, click the color palette button.
- Click OK.
Content Assist
Creating and editing code templates
Importing and exporting code templates
Content Assist page, Preferences window
Code Templates page