Overview Version History Q & A Rating & Review
CodeSnippet Pro
A powerful VS Code extension for managing code snippets with text and image support.
Features
Text Snippets
Add, edit, delete, and insert text snippets
Categorize by language and tags
Autocomplete integration
Favorite snippets
Versioning support
Import/export snippets (JSON)
Image Snippets
Capture screenshots from clipboard
Add annotations (text, highlights, colors)
Edit screenshots with canvas tools
Store images locally
Preview and manage image snippets
Snippet Management
Search by name, tag, language
Favorite snippets for quick access
Drag-and-drop reordering
Unified webview panel
Export & Share
Export snippets as PDF (multiple snippets)
Export as PNG/JPG (single snippet)
Copy snippet image to clipboard
VS Code Integration
Command Palette commands
Keyboard shortcuts
Status bar integration
Autocomplete suggestions
Installation
Clone this repository
Run npm install
Run npm run compile
Press F5 to launch extension development host
Usage
Getting Started
After installation, look for the "Snippets" button in VSCode's status bar (bottom right corner)
Click the button to open the Snippet Management Panel
Alternatively, use Command Palette (Ctrl+Shift+P
) and search for "CodeSnippet Pro"
Adding Text Snippets
Method 1: Keyboard Shortcut
Select code in your editor
Press Ctrl+Shift+T
Fill in the details:
Title : Name for your snippet
Content : The code (auto-filled if selected)
Language : Programming language
Tags : Comma-separated tags for organization
Method 2: Command Palette
Press Ctrl+Shift+P
Type "CodeSnippet Pro: Add Text Snippet"
Fill in the snippet details
Method 3: Snippet Panel
Open snippet panel from status bar
Click "Add Text Snippet" button
Fill in details and save
Adding Image Snippets
Method 1: Keyboard Shortcut
Take a screenshot or copy image to clipboard
Press Ctrl+Shift+I
Add title, tags, and notes
Use annotation tools if needed
Method 2: Command Palette
Press Ctrl+Shift+P
Type "CodeSnippet Pro: Add Image Snippet"
Select image source and add metadata
Method 3: Snippet Panel
Open snippet panel
Click "Add Image Snippet" button
Upload or paste image
Managing Snippets
Opening Snippet Panel:
Click status bar button (clippy icon with "Snippets")
Command Palette: "CodeSnippet Pro: Open Snippet Panel"
In the Panel:
Search : Use search box to find snippets by title, tag, or content
Filter : Filter by type (text/image), language, or tags
Edit : Click edit button or use "CodeSnippet Pro: Edit Snippet"
Delete : Click delete button or use "CodeSnippet Pro: Delete Snippet"
Insert : Click insert button or use "CodeSnippet Pro: Insert Snippet"
Export : Select multiple snippets and click "Export Selected"
Inserting Snippets
Method 1: From Panel
Open snippet panel
Click "Insert" button next to any snippet
Method 2: Keyboard Shortcut
Place cursor where you want to insert
Press Ctrl+Shift+S
Select snippet from quick pick menu
Method 3: Auto-complete
Type .
in your code
Select snippet from auto-complete suggestions
Works only for text snippets
Exporting Snippets
Open snippet panel
Select one or more snippets (checkboxes)
Click "Export Selected" button
Choose export format:
PDF : Creates a document with all selected snippets
PNG : Exports first selected image snippet as PNG
Choose save location
Click "Export"
When adding/editing image snippets:
Text Tool : Add text annotations
Highlight : Highlight areas
Rectangle/Circle : Draw shapes
Arrow : Point to specific areas
Color Picker : Choose annotation colors
Eraser : Remove annotations
Keyboard Shortcuts Summary
Ctrl+Shift+T
: Add Text Snippet
Ctrl+Shift+I
: Add Image Snippet
Ctrl+Shift+S
: Insert Snippet
.
: Auto-complete trigger for text snippets
Commands
codeSnippetPro.addTextSnippet
- Add text snippet
codeSnippetPro.addImageSnippet
- Add image snippet
codeSnippetPro.editSnippet
- Edit snippet
codeSnippetPro.deleteSnippet
- Delete snippet
codeSnippetPro.insertSnippet
- Insert snippet
codeSnippetPro.exportSnippets
- Export snippets
codeSnippetPro.openSnippetPanel
- Open snippet panel
Keyboard Shortcuts
Ctrl+Shift+T
- Add text snippet
Ctrl+Shift+I
- Add image snippet
Ctrl+Shift+S
- Insert snippet
Configuration
codeSnippetPro.storagePath
- Custom storage path
codeSnippetPro.maxSnippets
- Maximum number of snippets
Tech Stack
VS Code API
TypeScript
Node.js
HTML5 Canvas for image editing
PDFKit for PDF export
Author
Raj Dev
Contributing
Fork the repository
Create a feature branch
Make changes
Submit a pull request
License
MIT License