Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>File TemplateNew to Visual Studio Code? Get it now.

File Template

ralfz

|
22,458 installs
| (4) | Free
An extension for creating file from templates automatic.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

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

  • GitHub
  • VS Code Market

License

MIT

  • Contact us
  • Jobs
  • Privacy
  • Terms of use
  • Trademarks
© 2023 Microsoft