Quickly create custom snippets for any language from selected text.
- Open Visual Studio Code
- Press
Ctrl+P
to open the Quick Open dialog - Type
ext install quicksnippet
to find the extension. - Press
Enter
or click the cloud icon to install it - Restart Visual Studio Code if prompted
- Select text from a file.
- Press
Ctrl+P
to open the Quick Open dialog - Search for
Create Snippet
, and press enter. The selected text will be added as a snippet in the user snippets file for the current language. - Edit the snippet properties (name, shortcut, description), and save your changes.
- Flip back to your original file, and start typing - your snippet should now appear in the completions list.
** Enjoy!**