Currently this is the code that highlights all variables, including class properties (they are red):
<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>
How can I change the color of class properties only?
$object->property = 'xxx';
so $object
should still be red, but I want property
in a different color
To create a user-specific customization of a color scheme, create a new file with the same filename as the color scheme, but save it in the Packages/User/ directory. For example, to customize the default Monokai color scheme, create a file named Packages/User/Monokai. sublime-color-scheme.
Once installed, go to the Command Palette in Sublime Text by hitting the Command + Shift + P or (Ctrl + Shift + P for Windows). Then search for ColorPicker. Or you can do it faster just by pressing Command + Shift + C. This will open the native color picker from your OS.
Changing the selection colour in Sublime Text 3Open the command palette with ⌘+⇧+P on mac iOS (for windows/linux Ctrl + Shif + P) and type prv to get the PackageResourceViewer options. Choose Open Resource >> Color Scheme – Default >> and choose your theme file to edit.
variable.other.property
should do the trick:
<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>
Change:
<string>variable, support.variable</string>
To:
<string>variable.other.property</string>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With