sublime / vscode 快捷生成HTML代码的实现
Both Sublime Text and VS Code offer various methods for generating HTML code snippets and templates quickly. Here are some common approaches:
Sublime Text:
Emmet (Zen Coding):
div>h1>p
and press Tab to create a <div>
with an <h1>
and a <p>
inside.User Snippets:
Tools > User Snippets
or open the Packages/User/Default.sublime-snippets
file.html-doc
), a description, and the code to be inserted.HTML Templates:
template.html
) with the basic structure you need.Tools > New File
and select HTML
as the syntax.VS Code:
Emmet (Zen Coding):
HTML Snippets:
Code > Preferences > User Snippets
or open the settings.json
file.html
), and the code to be inserted.HTML Templates:
template.html
) with the basic structure you need.File > New File
and select HTML
as the language.Extensions:
HTML5 Boilerplate
or Live Preview
to get additional template and code generation features.Remember, the specific methods and shortcuts may vary slightly depending on the version of the software you are using.