Quantcast
Channel: i.justrealized » syntax
Viewing all articles
Browse latest Browse all 5

How to add string interpolation highlighting for Sublime

$
0
0

To add general string interpolation highlighting for Sublime Text 2, you need to edit your .tmTheme file. It can be found in your SublimeText 2, go to Preferences, then Browse Packages. This will open up your finder or Windows Explorer. Look for the folder “Color Scheme – Default”, you should be able to find themes like Monokai and others inside.

In order to add the syntax highlight for CoffeeScript #{} in strings, for example:

c.url("#{vhaAppAddress}saaa", done)

Open up your .tmTheme file and add the following lines:

        <dict>
            <key>name</key>
            <string>Embedded Source</string>
            <key>scope</key>
            <string>string source, text source</string>
            <key>settings</key>
            <dict>
                <key>fontStyle</key>
                <string></string>
                <key>foreground</key>
                <string>#9bca3c</string>
                <key>background</key>
                <string>#444</string>
            </dict>
        </dict>

You can change the colors of background and foreground to your liking too. Hope you’ll find this useful!


Viewing all articles
Browse latest Browse all 5

Trending Articles