开发者

VS.PHP Custom syntax coloring

开发者 https://www.devze.com 2023-03-21 14:23 出处:网络
I\'ve just installed php plugin for visual studio 2010 (vs.php) and it seems a very good product, but I wonder if I can add a few more syntax coloring rules, as i find the default ones not enough for

I've just installed php plugin for visual studio 2010 (vs.php) and it seems a very good product, but I wonder if I can add a few more syntax coloring rules, as i find the default ones not enough for me. For example, i want to color php's predefined functions with a specified color and to make them bold. Also I w开发者_如何学编程ant everything that is between the php tags to have a blue background. Is that possible? To create own parsing rules or some kind of that?

Or maybe there is a way to create a plugin for visual studio to do this?


VS 2010 makes it easy to roll out your own extensions through Managed Extensibility Framework.

Here is a great article that explains how you can create your own extension for syntax highlighing. And some good examples.

However, keep in mind that syntax highlighting in VS is dependent on the language service provider's capabilities. E.g., in C#, there is no way to distinguish between a variable member of a class vs. a method of the class since VS identifies both of them as Identifiers.

I don't work on PHP so I cannot speak for whether there is a way to identify the pre-built functions or not through the language service provider. Something to keep in mind.

You may try this trick useful too which basically fools VS into thinking .php files as C++

Lastly, you might know it already but this may be a good IDE: http://www.jetbrains.com/phpstorm/


you could download a vssettings file with a custom syntax highlight, or you could edit yours as well by opening it in any text editor... in fact it is a xml file...


Have you tried looking on VS menu? Tools>Options>Environtment Fonts and Colors I usually customize the looks of other type of documents there.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号