A visual studio code extension for creating file from templates automatically.
一个自动生成文件模板的 VScode 扩展。
- Open a new file by VScode.
Ctrl + Shift + P
.- Input
Tmpl: Create Template
and pressEnter
.
- JavaScript
- HTML
- CSS
- PHP
- Python
- Ruby
- XML
- Vue
-
Edit template
Go to~/.vscode/extensions/RalfZhang.filetemplate-2.0.0/asset/templates/
and there are some.tmpl
files. You can edit it as you wish with TextMate snippet syntax. -
Add template
Except the default language types, you can add other language template.
Here are the steps:1 Open
~/.vscode/extensions/RalfZhang.filetemplate-2.0.0/asset/templates/
2 Add${languageIdentifier}.tmpl
file, such ascpp.tmpl
if you want to add C++ template. You can find language identifier here.
3 Open a new C++ file, and tryTmpl: Create Template
command.
MIT