0
votes

I work mainly with ExpressionEngine and Craft projects - both of which are .HTML files. Is there a way that I can define the syntax to use based on the project? Right now, all of my HTML files are viewed using ExpressionEngine syntax. But now when I switch to a Craft project, I have to change it each time I open a file.

Ideally, I'd like to have Project A use ExpressionEngine syntax and Project B use Craft-Twig syntax.

Is this possible?

PS - I'm using Sublime Text 3 (build 3126).

1

1 Answers

1
votes

As Sublime assigns the syntax based on the extension of the file, in order to do something like this you need some simple plugin code to swap the syntax for you when you open a file or save a new one for the first time (two places where the syntax gets assigned).

An example of such a package is Project Specific Syntax Settings, which is available via Package Control.