Add Sublime Syntax Highlighting for Squarespace Template Files

Add Sublime Syntax Highlighting for Squarespace Template Files

Here's how to prettify your developer template files and make sure that Sublime text automatically adds syntax highlighting.

Way 1

  1. Open the file you want to associate a file type extension with i.e. template.conf
  2. On the bottom right corner, click on the current language, usually 'Plain Text'.
  3. Go to Open all with current extension as...
  4. Select the language you want to open all those files as.
sublime-text-syntax.png


Way 2

Go to Sublime Text 2 > Preferences > Browse Packages

Look for:

<array>
<string>filetype</string>
</array>

Add filetype strings before </array>.

HTML

Edit HTML.tmLanguage

<string>block</string>
<string>list</string>
<string>region</string>
<string>conf</string>

Javascript > JSON

Edit HTML.tmLanguage

<string>conf</string>
<string>preset</string>