Code Templates Extension

Boost your productivity with custom code templates! Create, manage, and insert reusable code snippets with ease.
Features
🧩 Template Management
- Create templates from scratch or from selected code
- Insert templates anywhere in your code
- Delete templates with confirmation
- Copy template content to clipboard
⚡️ Quick Access
- Dedicated sidebar with all templates
- One-click file creation from templates
- Context menu integration (right-click)
- Activity Bar icon for quick access
🔄 Workflow Integration
- Create templates directly from editor selections
- Insert templates at cursor position
- Supports all programming languages
- Works with any file type
Installation
- Open Extensions sidebar in VS Code
- Search for "Code Templates Extension"
- Click Install
- Reload VS Code when prompted
Usage
🆕 Creating Templates
- From scratch:
- Click the "+" icon in the sidebar
- Or use command palette:
Create Template
- From selection:
- Select code in editor
- Right-click →
Create Template from Selection
📋 Using Templates
- Insert in current file:
- Place cursor
- Right-click →
Insert Template
- Or use command palette
- Create new file:
- Click template in sidebar
- Enter file name and location
🗑️ Managing Templates
- Delete: Right-click template →
Delete
- Copy: Right-click template →
Copy
- Open folder: Command palette →
Open Templates Folder
Customization
Templates are stored in:
- Windows:
%APPDATA%\Code\User\globalStorage\code-templates-extension\templates
- Mac/Linux:
~/.config/Code/User/globalStorage/code-templates-extension/templates
You can directly edit template files in this folder.
Contributing
Contributions welcome! Please fork the repository and submit pull requests:
GitHub Repository
License
MIT License - see LICENSE for details
| |