Snippet Builder
A snippet has the following format:
"{name}": { "prefix": "", "body": "", "description": "" },Where
name
- helps you identify quickly what the snippet isprefix
- what you type to trigger the snippetbody
- the actual snippetdescription
- describes the snippet (you will likely never see this)
Code snippets are templates that make it easier to enter repeating code patterns, such as loops or conditional-statements.
In Visual Studio Code, snippets appear in IntelliSense (
⌃Space
) mixed with other suggestions, as well as in a dedicated snippet picker (Insert Snippet in the Command Palette). There is also support for tab-completion: Enable it with "editor.tabCompletion": "on"
, type a snippet prefix (trigger text), and press Tab
to insert a snippet.For more information, visit the vscode docs.
- As you edit each of the fields above, the output section will update dynamically. Once you like what you have, simply click on the output box and the snippet will be added to your clipboard.
- For the body of the snippet, you can write any code snippet you want, with the right formatting, in VS code, and simply copy and paste it here in the body section
- Next, to add it, go to VS code, open the command pallet (ctrl + shift + P), search for
Configure User Snippet
, then type the specific programming language you want your snippet to apply to. - Paste in the snippet, save, and you are done! 🔥
If there are any issues or suggestions, make sure to open an issues here.
to be added...