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 に答える