7

目前,这是突出显示所有变量的代码,包括类属性(它们是红色的):

    <dict>
        <key>name</key>
        <string>Variables</string>
        <key>scope</key>
        <string>variable, support.variable</string>
        <key>settings</key>
        <dict>
            <key>fontStyle</key>
            <string></string>
            <key>foreground</key>
            <string>#dc322f</string>
        </dict>
    </dict>

如何仅更改类属性的颜色?

$object->property = 'xxx';

所以$object应该还是红色,但我想要property不同的颜色

4

2 回答 2

4

variable.other.property应该做的伎俩:

<dict>
    <key>name</key>
    <string>Variables</string>
    <key>scope</key>
    <string>variable.other.property</string>
    <key>settings</key>
    <dict>
        <key>fontStyle</key>
        <string></string>
        <key>foreground</key>
        <string>#00ff00</string>
    </dict>
</dict>
于 2012-06-02T21:24:51.277 回答
1

改变:

<string>variable, support.variable</string>

至:

<string>variable.other.property</string>
于 2012-06-06T12:48:39.527 回答