How to highlight user-specified words in Visual Studio?
As others have said, you need a plugin for VS (as of VS 2015 anyway) to highlight text. For those that are using Resharper:
From the menu go to ReSharper->Options->Tools->To-Do-Items.
Add your new comment and pattern. You can copy an existing one by editing it. I used the same settings as Todo
for my new comment:
Title: AnythingYouWant
Regular Expression: `(?<=\W|^)(?<TAG>AnythingYouWant)(\W|$)(.*)`
Put a check "In comments"
Color: Web->Blue
Icon: Normal
And use it like this in your code:
// AnythingYouWant this comment is highlighted blue
I think you're looking for custom-defined keyword highlighting: http://msdn.microsoft.com/en-us/library/zy61y8b8%28VS.80%29.aspx
In the Tools menu go to Options -> Environment -> Task List. Here you can enter Tokens.
These tokens will be added to the task list, but will not be highlighted. That can be achieved with one of the available TODO highlighters.