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:

[code language=“coffeescript”]c.url(“#{vhaAppAddress}saaa”, done)[/code]

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

[code language=“xml”]

name

Embedded Source

scope

string source, text source

settings

fontStyle

foreground

#9bca3c

background

#444

[/code]

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

comments powered by Disqus