Recently took over the company's official website and new tasks, the need to write HTML pages. There are a lot of duplicate content in the page (navigation bar, footer, sidebar, etc.), each copy and paste is not a thing, the web search for the relevant HTML template creation problem, also found. The landlord uses sublime Text3, the method for creating HTML templates is as follows:
1. Use the relevant packages, such as Sublimetmpl, to install the following steps:
1.1 Installing the Package control component
1.2 Press CTRL + Shift + p to bring up the command panel, select the Install Package option and enter
1.3 Enter the plug-in you want to install, such as Sublimetmpl
1.4 After successful installation, you can create a new HTML5 file by using CTRL + ALT + H.
1.5 HTML5 template modification, click Preferences→browse Packages, under the Sublimetmpl folder, find Templates→html.tmpl to modify.
2. Customize the template with the following steps:
2.1 Open Tool-plug-in development-Create a new code snippet that will appear:
2.2 In <! [Cdata[and]]> write down the code snippet you want, note that the code fragment to the left, and the following Tabtrigger tag comments open, the middle of the YHDT is your shortcut key.
2.3 ctrl+s Save, the suffix must be. Sublime-snippet. such as Yhdongtai.sublime-snippet
2.4 Create a new page test.html, enter the YHDT, and then press the TAB key to get the code snippet you've set up.
Sublime Text3 Creating HTML templates