开发者

How to enable multiple language syntax highlighting in an editor/IDE?

I have some PHP files, which I use to generate CSS files. I use the ext开发者_开发技巧ension: .css.php

Aptana defaults to only syntax highlighting the PHP code in this file, but it would be very good if I could set up CSS and PHP syntax for these files. So is there any way to achieve this in Aptana? Are there other editors or IDEs which can do this?


Aptana Studio doesn't have an extensible syntax coloring in the sense of adding sub-languages or altering language parsing/tokenizing. You'd want an editor that allows you to edit the language definition itself. A popular one for this is Textmate (http://macromates.com/), which is Mac only. There are clones out there for other OSes like redcar (http://redcareditor.com/), or e Text editor (http://www.e-texteditor.com/).

They use language definitions based on regular expressions and groups to set up the tokenizing which is then used for syntax coloring (as well as the bundle scripting).

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜