Comments

You can add/remove code comments, via "Comments" plugin. Plugin is preinstalled in CudaText. It gives about 6 commands in menu "Plugins / Comments". Plugin supports only adding/removing of comments, not syntax highlighting for them (highlighting is lexer's work).

  • Line comments: from some position to line-end. E.g. in C lexer: "//text here", in Python lexer: "# text here".
  • Comments for range (Stream comments): from offset to another offset. E.g. in C lexer: "/ text here /".
  • Comments for full lines: from newline to another newline. Rarely used, e.g. used in PowerShell.

For example, Python lexer supports only line comment, and don't support stream comments. PowerShell lexer supports comments for full lines, while don't support comments for any range.

Comment chars are editable in SynWrite editor, in dialog "Lexer properties" (after you install the same lexer to SynWrite). In dialog tab "Commenting" you'll see input fields.

Command "Toggle stream comment" in plugin adds/removes comments of last 2 types: for range, for full lines (plugin chooses needed kind).

Comment chars are saved:

  • Line comments: in lexer file data/lexlib/nnn.lcf.
  • Range comments: in files data/lexlib/nnn.cuda-lexmap.