- Hit > shift + command + p and type snippets
- Select Preferences: Configure User Snippets
- Choose the language type for which you want to add the custom snippet in the vscode inputbox
- vscode has comments to explain on how to add a snippet, as described on :> vsdoc or you can follow the next link with a short guide:
Lets say, we want to open custom snippets for the language GO. Then we can do:
- Hit > command + p
- Type: go.json + enter And you land on the custom snippet page
Snippets are defined in a JSON format and stored in a per-user (languageId).json file. For example, Markdown snippets go in a markdown.json file.
Using tools:
- Snippet Generator extension (recommended)
- Online snippet generator