Snepet.js
snepet is a cli tool for creating custom snippets for vscode for any language or any vscode-supported type
🔻 Installation
npm install -g snepet
❓ How to use
-
1️⃣ - Add New Snippet
To add a new snippet run 👇
snepet add -
2️⃣ - Get All Snippets
To get all the custom snippets for a given type - language run 👇
snepet get --type <snippet-type> -
3️⃣ - Delete A Snippet
To delete a custom snippet, first run
snepet get
to get the snippets,then run 👇snepet delete --type <snippet-type> -id <snippet-id> -
4️⃣ - Add Project Scoped Snippet
You can add a snippet for only a specific project 👇
# Example# If i wanted to add a snippet for a certain project run 👇snepet add --directory root-of-project#orsnepet add -d root-of-project
Commands
Command | Use |
---|---|
snepet add |
Adds a new global snippet |
snepet add --directory |
Adds a new project scoped snippet |
snepet get --type <snippet-type> |
Gets all the snippets for the type <snippet-type> |
snepet delete --snippet-id <snippet-id> --type <snippet-type> |
Deletes the specified snippet |
Example
To create a javascript
sample snippet for the snippet 👇
console;
- run 👇 to create a new snippet
snepet add
- set the type to
javascript
- set the name to
Cool Snippet
- set the prefix to
.hello
- set the description to
This is an example
- Press enter and write the code
console.log('snepet is cool')
- Now in vscode open a
javascript
file and start typing.hello
. IT WORKS !!!
Supported Types
(,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,)
💡 Tips
👂 Feedback
- If you have any feedback or have any suggestions email me @ maxymashar@gmail.com
- If you want to contribute
- Fork snepet.js from github
- Make changes
- Create a pull request
- Thank you 😁