php - 如何更改 Sublime text 2 中类属性的颜色?

标签 php syntax-highlighting sublimetext sublimetext2

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

    <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

最佳答案

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>

关于php - 如何更改 Sublime text 2 中类属性的颜色?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10832823/

相关文章:

git - Sublime Text 2、kemayo 的 git 插件和 Windows 7

php - 将表结果连接到各个列

php - 表单提交在 Firefox 中不起作用,在 chrome 中工作正常

php - Zend 框架 2 错误 : Statement could not be executed when implement year function in table gateway

command - Sublime Text 2 中的 "Close Others"命令快捷方式

sublimetext - 颠倒Sublime Text中的所有文本行

java - PHP变量到Java小程序?

visual-c++ - 我在哪里可以找到 VS2012 的更多主题?

python - Sublime Text 语法 : Python 3. 6 个 f 字符串

c++ - Eclipse CDT 语法着色问题