-
-
Save anonymous/43876e18f7d8c9e76f30 to your computer and use it in GitHub Desktop.
| { | |
| "folders": | |
| [ | |
| { | |
| "file_exclude_patterns": | |
| [ | |
| "sftp-config.json" | |
| ], | |
| "follow_symlinks": true, | |
| "path": "/Users/Sean/Dropbox/Sites/Dev" | |
| } | |
| ] | |
| } |
Ah, getting there! You were right, I'd missed a comma. However I'm still getting an issue. The package name is "Craft-Twig" (this is from the file Craft-Twig.sublime-package within the 'Installed Packages' folder as you mentioned. Then under Sublime Text 3/Cache/Craft-Twig/Syntaxes/ I found the file HTML (Twig).tmLanguage.cache so that's why I'm assuming the syntax name is HTML (Twig).
Now when I enter that and save the project file, I had an error message but I missed what it said. The syntax on the files in the project is indeed set to HTML Twig, but the syntax is not highlighted? So close!
**Update: Just to add to this, I've just tried it with a different (ExpressionEngine) syntax in a different project and it's working, so perhaps it's an issue with the Craft Twig one?
OK, I've just managed to get the error message showing again, and it states:
Error loading syntax file "Packages/Craft-Twig/HTML (Twig).tmLanguage": Unable to open Packages/Craft-Twig/HTML (Twig).tmLanguage
I'm wondering if its down to the fact that the HTML (Twig).tmlanguage file is within a subfolder named Syntaxes within the Craft-Twig folder.
(again these folders are all within the Sublime Text 3>Cache folder.)
Interesting. Try the following snippet in your project file.
{
"syntax_override": {
"\\.html$": [ "Craft-Twig", "Syntaxes", "HTML (Twig)" ]
}
}I've only just seen your response, apologies!
Just tried this out and it works like a charm, thank you!
Thanks for keeping this gist alive!
I was getting an error with @reywood's snippet, this one worked for me:
{
"folders":
[
{
"follow_symlinks": true,
"path": "/Users/viget/Projects/ccusa"
}
],
"syntax_override":
{
"\\.html$": ["Craft-Twig", "Syntaxes", "Craft-Twig"]
}
}
You'll have to figure out the package name to use, but your project file should look like this.
{ "folders": [ { "file_exclude_patterns": [ "sftp-config.json" ], "follow_symlinks": true, "path": "/Users/Sean/Dropbox/Sites/Dev" } ], "syntax_override": { "\\.html$": [ "PACKAGE NAME HERE", "HTML (Twig)" ] } }Try having a look in
~/Library/Application Support/Sublime Text 3/Installed Packagesto figure out what the name of the package is. Or you could try running the following command.Somewhere in the resulting output should be the package name.