Skip to main content
summaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorAndrew Gvozdev2015-01-08 08:50:19 -0500
committerAndrew Gvozdev2015-01-08 08:59:11 -0500
commit4a2b6802553b50777bf7f40b7c9b178c0be6d129 (patch)
tree5376fd91f8d2ccb2eb7ec9bf7d46abbe5537f607 /doc
parent322e0de5cae9077a86ddb4c2828aa4f01f513e11 (diff)
downloadorg.eclipse.cdt-4a2b6802553b50777bf7f40b7c9b178c0be6d129.tar.gz
org.eclipse.cdt-4a2b6802553b50777bf7f40b7c9b178c0be6d129.tar.xz
org.eclipse.cdt-4a2b6802553b50777bf7f40b7c9b178c0be6d129.zip
Bug 449604: Comment/Uncomment for C++ editor not documented correctly
Diffstat (limited to 'doc')
-rw-r--r--doc/org.eclipse.cdt.doc.user/concepts/cdt_c_comments.htm24
1 files changed, 16 insertions, 8 deletions
diff --git a/doc/org.eclipse.cdt.doc.user/concepts/cdt_c_comments.htm b/doc/org.eclipse.cdt.doc.user/concepts/cdt_c_comments.htm
index a2ed2d9bf1..642369755c 100644
--- a/doc/org.eclipse.cdt.doc.user/concepts/cdt_c_comments.htm
+++ b/doc/org.eclipse.cdt.doc.user/concepts/cdt_c_comments.htm
@@ -14,23 +14,31 @@
<p>Comments are lines in a source file that have been marked to be ignored by the compiler.
Two styles of comments are supported by current C/C++ compilers:</p>
<ul>
-<li><samp>/* text */</samp></li>
-<li><samp>// text</samp></li>
+<li><samp>/* C style comment (block comment) */</samp></li>
+<li><samp>// C++ style comment (line comment)</samp></li>
</ul>
-<h2>Comment</h2>
+<h2>Line Comment</h2>
<p>You can quickly comment out one or more lines of code by inserting the leading
characters <samp>//</samp> at the beginning of the line. To do so, select the line
(or lines) of code you want to comment out and press <strong>CTRL+/</strong> (slash).</p>
-<h2>Uncomment</h2>
-<p>To uncomment select the line (or lines) of code, and press <strong>CTRL+\</strong>
-(backslash).
+<h2>Line Uncomment</h2>
+<p>To uncomment select the line (or lines) of code, and press <strong>CTRL+/</strong>
+(slash) again.
<p><strong>Tip:</strong> The characters <samp>/* */</samp> on lines that are
-already commented out, are not affected when you comment and uncomment code.</p>
+already commented out, are not affected when you comment and uncomment code using line comment.</p>
-<h2>Multiline comment</h2>
+<h2>Block Comment</h2>
+<p>You can comment out selected block of code with C style comment <samp>/* */</samp>. To do so, select
+the block of code you want to comment out and press <strong>CTRL+Shift+/</strong> (slash).</p>
+
+<h2>Block Uncomment</h2>
+<p>To uncomment select the code inside commented out block, and press <strong>CTRL+SHIFT+\</strong> (backslash).
+
+
+<h2>Multiline comment template</h2>
<p>You can use the Content Assist feature to insert a multi-line comment before a function.
In the C++ editor, type <span class="typewriter">com</span> then press <strong>Ctrl+Space</strong>.
Select <span class="typewriter">default multiline comment</span> template and press <strong>Enter</strong>.

Back to the top