User Tip: Code Section Highlighting

I just thought I'd share this tip as I find it very useful.  I'm abusing the TODO system to cause my code to be highlighted in different ways.

Highlight a single line in a comment:
8-18-2013 9.04.21 AM 0.png

Setup for that, go to File -> Settings -> TODO and click the [ + ] and set it up as such:
8-18-2013 9.05.31 AM 0.png

Specifically the above looks for spaces or tabs followed by a single ! and selects through the end of the line, then I just have it over-ride the default todo colors.

Highlight a multi-line section:  (I use these to organize properties and public/private sections of code)
8-18-2013 9.09.46 AM 0.png

The pattern setup for this is: (?ms).*@INTERNAL.*
Note: The last line of the comment has a bunch of tabs prior to the */ to extend the highlighting past the right edge

Attention Getting Notes / Highlights
One last setup I have is to really get my attention for special notes, such as @NOCOMMIT
Pattern: (?ms).*@NOCOMMIT.*

8-18-2013 9.14.01 AM 0.png
Lastly, because these are TODO items, they will pollute your TODO pane, but you can setup a Todo Items Filter which I have done as such:
8-18-2013 9.12.36 AM 0.png

Please sign in to leave a comment.