Viscode Clipboard is a VS Code extension that acts as a clipboard for saving repetitive lines of code that you can't memorize, like the Solidity SPDX license or other frequently used snippets. Users can save as many items as they want and paste them later, even after closing and reopening VS Code. The clipboard items remain unless deleted by the user. You can store items for a specific workspace or universally, depending on your preference.
Features
Save code snippets with labels: Easily save any code snippet with a custom label.
Store snippets globally or for the current workspace: Choose where to save your snippets for better organization.
Paste or delete snippets via a convenient UI: Manage your snippets easily through an intuitive interface.
Automatically save highlighted snippets: Use a default label based on the first few words of the snippet.
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 "Viscode Clipboard".
Click Install on the Viscode Clipboard extension.
Usage
Saving a Snippet Manually
Use the command Save Clipboard Item (Ctrl+Alt+S).
Enter the code snippet you want to save.
Enter a label for the snippet.
Choose whether to save the snippet for the current workspace or globally.
Managing Snippets
Use the command Manage Clipboard Items (Ctrl+Alt+M).
A list of saved snippets will be displayed, showing the label and a preview of the code snippet.
Select a snippet to paste or delete.
Saving a Highlighted Snippet
Highlight the code snippet in your editor.
Use the command Save Highlighted Snippet (Ctrl+Alt+H).
The first 2-3 words of the snippet will be used as the default label.
Choose whether to save the snippet for the current workspace or globally.
Group snippets
Use the command Save Clipboard Item (Ctrl+Alt+S).
Enter the code snippet you want to save.
Enter a label for the snippet.
When prompted, choose "Yes" to save the snippet as part of a group.
Provide a group name or select an existing group.
Choose whether to save the snippet for the current workspace or globally.
The snippet will be saved within the specified group.
Keybindings
Ctrl+Alt+S: Save a new clipboard item.
Ctrl+Alt+M: Manage clipboard items.
Ctrl+Alt+H: Save the highlighted snippet.
Tutorial Video
Requirements
No additional dependencies are required for this extension.
Extension Settings
This extension contributes the following settings:
viscodeClipboard.enable: Enable/disable this extension.
viscodeClipboard.defaultScope: Set the default scope for saving snippets (workspace or global).
Known Issues
No known issues at this time. Please report any issues on the GitHub repository.
Following Extension Guidelines
Ensure that you've read through the extensions guidelines and follow the best practices for creating your extension.