notepad-plus-plus/PowerEditor/misc/npp.help/HTML/Commenting.html

31 lines
1.8 KiB
HTML

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html><head><meta content="text/html; charset=UTF-8" http-equiv="content-type"><title>Commenting</title>
<link rel="stylesheet" href="styles.css" type="text/css">
</head>
<body>
<h1>Commenting</h1>
<p>When
programming, it is often useful to comment (adding certain tags
around or in front of text to mark it is non-code) or uncomment
(large) section of text. Notepad++ allows to add two types of
comments:
<br><ul><li>block
comments, which means adding a special tag in front of each line of
(selected) text.
</li><li>stream
comments, which means putting special tags around the selected text.</li></ul>
<p>
Notepad++
can also remove block comments from text, or toggle them (adding them
where absent and removing them where present). These options are
available from the <span class="menu_item">Edit</span> menu or the Context Menu (see the section
about the <a href="Context%20Menu.html">Context Menu</a> for more details).<p>
<ul><li>
To add block comment tags, select <span class="menu_item">Edit-&gt;Comment/Uncomment-&gt;Block comment</span>.
</li><li> To remove block comment tags, select <span class="menu_item">Edit-&gt;Comment/Uncomment-&gt;Block uncomment</span>.
</li><li> To Toggle tags for all selected lines, select <span class="menu_item">Edit-&gt;Comment/Uncomment-&gt;Block toggle comment</span/li><li>To add stream comment tags around the selected text, select <span class="menu_item">Edit-&gt;Comment/Uncomment-&gt;Stream comment</span>.</ul>
p>Note that if a block comment starts in column 1, and you toggle block
comment on a range of lines that contains the line, the line will be
uncommented, which is not usually desired. This behaviour is difficult to
avoid.
</body></html>