In Sublime, it is the color scheme .tmTheme
file that is responsible for coloring elements of different scopes, which are defined by the language definition .tmLanguage
file. Just about all strings are defined as part of the string
scope, and many color schemes, including most of the ones included with Sublime, just have a single color for string
. One issue I have with these color schemes is that they are generally based on a small handful of colors, and reuse them for many different scopes - Monokai and its derivatives are chief offenders of this crime, IMHO. If you want to change the color of the string
scope, you'll need to find and edit the .tmTheme
file associated with your color scheme.
In Sublime Text 3 this is most easily accomplished by installing @skuroda's PackageResourceViewer
plugin via Package Control. Once installed, open the Command Palette and type prv
, then choose PackageResourceViewer: Open Resource
. If you're wishing to modify one of the built-in themes, navigate down to Color Schemes - Default
, hit Enter or click, then scroll through the list until you find the name of the color scheme you're using. Hit Enter or click on it, and an XML file will open. Search for <string>string
(make sure you don't have regex search turned on) and you should find the section you're looking for. Edit the hex color code to something more palatable, save the file, and your views will automatically be updated.
BTW, if you're looking for a complex, hugely-multicolored color scheme with a color definition for just about any scope out there, I recommend checking out the Neon Color Scheme
, also available via Package Control. If you're curious, here's how your code snippet looks when using the full C++11 syntax definition:
If you want, you can always modify it, or take pieces for your own work. Good luck!