Sublime Forum

Pre-fill HTML5 documents with basic outline

#1

Currently in ST, all files start out blank. Coming over from Dreamweaver, where opening a new HTML 5 document would open a document that already had the bones of a valid HTML5 document, I’m wondering if there’s any way to do this in Sublime? I understand you could use snippets, but if it could be accomplished as soon you open a document, it could come in really useful to pre-fill other types of documents, too.

Thanks, appreciate any help.

0 Likes

#2

There is HTML Boilerplate at Package Control.
You have to type in “htmlboiler” + TAB to make it work. It isn’t automatic, but it saves typing the HTML skeleton.
I don’t think that there is anything like what you want for Sublime Text. ST is an editor, not an IDE.

0 Likes

#3

Or, you could create your own HTML5 template, save it, then open it up when you need it.

0 Likes

#4

Try https://packagecontrol.io/packages/SublimeTmpl

0 Likes

#5

Thanks for the suggestion, but I don’t really see the point of installing a package for that, as that’s basically what Snippets is for, and it comes pre-packaged.

0 Likes

#6

Thanks so much!

This is perfect, accomplished near-enough exactly what I wanted. The other file presets are currently more than I need, but I’ll be using the key binding shortcut for the HTML one quite often. The only thing I’m wondering now is if it’s at all possible to create a GUI welcome screen that opens and displays a list of those documents, which worked perfectly for me when using Dreamweaver, though I suspect it might be outside of the remit of Sublime.

Thanks again.

0 Likes