Repository navigation
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 |
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
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
{
"$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": ": "
}
]
}| Type | Description |
|---|---|
text |
Free text input (single-line or multiline) |
boolean |
Simple checkbox |
enum |
Selection grid with predefined options |
| 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) |
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.
This project is licensed under the MIT License – see the LICENSE file for details.
Contributions are welcome!
- Report bugs or request features via GitHub Issues
- Submit pull requests to the main repository
Please make sure your code passes the existing TypeScript checks and follows the project's code style.
- Maintainer: Mohammad Amanalikhani
- GitHub: idmdakhi
- Email: md.akhi.ir@gmail.com
For quick questions, you can also open a discussion in the GitHub Discussions (if enabled) or create an issue.
This extension was built using the following open-source tools and libraries:
- TypeScript – type-safe JavaScript
- esbuild – fast bundler
- VS Code API – extension framework
-
YAML – for parsing
.commit-message-editor.yamlfiles
Special thanks to the developers of the original three extensions that inspired this project:
- phoihos for the IntelliSense concepts
- Bandra for the configurable form approach
- (Add any other relevant contributors here)
Current version: 1.0.0
See the CHANGELOG for release history.