Create Code Snippets Quickly With Snippet Generator

I just published an article about how to create custom code snippets in VSCode where I mentioned a tool called Snippet Generator by Pawel Grzybek.

This tool is such a huge time saver that I thought I should highlight it in its own article.

Snippet Generator allows you to quickly generate code snippets in JSON format, for not just Visual Studio Code, but also for Atom and Sublime Text.

To use it, you just fill out the existing input fields on the website:

  • In the Description field, give your snippet a short description.
  • In the Tab trigger field, type the shortcut text string you want to use, e.g. cl for console.log()
  • In the Your snippet text area, type exactly the code snippet you want to use when you execute your snippet

The window on the right will automatically generate your snippet in JSON format for you, whether it’s HTML, CSS, JavaScript, or another language/syntax.

Now you just have to copy and paste it into your editor, and it’s ready to be used. To see a real-life example of how to make shortcut snippets work once you’ve generated them, check out this tutorial for VSCode.

Has this been helpful to you?

You can support my work by sharing this article with others, or perhaps buy me a cup of coffee 😊


Share & Discuss on