This extension allows you to use custom snippets specific to each project and programming language.
- Loads snippets from
.vscode/snippets/*.json
files - Support for language-specific snippets (e.g.,
java.json
will only work in Java files) - Support for global snippets with
all.json
- Dynamic snippet reloading when switching between files
- Press
Ctrl+Shift+P
and search forAdd New Snippet
- Select a language from the dropdown or choose "Custom..." to specify a custom language
- For global snippets that work in all languages, select "all" from the language options
- Edit the generated snippet file according to your needs
The extension automatically creates the .vscode/snippets/
folder and snippet files as needed.
Each snippet follows this structure:
{
"SnippetName": {
"prefix": "trigger",
"description": "Description of what this snippet does",
"body": [
"Your code snippet line 1",
"Your code snippet line 2"
]
}
}
- prefix: The text you type to trigger the snippet (required)
- description: Description of the snippet shown in the completion item
- body: Array of code lines for the main snippet content (required)
Add New Snippet
: Quickly add a new snippet for a specific languageReload Private Snippets
: Manually reload custom snippets