|
| Variable | Description | Example |
|---|---|---|
$FILENAME |
Current file name | main.ts |
$PROJECT |
Project name | my-app |
$VERSION |
Current version | 1.2.3 |
$SINCE |
Creation version | 1.0.0 |
$AUTHOR |
Full author (Name ) | John Doe <john@example.com> |
$CREATED |
Creator name | John Doe |
$UPDATED |
Last updater name | Jane Smith |
$CREATEDAT |
Creation date | 2026/04/23 14:30:00 |
$UPDATEDAT |
Last update date | 2026/04/23 15:45:00 |
$LICENSE |
License type | MIT |
$URL |
Project URL | https://github.com/user/repo |
$OBS1-3 |
Observation fields | Custom notes |
$LOGO0-10 |
Full logo lines | ASCII art lines |
$LLOGO0-6 |
Little logo lines | Compact ASCII art |
🚀 Usage
Keyboard Shortcuts
- Insert Full Header:
Ctrl+Alt+H(Windows/Linux) orCmd+Option+H(macOS) - Insert Little Header:
Ctrl+Alt+J(Windows/Linux) orCmd+Option+J(macOS) - Insert Logo Only:
Ctrl+Alt+L(Windows/Linux) orCmd+Option+L(macOS)
Command Palette
- Press
Ctrl+Shift+P(orCmd+Shift+Pon macOS) - Type "header" to see available commands:
Header: Insert headerHeader: Insert little headerHeader: Insert only logo headerHeader: Update all headers
Auto-Update on Save
The extension automatically updates headers when you save files:
- Updates the
Updated:timestamp - Updates the filename (if changed)
- Preserves creation info and ASCII art
Batch Update
To update all headers in your workspace:
- Open Command Palette (
Ctrl+Shift+P) - Run
Header: Update all headers
🌍 Supported Languages
The extension supports 40+ languages with proper comment syntax:
Programming Languages
- Web: JavaScript, TypeScript, CoffeeScript, HTML, CSS, SCSS, Vue, Svelte
- Backend: Python, Java, C, C++, C#, Go, Rust, PHP, Ruby, Swift
- Functional: Haskell, Clojure, Elixir, Erlang, F#, OCaml
- Systems: Objective-C, Lua, Perl, R, Shell scripts
- Data: SQL, YAML, Terraform, Dockerfile
Markup & Config
- Markup: HTML, XML, Markdown, Jade, LaTeX
- Config: INI, JSON, TOML, Makefile
Custom Languages
For unsupported languages, define custom delimiters:
{
"header.customDelimiters": {
"mylang": ["# ", " #"],
"blocklang": ["/* ", " */"]
}
}
🔧 Advanced Configuration
Git Integration
The extension automatically detects:
- Author name from
git config user.name - Email from
git config user.email - Falls back to system username if Git not configured
Package.json Integration
Automatically reads:
name→ Project nameversion→ Current versionauthor→ Author information
Environment Variables
export USER="Your Name"
export URL="https://your-site.com"
Priority Order
Configuration values are resolved in this order:
- File-based (workspace root files)
- VS Code settings
- Git configuration
- Environment variables
- System defaults
🐛 Troubleshooting
Headers Not Inserting
Problem: Headers aren't being inserted in new files.
Solutions:
- Check if the language is supported:
Extensions→dnettoRaw Header→Supported Languages - Enable auto-insert:
"header.autoInsert": true - Verify file isn't excluded in VS Code settings
Wrong Author/Email
Problem: Wrong author name or email in headers.
Solutions:
- Set in VS Code settings:
"header.username"and"header.email" - Create
authorfile in workspace root - Configure Git:
git config user.name "Your Name"
Logo Not Displaying
Problem: Custom logo isn't showing.
Solutions:
- Check logo file exists in workspace root
- Ensure logo is max 30 columns × 11 lines
- Verify
header.logoTypeis set correctly
Template Variables Not Working
Problem: Template variables show as literal text.
Solutions:
- Check variable names (case-sensitive)
- Ensure required files exist (e.g.,
versionfor$VERSION) - Restart VS Code after configuration changes
Performance Issues
Problem: Extension slows down VS Code.
Solutions:
- Disable auto-update:
"header.autoInsert": false - Use simpler templates
- Exclude large files/folders in VS Code settings
❓ FAQ
Q: Can I use this with existing projects? A: Yes! The extension works with any project. Existing headers will be updated surgically.
Q: Does it support my favorite language? A: Check the supported languages list. For unsupported languages, use custom delimiters.
Q: Can I disable the ASCII art?
A: Yes, set "header.logoType": "none" to remove ASCII art entirely.
Q: How do I change the date format?
A: The date format is fixed as YYYY/MM/DD HH:mm:ss for consistency.
Q: Can I use this in CI/CD pipelines? A: Yes, but headers are inserted interactively. For automated header insertion, consider other tools.
Q: Does it work with remote workspaces? A: Yes, all features work with remote development (WSL, SSH, Codespaces).
Q: Can I use it with large codebases? A: Yes, the extension is optimized for performance. Auto-updates only trigger on save and are very fast.
Q: What happens to existing headers? A: Existing headers are updated surgically - only timestamps and filenames change, preserving your custom content.
⚡ Performance & Compatibility
System Requirements
- VS Code: 1.40.0 or later
- Node.js: 12.0.0 or later (for development)
- Memory: Minimal impact (< 10MB additional RAM)
Performance Tips
- Use simpler templates for better performance
- Disable auto-insert for large projects if needed
- The extension only activates on supported file types
Compatibility
- ✅ Windows, macOS, Linux
- ✅ VS Code, VS Code Insiders
- ✅ Remote development (WSL, SSH, Codespaces)
- ✅ All supported languages work identically across platforms
🤝 Contributing
We welcome contributions! Here's how to get started:
Development Setup
git clone https://github.com/dnettoRaw/vscode-header.git
cd vscode-header
npm install
npm run compile
Running Tests
npm test # Run all tests
npm run lint # Check code quality
npm run compile # Build the extension
Testing Locally
- Open in VS Code:
Extensions→...→Install from VSIX - Select
vscode-header-*.vsixfrom the project root
Code Structure
src/
├── extension.ts # Main extension logic
├── header.ts # Header generation and parsing
├── delimiters.ts # Language delimiter definitions
└── test/ # Test suite
Guidelines
- Follow TypeScript best practices
- Add tests for new features
- Update documentation
- Use conventional commits
📈 Changelog
v0.3.4 (Current)
- Enhanced test coverage (26 test cases)
- Improved linting and code quality
- Fixed header parsing edge cases
- Better error handling
v0.3.3
- Added custom delimiter support
- Improved logo rendering
- Enhanced file-based configuration
v0.3.2
- Added little header support
- Improved auto-update functionality
- Better language detection
v0.3.1
- Initial public release
- Basic header insertion
- Git integration
- ASCII art support
📜 License
This project is licensed under the MIT License - see the LICENSE file for details.
Made with ❤️ by dnettoRaw
GitHub •
VS Code Marketplace •
Website