Has anyone successfully gotten EE tags to properly highlight in Sublime Text 2? I tried installing the default ExpressionEngine package available from the package installer and it doesn't do anything. I also tried this one https://github.com/mrw/ExpressionEngine2-Sublime-Text-Bundle and it throws errors when I launch it. Any suggestions?

I am running OSX 10.8.2 and Sublime Text 2.0.1 (trial)

  • I'm using the ExpressionEngine package that's from github.com/Etsur/EE-ST2 and it's working great for me, is that the 'default' you're talking about? Your color theme may also have something to do with it. Jan 12, 2013 at 21:00
  • This might be obvious but have you switched the document type to ExpressionEngine in the bottom right of the window? It doesn't automatically pick up that what you're working on is EE template code, you have to tell it which highlighting rules to use.
    – foamcow
    Jan 12, 2013 at 21:18

2 Answers 2


I don't know if you're using the Monokai colour scheme, but if you are you'll need to hack it to make the EE tags go purple - just add the word 'constant' on line 96 of ~/Application Supprt/Sublime Text 2/Packages/Color Scheme - Default/Monokai.tmTheme like this:

where to fix EE sublime syntax highlighting

The end result should look like this:

EE tags in purple

Edit to add that I'm now using the Spacegray Eighties theme which I prefer a bit. However by default the EE tags will be a very similar orangey red colour to any HTML markup. To improve that and turn the EE tags blue you need to edit line 240 of base16-eighties.dark.tmTheme to change the color of the 'Constants' entry to #6699cc - The end result would then look like this: Spacegray Eighties with improved EE tags

Further edit to add that in ST3, the path to the file you need to change is now ~/Library/Application Support/Sublime Text 3/Packages/Theme - Spacegray/base16-eighties.dark.tmTheme ... Alternatively you can install Package Resource Viewer to get there directly in ST: https://github.com/skuroda/PackageResourceViewer

  • 1
    I see that this works. I'm using the Monokai Bright theme and the same thing applied now shows the EE tags in purple.
    – foamcow
    Jan 12, 2013 at 23:39
  • Any one get this working with the Monokai Soda Theme? I found a simlar line of code in MonokaiSoda.tmTheme on line 80 and added: <string>constant,constant.character, constant.other</string>. Still Not highlighting EE tags properly, with the EE Sublime Text Bundle. Soda-Theme is a good looking theme/skin for sublime text 2. Jan 14, 2013 at 4:39
  • 2
    I have it working with the Soda theme too - The thing is, the 'theme' and the the 'color scheme' are two different things... To make the change described above on a mac you need to go to ~/Sublime Text 2/Packages/Color Scheme - Default/Monokai.tmTheme Jan 14, 2013 at 8:20
  • My mistake - Soda theme has two optional color Schemes. Monkokai-Soda and Expresso Soda . I have it working with Monkokai-Soda Color scheme now. Thanks Jan 14, 2013 at 17:39

All of the ExpressionEngine tmbundle's derived from Tim Kelty, including the repo linked to in the question should contain the scope text.html.ee which can be targeted by adding a node inside the theme array:

        <string>Expression Engine</string>
            <string />

Optionally, you can add a background key/pair and/or target specific scopes. Additional scopes are found as string values in https://github.com/mrw/ExpressionEngine2-Sublime-Text-Bundle/blob/master/Syntaxes/ExpressionEngine.tmLanguage

I also find the sublime plugins ColorPicker and ColorSchemeEditor helpful in editing themes.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.