开发者

Aptana Studio 3 - Can I set color for a specific function in a theme?

I am developing an application using PHP in Aptana Studio 3, and have set up a global debug() function that uses firePhp. As it is, my calls to the debug() function are scattered throughout the code. This is ok for this phase, because it is helping me a lot to catch bugs early. However, all these debug() calls scattered throughout, are making code a lot less readable.

I would like to be able to have only those debug() calls syntax-colored differently from the rest of the functions, preferably a lighter color, so that at first sight they look more like comments than actual code.

I am really confused by the TextMate approach Aptana 3 has taken, and, even though I understand that it offers many possiblities, not knowing any Ruby, has made this whole configuration thing very unapproachable to me.

In short, is there a quick way to have just this one function colored differently?

Follow up: Because there is officially no way to color-code specific functions, I resorted to renaming all debug() functions to _d(), as well as added _g(), _u(), and _t(), for start group, close group, and stack trace functionality respectively. Adding the underscores changes the "visual texture" of the code, so I ca开发者_运维技巧n more easily focus on the lines that actually matter.


Short answer: no.

Scopes are assigned by our partitioning and tokenizing in Java code for the various languages, not in separate language syntax definitions like in Textmate.

We follow Textmate conventions for scope names and matching, but we don't currently let you alter how the scopes get assigned via rubles or anything. As a result there's no way for you to assign custom scopes to your own methods/functions/variables.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜