Code Snippet Saver is a Visual Studio Code extension that allows you to save and retrieve code snippets using a web API. This extension is perfect for developers who want to store frequently used code snippets and easily access them across different projects.
Open the command palette (Ctrl+Shift+P or Cmd+Shift+P on Mac).
Search for CodeSnip: Setup Email and enter your email to configure the extension.
Usage
Saving a Code Snippet
Highlight the code you want to save.
Open the command palette (Ctrl+Shift+P or Cmd+Shift+P on Mac).
Search for CodeSnip: Save Snippet.
The highlighted code will be saved to the web API associated with your email.
Retrieving Code Snippets
Open the command palette (Ctrl+Shift+P or Cmd+Shift+P on Mac).
Search for CodeSnip: Retrieve Snippets.
A new panel will open showing your saved snippets.
You can copy any snippet by clicking the Copy button.
Setting Up Your Email
Open the command palette (Ctrl+Shift+P or Cmd+Shift+P on Mac).
Search for CodeSnip: Setup Email.
Enter your email to configure the extension.
Commands
CodeSnip: Setup Email: Configures your email for saving and retrieving snippets.
CodeSnip: Save Snippet: Saves the selected code snippet.
CodeSnip: Retrieve Snippets: Opens a panel to view and copy saved snippets.
Example
Saving a Snippet
Select the code you want to save:
function greet() {
console.log('Hello, world!');
}
Run the command CodeSnip: Save Snippet.
Retrieving Snippets
Run the command CodeSnip: Retrieve Snippets.
The snippets panel displays:
12:30 PM [Copy]
function greet() {
console.log('Hello, world!');
}
Contributing
If you want to contribute to this extension, please fork the repository and create a pull request with your changes.
License
This project is licensed under the MIT License.
Support
For any issues or feature requests, please open an issue on the GitHub repository.
Acknowledgements
This extension was inspired by the need for an efficient way to manage and access frequently used code snippets. Special thanks to the open-source community for providing valuable resources and tools.
Enjoy using Code CodeSnip! If you have any questions or feedback, feel free to reach out.