📝 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.

✨ 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
- Open VS Code
- Go to Extensions (Ctrl+Shift+X / Cmd+Shift+X)
- Search for "Scratchy"
- 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
- Open Command Palette (
Cmd+Shift+P
/ Ctrl+Shift+P
)
- Type "Scratchy: Create Scratch File"
- 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
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
npm run lint
npm run format
🤝 Contributing
We welcome contributions! Please see our Contributing Guide for details.
Development Workflow
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Run linting and tests
- Submit a pull request
📝 License
This project is licensed under the MIT License - see the LICENSE file for details.
🙏 Acknowledgments
📞 Support
Made with ❤️ for the VS Code community