Notepad Extension for VS Code
A simple and elegant notepad extension that adds a quick notes panel to Visual Studio Code.
Features
- Quick Access: Notepad panel in the activity bar for easy access
- Auto-Save: Automatically saves your notes as you type
- Persistent Storage: Notes are saved globally and persist across VS Code sessions
- Character Count: Real-time character counter
- Manual Save & Clear: Buttons for manual save and clearing all notes
Installation
From Source
- Clone this repository
- Run
npm install to install dependencies
- Run
npm run compile to compile the extension
- Press F5 to launch the extension in a new VS Code window
Usage
Opening the Notepad
- Click the notepad icon in the activity bar (left sidebar)
- Or use the command palette (Cmd+Shift+P / Ctrl+Shift+P) and search for "Open Notepad"
Features
- Auto-Save: Your notes are automatically saved 1 second after you stop typing
- Manual Save: Click the 💾 Save button to manually save your notes
- Clear Notes: Click the 🗑️ Clear button to clear all notes (with confirmation)
- Character Count: See the total character count at the bottom of the panel
Commands
Notepad: Open Notepad - Opens the notepad panel
Notepad: Clear Notepad - Clears all notes in the notepad
Development
Prerequisites
- Node.js (v16 or higher recommended)
- npm
- Visual Studio Code
Building
npm install
npm run compile
Running in Development
Press F5 in VS Code to launch the extension in a new Extension Development Host window.
Debugging
The extension includes launch configurations for debugging:
- Run Extension: Launches the extension in debug mode
Project Structure
.
├── src/
│ ├── extension.ts # Extension entry point
│ └── notepadViewProvider.ts # Webview provider for notepad UI
├── media/
│ └── notepad.css # Styles for notepad webview
├── resources/
│ └── notepad-icon.svg # Icon for the extension
├── .vscode/
│ ├── launch.json # Debug configuration
│ └── tasks.json # Build tasks
├── package.json # Extension manifest
└── tsconfig.json # TypeScript configuration
Technologies
- TypeScript
- VS Code Extension API
- Webview API for custom UI
- Global State API for data persistence
License
MIT
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
| |