Skip to main content
summaryrefslogtreecommitdiffstats
blob: 7cbdd2d3c647e3704e74b2aec50e11ad79127570 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<html lang="en">

<head>
<meta http-equiv="Content-Language" content="en-us">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Templates</title>
<link rel="stylesheet" type="text/css" href="../help.css">
</head>
<body>

<h1>Templates</h1>

<p>Templates are sections of code that occur frequently enough that you would like
to be able to insert them with a few keystrokes.
This function is known as <b>Content Assist</b>; the sections of code that are
inserted are known as <b>templates</b>.
</p>
<p>To input an existing Content Assist template into a file, such as one for an 
<b>if</b> statement, type the initial character ("<tt>i</tt>" in this case), then press <b>Ctrl+Space</b>.
The templates that begin with that character appear. Double-click on a template to insert it into a file.</p>

<p>You can edit existing Code/Content Assist templates or create new ones. From the menu bar choose
<b>Window &gt; Preferences &gt; C/C++ &gt; Code Templates</b>.</p>

<p><img border="0" src="../images/ngconcepts.gif" ALT="Related concepts" width="143" height="21">
<br><a href="cdt_c_over_cdt.htm">CDT Overview</a>
</p>

<p><img border="0" src="../images/ngtasks.gif" ALT="Related tasks" width="143" height="21">
<br><a href="../tasks/cdt_t_contentassist.htm">Creating and editing code templates</a>
<br><a href="../tasks/cdt_t_add_codetemp.htm">Using templates</a>
<br><a href="../tasks/cdt_t_imp_code_temp.htm">Importing and exporting code templates</a>
</p>

<p><img border="0" src="../images/ngref.gif" ALT="Related reference" width="143" height="21">
<br><a href="../reference/cdt_u_m_edit.htm">Edit menu</a>
<br><a href="../reference/cdt_u_c_editor_con_assist.htm">Content Assist page, Preferences window</a>
<br><a href="../reference/cdt_u_code_temp.htm">Code Templates page, Preferences window</a>
</p>

<p>
<img src="../images/rh03_04.gif" ALT="Red Hat Copyright Statement"><br>
<img src="../images/ng00_04a.gif" ALT=" IBM Copyright Statement" >
</p>

</body>
</html>

Back to the top