blob: ab72db5d9c61fd42cd164f99bad0ec2644066ac2 [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
<meta http-equiv="Content-Language" content="en-us">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Templates</title>
<link rel="stylesheet" type="text/css" href="../help.css">
<script type="text/javascript"
src="PLUGINS_ROOT/org.eclipse.help/livehelp.js"></script>
</head>
<body>
<div role="main">
<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 <strong>Content Assist</strong>; the sections of
code that are inserted are known as <strong>templates</strong>.
</p>
<p>
To insert an existing Content Assist template into a file, such as
one for an <strong>if</strong> statement, type the initial character
("<span class="typewriter">i</span>" in this case), then press <strong>Ctrl+Space</strong>.
The templates that begin with that character appear. Double-click on
a template to insert it into a file.
</p>
<p>
You can edit the existing Content Assist templates or create new
ones using the <img src="../images/command_link.png" alt=""> <a
class="command-link"
href='javascript:executeCommand("org.eclipse.ui.window.preferences(preferencePageId=org.eclipse.cdt.ui.preferences.TemplatePreferencePage)")'>C/C++
&gt; Editor &gt; Templates</a> preference pane.
</p>
<p>
<img 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 src="../images/ngtasks.gif" ALT="Related tasks" width="143"
height="21"> <br> <a
href="../tasks/cdt_t_add_codetemp.htm">Creating and editing
templates</a> <br> <a href="../tasks/cdt_t_contentassist.htm">Using
templates</a> <br> <a href="../tasks/cdt_t_imp_code_temp.htm">Importing
and exporting templates</a>
</p>
<p>
<img 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</a> <br> <a href="../reference/cdt_u_code_temp.htm">Templates
page</a>
</p>
<p>
<img alt="Red Hat Copyright Statement" src="../images/rh03_04.gif"><br>
<img alt="IBM Copyright Statement" src="../images/ng00_04a.gif">
</p>
</div>
</body>
</html>