/File-Template

An extension for creating file from templates automatically.

Primary LanguageTypeScript

File Template

A visual studio code extension for creating file from templates automatically.
一个自动生成文件模板的 VScode 扩展。

Example

How to use

  1. Open a new file by VScode.
  2. Ctrl + Shift + P.
  3. Input Tmpl: Create Template and press Enter.

Default Types

  • JavaScript
  • HTML
  • CSS
  • PHP
  • Python
  • Ruby
  • XML
  • Vue

More

  1. 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.

  2. 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 as cpp.tmpl if you want to add C++ template. You can find language identifier here.
    3 Open a new C++ file, and try Tmpl: Create Template command.

Link

License

MIT