coteditor / CotEditor

Lightweight Plain-Text Editor for macOS
https://coteditor.com
Other
6.22k stars 425 forks source link

Support for illegal syntax in custom syntax #1613

Closed chrissy-dev closed 2 months ago

chrissy-dev commented 2 months ago

I'd like to create a custom syntax for ^x.*$ that puts a line through the full line if the line starts with x. I'm currently doing this with the regex mapped to comments but just wondering if there's a better way?

This is just a personal thing but I have a personal syntax I use for my plain text todo list.

Feel free to close this issue if there's not a way to do it, I just wanted to ask.

Thanks again for CotEditor.

image
1024jp commented 2 months ago

Highlighting types in the CotEditor's syntax definition is actually just a label and definition of the priority to apply highlights. So, if you make your custom syntax definition and you are satisfied with the result, I think it is ok.