Skip to content
| Marketplace
Sign in
Visual Studio Code>Snippets>Scratchpad - Code Snippet ManagerNew to Visual Studio Code? Get it now.
Scratchpad - Code Snippet Manager

Scratchpad - Code Snippet Manager

Abhirup Bardhan

|
2 installs
| (0) | Free
A persistent clipboard manager for developers. Save, organize, and retrieve code snippets within your workspace.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Scratchpad - Code Snippet Manager

A VS Code extension that provides a persistent clipboard manager for developers. Save, organize, and retrieve code snippets within your workspace.

Features

Copy to Scratchpad

  • Select any text in your editor and save it to your scratchpad
  • Use the keyboard shortcut Cmd+Shift+C (Mac) or Ctrl+Shift+C (Windows/Linux)
  • Or right-click and select "Copy to Scratchpad" from the context menu
  • Automatic language detection based on the source file

Side Panel View

  • View all your snippets in the Explorer sidebar
  • See snippet name, preview, and character count at a glance
  • Hover for detailed tooltip with full preview and metadata
  • Pinned snippets appear at the top

Snippet Management

  • Rename: Give your snippets meaningful names
  • Pin/Unpin: Keep important snippets at the top
  • Delete: Remove snippets you no longer need
  • View: Open full snippet content in a new editor tab
  • Insert at Cursor: Paste snippet directly into your editor
  • Copy to Clipboard: Copy snippet content to system clipboard
  • Search: Filter snippets by name or content

Storage & Persistence

  • Snippets are stored in .vscode/scratchpad.json in your workspace
  • Workspace-specific storage (not synced across workspaces)
  • Persists across VS Code sessions
  • Option to add storage file to .gitignore

Cleanup & Limits

  • Configurable maximum snippets (default: 100)
  • Configurable maximum snippet size (default: 50,000 characters)
  • Warning when approaching the snippet limit
  • Automatic cleanup prompt for old snippets
  • Pinned snippets are exempt from auto-cleanup

Usage

Saving a Snippet

  1. Select text in any editor
  2. Use Cmd+Shift+C / Ctrl+Shift+C or right-click → "Copy to Scratchpad"
  3. The snippet is saved with an auto-generated name

Using a Snippet

  1. Find your snippet in the Scratchpad panel (Explorer sidebar)
  2. Right-click to:
    • Insert at cursor position
    • Copy to clipboard
    • View full content
  3. Or double-click to view the full snippet

Managing Snippets

  • Right-click any snippet for management options
  • Use the search icon in the panel header to filter snippets
  • Use the refresh icon to reload snippets from disk
  • Use the clear icon to delete all snippets

Commands

Command Description
Copy to Scratchpad Save selected text to scratchpad
Insert at Cursor Insert snippet at cursor position
Copy to Clipboard Copy snippet to system clipboard
View Full Snippet Open snippet in new editor tab
Rename Snippet Change snippet name
Pin/Unpin Snippet Toggle pin status
Delete Snippet Remove snippet
Clear All Snippets Remove all snippets
Cleanup Old Snippets Review and delete old snippets
Search Snippets Filter snippets by name or content
Refresh Scratchpad Reload snippets from disk

Settings

Setting Default Description
scratchpad.maxSnippets 100 Maximum number of snippets
scratchpad.maxSnippetSize 50000 Maximum characters per snippet
scratchpad.cleanupPeriodDays 30 Days before cleanup prompt (15/30/60/90)
scratchpad.showTimestamps true Show relative timestamps
scratchpad.showCharacterCount true Show character count
scratchpad.warningThreshold 80 Percentage at which to warn about limit

Keyboard Shortcuts

Shortcut Command
Cmd+Shift+C (Mac) / Ctrl+Shift+C (Win/Linux) Copy to Scratchpad

You can customize this shortcut in VS Code's Keyboard Shortcuts settings.

Requirements

  • VS Code version 1.85.0 or higher
  • A workspace folder must be open to use the extension

Installation

From Source

  1. Clone this repository
  2. Run npm install to install dependencies
  3. Run npm run compile to build the extension
  4. Press F5 to launch the extension in a new VS Code window

Building VSIX Package

  1. Run npm install
  2. Run npx vsce package
  3. Install the generated .vsix file in VS Code

Development

# Install dependencies
npm install

# Compile TypeScript
npm run compile

# Watch for changes
npm run watch

# Lint code
npm run lint

License

MIT

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft