File-Template
File-Template copied to clipboard
An extension for creating file from templates automatically.
File Template
A visual studio code extension for creating file from templates automatically.
一个自动生成文件模板的 VScode 扩展。
How to use
- Open a new file by VScode.
-
Ctrl + Shift + P
. - Input
Tmpl: Create Template
and pressEnter
.
Default Types
- JavaScript
- HTML
- CSS
- PHP
- Python
- Ruby
- XML
- Vue
More
-
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.
Link
License
MIT