Home

Awesome

File Templates VSCode Extension

Build Status

Visual Studio code extenstion that allows to quickly create new files based on defined templates.

Inspired by this Atom Extension.

Available Commands

Screenshots

preview

Install

On Visual Studio code, Press F1 to open the command menu and type ext install file-templates.

This extension was only tested on Linux. If you have a Mac or Windows and find some issue, please create a PR.

Usage

Variables

Variables can now be used in templates in the following way:

normal text #{variable_name}

When a file is created from the template, the user is prompted with a value to put here.

Predefined variables

Templates Location.

By default, this extension expects the file templates to be placed at the following location, depending of youur OS:

Linux:

$HOME/.config/Code/User/FileTemplates

Mac:

$HOME/Library/Application Support/Code/User/FileTemplates

Windows:

C:\Users\User\AppData\Roaming\Code\User\FileTemplates

However, you can change the default location by adding the following to your user or workspace settings:

"fileTemplates.templates_dir": "path/to/my/templates"

Contributing

Please see CONTRIBUTING.md for details.