- This topic is empty.
Viewing 3 posts - 1 through 3 (of 3 total)
Viewing 3 posts - 1 through 3 (of 3 total)
- The forum ‘Other’ is closed to new topics and replies.
The forums ran from 2008-2020 and are now closed and viewable here as an archive.
I’ve been attempting to Google around, but I’m thinking I don’t know the correct terminology for finding the answer.
I’m using gulp-file-include to include HTML partials into my files (head, nav, etc.). I’m using *.template
for all partials so gulp-file-include won’t pass them into my /dist
folder (I’m watching /html/**/*.html for changes).
Example file structure:
--html
|
--partials
header.template
footer.template
--index.html
In Sublime Text when editing any *.template
file, it obviously has no idea that I want to show HTML syntax (also include auto-completion, etc.). What option / setting am I looking for to tell ST3 to say “when you come across a *.template
file treat it like HTML”?
Note: I can technically just tell gulp-file-include exactly what HTML files to build, but I like doing things the hard way and wanted to learn ;)
Alternatively, you can do the following:
Preferences -> Browse Packages -> User -> HTML.sublime-settings
You should see this:
{
"extensions":
[
"htm",
"html"
]
}
Change it to this:
{
"extensions":
[
"htm",
"html",
"template"
]
}
Save and restart Sublime.
Well, then I guess I did it the hard way =P. Glad it works the same way so you don’t have to hard-edit the settings file.