views:

503

answers:

3

Hi,

This is related to this question I asked earlier about syntax highlighting user-defined blocks of code.

Is it possible to write some kind of plug-in for visual studio where it would override how it does syntax highlighting? Where would I start looking for that?

Thanks!

A: 

Obviously this is possible since Visual Assist does it.
But I wouldn't really know where to look for how to go about doing it. Maybe you can try poking inside Visual Assist and see which calls its making.

shoosh
Be careful - you wouldn't want to recommend or endorse any thing that could be interpreted as reverse engineering - it's usually expressly forbidden in license agreements.
Jeff Yates
I routinely get my cat to press the space bar in these dialogs so I'm covered.
shoosh
+3  A: 

This is possible. Many VS addins, such as Visual Assist, Resharper, Code Rush, etc. have their own extensions to how the syntax highlighting in Visual Studio works.

If you want to write your own....

Take a look at the page on Syntax Coloring in the VSX reference documentation.

The interface you'll need to work with is IVsColorizer2 (or IVsColorizer).

Reed Copsey
A: 

If you really need it today I would recommend CodeRush/DXCode which you can get a free version of. If you ask in their community forums they are usually very helpful about pointing you in the right direction.

If you can wait it is supposed to be super easy to do this sort of think in Visual Studio X

Andrew Burns