Author Topic: Color coding a user-defined comment  (Read 1272 times)

Movement

  • New Community Member
  • Posts: 1
  • Hero Points: 0
Color coding a user-defined comment
« on: January 29, 2011, 01:02:07 am »
Hi, does anybody know if it is possible to have a user-defined string in a C++ comment that would allow me to treat that comment line differently when color-coding?  (Like change the background color to bright yellow and bold or underline it.)

What I'd like to do is highlight any occurrances of:

// TODO:

and have the entire comment (from the // to the end of the line) be a different color so I easily scan the code for TODO: items.

I tried adding a user-defined keyword but that seems to be ignored inside a comment.

Thanks!

chrisant

  • Senior Community Member
  • Posts: 1413
  • Hero Points: 130
Re: Color coding a user-defined comment
« Reply #1 on: January 29, 2011, 04:45:39 am »
This post has links to two macros, one of which is almost exactly what you describe wanting.