A Visual Studio Code extension that allows you to add configurable attribution text to the top of your files with enhanced features and optimizations.
- Quick Attribution - Add custom attribution text (like your name or license) to the top of any text file
- Configurable Settings - Customize your attribution text through VS Code settings
- Multiple Access Methods - Use command palette, keyboard shortcut, or context menu
- Smart Notifications - Optional success/error notifications with configurable display
- Input Validation - Ensures attribution text is properly configured before use
- Error Handling - Robust error handling with user-friendly messages
- Open any text file in VS Code
- Open the Command Palette (
Ctrl/Cmd + Shift + P
) - Type "Add Attribution" and select the command
- Attribution text will be inserted at the top of the file
- Windows/Linux:
Ctrl + Shift + A
- macOS:
Cmd + Shift + A
- Right-click in any text editor
- Select "Add Attribution" from the context menu
- Open VS Code Settings (
Ctrl/Cmd + ,
) - Search for "Attribution"
- Set your desired attribution text in the "Attribution: Text" field
- Default:
// Created by: Your Name
- Toggle success/error notifications on/off
- Default: Enabled
{
"attribution.text": "// Created by: Your Name",
"attribution.showNotifications": true
}
- Node.js (v16 or higher)
- Visual Studio Code
- Clone this repository
- Run
npm install
to install dependencies - Press
F5
to launch the extension in a new Extension Development Host window
npm run compile
- Compile TypeScript to JavaScriptnpm run watch
- Watch for changes and recompile automaticallynpm run lint
- Run ESLint (if configured)
Attribution-Plugin/
├── src/
│ └── extension.ts # Main extension logic
├── out/ # Compiled JavaScript
├── .vscode/ # VS Code configuration
├── package.json # Extension manifest
├── tsconfig.json # TypeScript configuration
├── LICENSE # Creative Commons BY-NC-SA 4.0
└── README.md # This file
- Modular Code Structure - Separated concerns into focused functions
- Type Safety - Full TypeScript implementation with strict typing
- Error Handling - Comprehensive error handling with user feedback
- Performance - Efficient text insertion with proper validation
- User Experience - Configurable notifications and multiple access methods
- Maintainability - Clean, documented code with constants and helper functions
- Async/Await - Modern JavaScript patterns for better performance
- Input Validation - Ensures attribution text is valid before insertion
- Configuration Management - Centralized configuration handling
- Notification System - User-configurable feedback system
- Multiple UI Access Points - Command palette, keyboard shortcuts, and context menu
This project is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
Contributions are welcome! Please ensure your code follows the existing style and includes appropriate tests.
- ✨ Initial release with core attribution functionality
- 🎯 Multiple access methods (command palette, keyboard shortcut, context menu)
- ⚙️ Configurable settings with validation
- 🔔 Optional notification system
- 🛡️ Comprehensive error handling
- 📚 Full documentation and examples