1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-29 19:45:01 +02:00
cdt/doc/org.eclipse.cdt.doc.user/concepts/cdt_c_editor.htm

69 lines
2.5 KiB
HTML

<!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>C/C++ editor</title>
<link rel="stylesheet" type="text/css" href="../help.css">
</head>
<body>
<h1>C/C++ editor</h1>
<p>The CDT provides an editor that gives you specific support for editing C code.
This C editor is invoked automatically when you edit a
<b>.c</b> or <b>.cpp</b>
file.
</p>
<p>The C editor includes the following features:</p>
<ul>
<li>Syntax highlighting</li>
<li>Content/code assist</li>
<li>Code formatting</li>
<li>Integrated debugging features</li>
<li>A context-menu.</li>
</ul>
<p>You can control some of the operation of the C editor from the <b>Window &gt; Preferences &gt; C/C++ &gt; C/C++ Editor</b> preferences dialog.</p>
<h2>Content Assist</h2>
<p>
You invoke the C editor's Content Assist function by typing the first characters of a C statement, then pressing <b>Ctrl+Space</b>.
Eclipse proposes code templates based on the <b>.c</b> or <b>.cpp</b> file type.
</p>
<h2>The C/C++ editor context menu</h2>
<p>To access the C/C++ Editor context menu, right-click in a C/C++ editor.</p>
<p>The C/C++ Editor context menu contains an <b>Include</b> feature.
If you right-click on a function and choose <b>Add Include</b>,
the editor attempts to determine the header in which the function is prototyped
(this determination is done through a code-completion contributor extension).
If this is successful, the editor adds the appropriate
<b>#include</b> at the top of the file.</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">Using Content Assist</a>
</p>
<p><img border="0" src="../images/ngref.gif" ALT="Related reference" width="143" height="21">
<br><a href="../reference/cdt_u_editor_key_bind.htm">C/C++ editor key binding actions</a>
<br><a href="../reference/cdt_o_ceditor_pref.htm">C/C++ editor preferences</a>
<br><a href="../reference/cdt_u_outlineview.htm">Outline view for C/C++</a>
<br><a href="../reference/cdt_o_views.htm">Views and editors</a>
</p>
<p>
<img src="../images/rh03_04.gif" ALT="Red Hat Copyright Statement" BORDER=0 width="300" height="14"><br>
<img src="../images/ng03_04.gif" ALT=" IBM Copyright Statement" BORDER=0 width="324" height="14">
</p>
</body>
</html>