Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Markdown TemplatesNew to Visual Studio Code? Get it now.
Markdown Templates

Markdown Templates

barbowza

|
2 installs
| (0) | Free
Insert templated markdown into your markdown files.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Markdown Templates VSCode Extension

Insert templated markdown into your markdown files.

TLDR;

  1. Create a template directory within your project to store new templates then configure that path in settings.
  2. Run Markdown Templates: New Template. The new template will open in a tab.
  3. Select the tab of the markdown .md file you are editing.
  4. Run Markdown Templates: Select Template and choose a template.
  5. Select the entire ```yaml block
  6. Run Markdown Templates: Insert Template.

Configuration Settings

Set template directories in your workspace/user settings:

{
	"markdownTemplates.templateDirectories": [
		"/absolute/path/to/templates",
		"relative/path/from/workspace"
	]
}

Directories support absolute paths and workspace-relative paths.

Commands

  • Markdown Templates: New Template — Creates a new template file in the first configured template directory with a timestamped filename (newTemplate-YYYYMMdd-HHmmss.md) and opens it in a new editor tab.
  • Markdown Templates: Select Template — Selects a template and inserts its substitutions block into the current markdown file.
  • Markdown Templates: Insert Template — Renders the selected template with your substitutions and replaces the selected YAML block with the result.

Workflow

Create and Customise a Template

  1. Run Markdown Templates: New Template.
  2. A new file is created with the default template format and opened in a new tab.
  3. Edit the frontmatter (templateName, templateDescription, substitutions) and the markdown body as needed.
  4. Save the file to complete setup.

Use a Template in Your Markdown

  1. Open a markdown file and place your cursor where the substitutions block should be inserted.
  2. Run Markdown Templates: Select Template and choose a template.
  3. The extension inserts a yaml fenced block containing the template's substitutions section.
  4. Edit values in that inserted block as needed.
  5. Select the edited block.
  6. Run Markdown Templates: Insert Template.
  7. The extension renders the selected template body and replaces your current selection.

Template Format

Templates are markdown files with YAML frontmatter.

  • templateName is used in template selection.
  • templateDescription is shown as additional quick-pick information.
  • substitutions is converted to the editable YAML block inserted into your markdown file.
  • The markdown body below frontmatter is rendered using mustache syntax.
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft