DEV Community

Cover image for Generate Vscode snippets wih Python

Posted on

Generate Vscode snippets wih Python

Let's go straight to the point. Vscode is the most popular editor out there, I use it personally for everything except for java development (I use Intellij IDE).

The beauty of vscode is the ability to create custom snippets (JSON format) to speed up your development process.
But it is very frustrating for me to create snippet manually, especially if they are very long, I have to copy/paste each line into separate line to keep the snippet organized, and I have to escape double quote characters manually or with some regular expressions.

This process is very tedious and boring, and imagine if you have multiple snippets ....

Long story short, I created a simple script that read list of filenames and generate snippet JSON format to copy/paste directly into vscode config

Take a look and give me your thoughts github repository

Top comments (1)

turry profile image

Thank you so much. I really find adding snippets a hustle