It looks like the VS2010 extension, called Linguist , will be close to what you want. He can make individual selections for any regular expression. It seems that he cannot change it based on your cursor location.
More information about the extension can be viewed on the github page .
No GUI for settings. Instead, there are %LOCALAPPDATA%\Linguist
settings files that you configure.
Since I already have my syntax highlighting the way I would like to be with Resharper, I removed all the formatting from the Styles.field
file in the standard
subdirectory. If you do this, you need to leave all the names, so it will look like this:
Styles.field
# If new elements are added (or old ones removed) then Definitons.cs
You will need to configure one of the named styles to highlight. I did:
Name: emphasis BackColor: Red
And then I created a file called custom.lang
(but you can name yours with the .lang extension) in the custom
subdirectory. and this is what I did to highlight the return statements:
custom.lang
Language: csharp Globs: *.cs Emphasis: \breturn\b Emphasis: \bthrow\b
It made me work. A bit complicated, but it's free. Another way to do this might be to clear the standard\C#.lang
so that you can leave other files in place.
And finally, another option, since it is on github, you can add a new style definition for the selected text so that we do not destroy the rest of the formatting. Nice to have options :)
source share