Define comment delimiters in CotEditor on Mac

To define the comment delimiters for a syntax, select Comment from the list on the left of the syntax editor, then input delimiters to the input 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:

FieldDescription
inline commentThe string starting with this delimiter until the end of the line is handled as a inline comment.
block commentThe string 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.

See also