SnipGen is a tool that helps you generate reusable code snippets from your existing codebase. With SnipGen, you can easily create code snippets that can be used across multiple projects and languages.
Supported Languages
JavaScript: snippets that can be used in JavaScript and JavaScriptReact projects.
TypeScript: snippets that can be used in TypeScript, TypeScriptReact; JavaScript and JavaScriptReact (detyped).
Other languages: SnipGen can also generate snippets for other languages by reading the file extension and setting the scope to that language.
How it Works
SnipGen makes it easy to generate code snippets from your existing codebase. Here's a step-by-step guide to get you started:
Step 1: Select the Code
Open your code editor and select the part of the code you want to turn into a snippet.
Step 2: Open Context Menu
Right-click on the selected code to open the context menu.
Step 3: Select SnipGen
In the context menu, select SnipGen: Parse.
Step 4: Configure the Snippet
You will be prompted to enter a Name, Prefix*, and Description for your snippet.
Fill in the required information to help you identify and use your snippet later.
*Prefix is a keywords that trigger the snippet. You can use a comma to separate multiple prefixes.