Skip to content

Templates

Mohammad Amanalikhani edited this page Sep 3, 2026 · 2 revisions

Templates

Built-in Templates

Template Description
Conventional Commits Full-featured default with all fields
Gitmoji Minimal – Gitmoji + subject + body
Angular Follows Angular commit convention (scope required)
Text Just subject and body

Workspace Templates

Templates saved in .vscode/commit-templates/ are workspace templates:

  • Take priority over built-in templates with the same name
  • Can be edited, deleted, and shared via version control
  • Appear with the label repo: .vscode/commit-templates

Config Editor

Open via ⚙ Template (under "More") to:

  • Switch active template
  • Activate a template
  • Duplicate templates
  • Delete workspace templates
  • Edit JSON directly
  • Save changes
  • Export/Import JSON

Template JSON Structure

{
  "$schema": "./schemas/v1-template.schema.json",
  "version": "1",
  "name": "My Template",
  "template": ["{type}{scope}{subject}", "", "{body}", "", "{closes}"],
  "tokens": [
    {
      "label": "Type",
      "name": "type",
      "type": "enum",
      "required": true,
      "options": [
        { "label": "feat", "description": "New feature" },
        { "label": "fix", "description": "Bug fix" }
      ]
    },
    {
      "label": "Scope",
      "name": "scope",
      "type": "text",
      "prefix": "(",
      "suffix": ")"
    },
    {
      "label": "Subject",
      "name": "subject",
      "type": "text",
      "required": true,
      "maxLength": 72,
      "prefix": ": "
    }
  ]
}

Token Types

Type Description
text Free text input (single-line or multiline)
boolean Simple checkbox
enum Selection grid with predefined options

Token Properties

Property Description
label Field label in the form
name Unique identifier (referenced as {name} in template)
type text, boolean, or enum
description Help text below the label
prefix Text prepended to the value
suffix Text appended to the value
required Marks the field as required
multiline Display as textarea
monospace Use monospace font
lines Initial rows for textarea
maxLength Maximum character length
maxLineLength Maximum line length (multiline only)
issueList Adds # to each issue number
perLine Applies prefix/suffix to each line separately
options List of options (enum only)

Free‑form Text and Templates

When in Free‑form Text mode, the template structure is ignored – the message is taken verbatim from the textarea. However, you can still switch back to Form mode at any time, and the form will be populated by parsing the free‑form text.

The template is still used to generate the message in Form mode and for features like Insert, Copy, and Git Template.

📚 Git Commit Message Editor

🚀 Getting Started

⚙️ Configuration

📝 Templates

💻 Development

❓ Support


🔗 External Links

Clone this wiki locally