当前位置: 动力学知识库 > 问答 > 编程问答 >

Override visual studio syntax highlighting through a plug-in?

问题描述:

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!

网友答案:

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).

网友答案:

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.

网友答案:

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

分享给朋友:
您可能感兴趣的文章:
随机阅读: