Previously, with tmLanguage syntax definitions, I’d manually edit my syntax definitions for all the languages I used to capture TODOs (comment.line.todo) and then define an obnoxious colour in my chosen theme to make sure they got done, e.g. for Python, I’d add:
<key>begin</key>
<string>(?<=^|;)\s*((#))\s*((?i)todo)</string>
<key>beginCaptures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>comment.line.number-sign</string>
</dict>
<key>2</key>
<dict>
<key>name</key>
<string>comment.line.number-sign</string>
</dict>
<key>3</key>
<dict>
<key>name</key>
<string>comment.line.todo</string>
</dict>
</dict>
And something similar for Perl, Ruby, JS, etc.
What’s the preferred way of doing this with the new sublime-syntax files? Is there a way to define an isolated syntax for TODOs and then include that within all the other sublime-syntaxes that I’m interested in?
I also did something similar for highlighting trailing whitespace and mixed tabs/spaces to avoid having to install addons to do it for me. It worked really well.
Interested to hear the community’s thoughts on this.
Thanks