Create very useful code snippets along your coding journey. Have a file you run to build your project? Consider making a snippet for it with VSCode Snippets!
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
VSCode Snippets+ is a Visual Studio Code extension that allows you to create and manage code snippets for various programming languages and scripts. Simplify your coding journey by generating snippets for commonly used code, build scripts, and more.
Features
Create Snippets: Easily create snippets for Python, Java, C#, C++, C, Batch (.bat), Bash (.sh), and CMD (.cmd) files.
Delete Snippets: Quickly delete snippets that you no longer need.
Build/Run Snippets: Execute or compile snippets directly from the editor.
Open Snippets: Quickly open a snippet from the editor.
Rename Snippets: Rename snippets you want to rename.
Installation
Open Visual Studio Code.
Go to the Extensions view by clicking the Extensions icon in the Activity Bar on the side of the window or by pressing Ctrl+Shift+X.
Search for VSCode Snippets+.
Click Install to install the extension.
Usage
Creating a Snippet
Open the command palette by pressing Ctrl+Shift+P.
Type VSCode Snippets+ | Create Snippet and press Enter.
Select the file type for your snippet.
Enter a name for your snippet file.
The snippet file will be created in the snippets folder and opened for you to edit.
Deleting a Snippet
Open the command palette by pressing Ctrl+Shift+P.
Type VSCode Snippets+ | Delete Snippet and press Enter.
Select the snippet file you want to delete.
Confirm the deletion when prompted.
Building/Running a Snippet
Open the command palette by pressing Ctrl+Shift+P.
Type VSCode Snippets+ | Build/Run Snippet and press Enter.
Select the snippet file you want to build/run.
The snippet will be executed or compiled in a terminal.
Opening a Snippet
Open the command palette by pressing Ctrl+Shift+P.
Type VSCode Snippets+ | Open Snippet and press Enter.
Select the snippet file you want to open.
The snippet will auto open.
Rename a Snippet
Open the command palette by pressing Ctrl+Shift+P.
Type VSCode Snippets+ | Rename Snippet and press Enter.
Select the snippet file you want to rename.
Type in a new snippet name for your snippet.
It will rename your snippet
Supported File Types
Python (.py)
Java (.java)
Ruby (.rb)
HTML (.html)
C# (.cs)
C++ (.cpp)
C (.c)
Rust (.rs)
Batch (.bat)
Bash (.sh)
CMD (.cmd)
Contributing
Contributions are welcome! If you find a bug or have a feature request, please open an issue on the GitHub repository.
License
This project is licensed under the MIT License. See the LICENSE file for details.
Changelog
See the (Changelog)[CHANGELOG.md] for more information.
Startup
See (Startup.md)[vsc-extension-quickstart.md] for more information.