Comment delimiters define how comments are written in a document. In CotEditor, you can specify the delimiters used for commenting out code and for highlighting comments by configuring comment settings for each syntax.
To define the comment delimiters for a syntax, select Comment from the list on the left of the syntax editor, then enter delimiters to the text fields on the right side. See Define a syntax for how to open the syntax editor.
The settings for comments that are used for both comment-out/uncomment and syntax highlighting are as follows:
| Field | Description |
|---|---|
| inline comment | The text starting with this delimiter until the end of the line is handled as a inline comment. |
| block comment | The text surrounded with these start and end delimiters is handled as a block comment. You need to fill both ”begin with” and ”end with.” |
By the normal Comment Out command, the inline comment is preferred when both inline and block command delimiters are defined. When inline comment field is empty, the block comment is used in favor.
The highlighting rules for the comment keywords in the table below works the same as the Define syntax highlighting. Unlike the settings for comment delimiters, these rules are used only for highlighting.