Search code examples
sublimetext2color-scheme

How to modify the colour scheme in Sublime Text 2 for php tags


In some themes in sublime text, the background colour of the area within certain tags like script or php is of a different colour from the rest of the code. For example like that in the iPlastic or twilight theme.

For Example: http://imageshack.us/photo/my-images/541/screenshot20130207at342.png/

I hope to achieve the same effect in the Tomorrow colour scheme which does not have this by default. I understand that i have to edit the .tmTheme file, but I am not sure of the code I am supposed to put in.

Any help would be much appreciated.

Thanks!


Solution

  • You should add something like this to your .tmTheme file:

    <dict>
        <key>name</key>
        <string>Embedded source</string>
        <key>scope</key>
        <string>text source</string>
        <key>settings</key>
        <dict>
            <key>background</key>
            <string>#FCFCFC</string>
        </dict>
    </dict>
    

    Of course you can set the colors that you prefer.