Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>ScratchyNew to Visual Studio Code? Get it now.
Scratchy

Scratchy

Sulsira

|
9 installs
| (0) | Free
Scratchy helps you quickly create and manage scratch files
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

📝 Scratchy

Quick scratch files for rapid prototyping and note-taking

Scratchy is a VS Code extension that helps you quickly create and manage temporary files for prototyping, testing, and note-taking. Perfect for developers who need to quickly jot down ideas, test code snippets, or create temporary documentation.

Scratchy Demo

✨ Features

🚀 Quick File Creation

  • Global Shortcut: Create scratch files from anywhere in VS Code
  • Multiple File Types: Support for Markdown, JSON, JavaScript, TypeScript, React, and Python
  • Smart Templates: Each file type comes with a pre-configured template
  • Auto-Numbering: Files are automatically numbered for easy organization

📝 Rich Templates

Every scratch file comes with a ready-to-use template:

📓 Markdown

# 📓 Scratch Note

**Created:** 12/25/2024 at 2:30:45 PM
**Tags:**

---

## Notes

-

## TODO

- [ ]

---

_Generated by Scratchy extension_

💻 JavaScript

// JavaScript Scratch File
// Created: 12/25/2024 at 2:30:45 PM

console.log('Hello from scratch!');

// Your code here
function main() {
  // TODO: Add your logic here
}

main();

🔷 TypeScript

// TypeScript Scratch File
// Created: 12/25/2024 at 2:30:45 PM

interface ScratchData {
  id: number;
  name: string;
  created: string;
}

function main(): void {
  const data: ScratchData = {
    id: 1,
    name: 'scratch',
    created: '12/25/2024',
  };

  console.log('Hello from TypeScript scratch!', data);
}

main();

⚛️ React JSX

// React JSX Scratch File
// Created: 12/25/2024 at 2:30:45 PM

import React from 'react';

function ScratchComponent() {
  return (
    <div>
      <h1>Scratch Component</h1>
      <p>Created on 12/25/2024</p>
    </div>
  );
}

export default ScratchComponent;

⚛️ React TypeScript

// React TypeScript Scratch File
// Created: 12/25/2024 at 2:30:45 PM

import React from 'react';

interface ScratchComponentProps {
  title?: string;
}

const ScratchComponent: React.FC<ScratchComponentProps> = ({
  title = 'Scratch Component',
}) => {
  return (
    <div>
      <h1>{title}</h1>
      <p>Created on 12/25/2024</p>
    </div>
  );
};

export default ScratchComponent;

🐍 Python

# Python Scratch File
# Created: 12/25/2024 at 2:30:45 PM

def main():
    """Main function for scratch file."""
    print("Hello from Python scratch!")

    # TODO: Add your code here
    data = {
        "name": "scratch",
        "created": "12/25/2024",
        "type": "python"
    }

    print(f"Data: {data}")

if __name__ == "__main__":
    main()

📊 JSON

{
  "name": "scratch_file",
  "created": "12/25/2024",
  "description": "Scratch file for quick testing",
  "data": {}
}

👁️ Markdown Preview

  • Auto-Preview: Markdown files automatically open with preview
  • Manual Preview: Use keyboard shortcut to open preview for any markdown file
  • Real-time Updates: Preview updates as you type

🚀 JavaScript Preview

  • Auto-Execution: JavaScript files automatically execute when created
  • Manual Execution: Use keyboard shortcut to run any JavaScript file
  • Output Panel: See execution results in a dedicated output panel
  • Error Handling: View both stdout and stderr output

🎯 Smart File Management

  • Organized Storage: All scratch files are stored in ~/scratches/
  • Persistent Counter: Files are numbered sequentially across sessions
  • Language Detection: Proper syntax highlighting for all supported file types

🚀 Installation

From VS Code Marketplace

  1. Open VS Code
  2. Go to Extensions (Ctrl+Shift+X / Cmd+Shift+X)
  3. Search for "Scratchy"
  4. Click Install

From Source

git clone https://github.com/sulsira/scratchy.git
cd scratchy
npm install
npm run compile

⌨️ Usage

Creating Scratch Files

Method 1: Keyboard Shortcut

  • Mac: Cmd + Ctrl + N
  • Windows/Linux: Ctrl + Alt + N
  • Select file type from the quick pick menu

Method 2: Command Palette

  1. Open Command Palette (Cmd+Shift+P / Ctrl+Shift+P)
  2. Type "Scratchy: Create Scratch File"
  3. Select file type from the quick pick menu

Markdown Preview

Auto-Preview

  • Markdown scratch files automatically open with preview

Manual Preview

  • Mac: Cmd + Shift + V (when markdown file is active)
  • Windows/Linux: Ctrl + Shift + V (when markdown file is active)
  • Or use Command Palette → "Scratchy: Show Markdown Preview"

JavaScript Execution

  • Mac: Cmd + Shift + J (when JavaScript file is active)
  • Windows/Linux: Ctrl + Shift + J (when JavaScript file is active)
  • Or use Command Palette → "Scratchy: Show JavaScript Preview"

📁 File Organization

All scratch files are stored in your home directory:

~/scratches/
├── scratch_1.md
├── scratch_2.py
├── scratch_3.js
├── scratch_4.tsx
└── ...

🎨 Supported File Types

Type Extensions Features
Markdown .md Auto-preview, rich templates
JavaScript .js Auto-execution, console logging, templates
TypeScript .ts Type safety, interfaces
React JSX .jsx React components, imports
React TSX .tsx TypeScript React, props interface
Python .py Main function, docstrings
JSON .json Structured data template

⚙️ Configuration

Keyboard Shortcuts

You can customize keyboard shortcuts in VS Code settings:

{
  "keyboard.dispatch": "keyCode",
  "keybindings": [
    {
      "key": "cmd+ctrl+n",
      "command": "scratchy.show",
      "when": "editorTextFocus"
    },
    {
      "key": "cmd+shift+v",
      "command": "scratchy.showMarkdownPreview",
      "when": "editorTextFocus && editorLangId == markdown"
    }
  ]
}

🔧 Development

Prerequisites

  • Node.js 18+
  • VS Code

Setup

git clone https://github.com/sulsira/scratchy.git
cd scratchy
npm install

Build

npm run compile

Development Mode

npm run watch

Testing

npm test

Linting & Formatting

npm run lint
npm run format

🤝 Contributing

We welcome contributions! Please see our Contributing Guide for details.

Development Workflow

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Add tests if applicable
  5. Run linting and tests
  6. Submit a pull request

📝 License

This project is licensed under the MIT License - see the LICENSE file for details.

🙏 Acknowledgments

  • Built with VS Code Extension API
  • Icons from Feather Icons
  • Templates inspired by modern development workflows

📞 Support

  • Issues: GitHub Issues
  • Discussions: GitHub Discussions
  • Documentation: Wiki

Made with ❤️ for the VS Code community

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