Skip to content
| Marketplace
Sign in
Visual Studio Code>Snippets>File Templates for VSCodeNew to Visual Studio Code? Get it now.
File Templates for VSCode

File Templates for VSCode

Venkatesh Boddu

|
20,643 installs
| (15) | Free
This extension helps in creating file templates.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Templates for VSCode

This extension helps in creating files easily from defined templates.

Features

  • Create new files from pre-defined templates.
  • Create new File Templates either from a file or a blank template.
  • Edit Templates.
  • Add Author Name and Date of creation to the file.



Choose commands from Command Palette:

Command Palette


Create a new File from Template:

New File


Usage

  • Right-click on the VSCode Explorer where you want to create a new file, you will see an option 'Create New File from template'. Selecting this option shows a menu with existing templates. Select the desired template and enter the new file name. New file will be created in the selected folder.

  • You can also create a new File from template by Right-click on the editor. On Right-click in the editor, you will all also see 'Create Template from file' option. Select this option to create a new Template from the current active document.

  • You can also do all these the other way by selecting the appropriate command from Command Palette. From Command Palette, select 'Files: New File from template' - to create a new file from template 'Files: New File Template' - to create a new blank file template. 'Files: New Template from file' - to create a new template from the current active file. 'Files: Edit File Template' - to edit any existing template.

  • Add Author name and Date of creation to the file, by adding ${AUTHOR} and ${DATE} tokens to your template.


Templates Location

  • Depending on your OS, default templates are located at

    • Windows : %USERPROFILE%\.vscode\extensions\bam.vscode-file-templates-{VERSION}\templates
    • Mac : ~/.vscode/extensions/bam.vscode-file-templates-{VERSION}/templates
    • Linux : ~/.vscode/extensions/bam.vscode-file-templates-{VERSION}/templates
  • You can also create workspace specific templates. Worspace templates are located at /%WORKSPACE_ROOT_FOLDER%/.vscode/templates


Extension Settings

This extension contributes the following settings:

  • templates.Author: Set the Author name.

KeyBindings

  • Create a New File from template

    Windows: 'ctrl + n' MAC: 'cmd + n'


Release Notes

1.0.0

Initial release of Templates for VSCode

1.0.2

  • Throw warning if a file exists with the same name, when creating new file.

1.0.3

  • Fixing open file error after creating a file from template.
  • Added ${FILE} token in the templates.
  • Added Typescript template

1.0.5

  • updated new_untitled_file shotcut to ctrl+alt+n

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft