File Alias Manager
English | 简体中文
Add aliases/notes to files in VS Code, displayed directly in the file explorer for quick identification and management of important files.
✨ Core Features
📝 File Alias Management
- Quick Templates: 10 preset templates (Config, Document, Important, Fix Required, Test File, etc.)
- Custom Aliases: Support for free-form text input
- Edit/Delete: Leave empty to delete an alias
- Batch Clear: Clear all file aliases with one click
- Auto Sync: Automatically remove aliases when files are deleted
🎨 Visual Display
- File Decorator: Display complete alias text directly after filenames in the explorer
- Smart Display: Alias text automatically truncates based on settings (configurable max length)
- Tooltip Info: Hover to show complete alias details
🚀 Convenient Operations
- Context Menu: Right-click to select "Edit File Alias" in file explorer and editor title bar
- Command Palette: Quick access to all features through the command palette
- Template Selection: Quickly choose preset templates or custom input
📖 Usage
Edit File Alias
Method 1: Context Menu
- Right-click a file in the explorer or editor title bar
- Select "Edit File Alias"
- Choose from the template list, or select "Custom" to input an alias
- Press Enter to confirm; leave empty to delete the alias
Method 2: Command Palette
- Open Command Palette (
Cmd+Shift+P or Ctrl+Shift+P)
- Type "Edit File Alias"
- Select a template or enter a custom alias
Quick Templates
10 built-in common templates:
| Template |
Description |
| ✏️ Custom... |
Enter custom alias |
| 📝 Config File |
Mark as configuration file |
| 📄 Document |
Mark as document |
| ⭐ Important |
Mark as important file |
| 🐛 Fix Required |
Mark as needs fixing |
| 🧪 Test File |
Mark as test file |
| 🔒 Private |
Mark as private file |
| 🗑️ To Delete |
Mark as to be deleted |
| 🚀 Core |
Mark as core file |
| 📝 Temporary |
Mark as temporary file |
View and Manage Aliases
- View Aliases: View alias text directly next to filenames in the explorer
- Clear All Aliases: Execute "Clear All File Aliases" via command palette
⚙️ Configuration Options
Configure the following options in VS Code settings:
| Configuration |
Description |
Default |
aliasFiles.configPath |
Alias config file path (relative or absolute) |
.vscode/alias_config.json |
aliasFiles.maxDisplayLength |
Maximum display length for aliases (0 = no limit) |
0 |
📂 Data Storage
All file alias data is stored by default in .vscode/alias_config.json in the workspace (JSON format).
Config File Features
- ✅ Can be committed to version control for team sharing
- ✅ Supports manual editing of config file
- ✅ Automatically monitors external modifications and reloads
- ✅ Cross-device synchronization
- ✅ Does not affect other project files
Nested structure example:
{
"src": {
"main.ts": "Main Entry",
"utils": {
"helper.ts": "Helper Functions"
}
},
"README.md": "Project Documentation"
}
🎯 Use Cases
- Config File Marking: Add alias "Production Config" to
config.json
- Core Code Identification: Add alias "Main Entry File" to
main.ts
- Important Doc Notes: Add alias "Project Documentation" to
README.md
- Temporary File Marking: Add alias "To Delete" to test files
- Team Collaboration: Share config file to unify important file identification
🔧 Command List
| Command |
Description |
alias-files.addAlias |
Edit file alias (supports template selection) |
alias-files.clearAll |
Clear all file aliases |
📊 Technical Features
- ✅ Smart Cache: MD5 hash-based content detection to avoid circular loading
- ✅ Incremental Update: Only refresh file decoration when modifying a single alias
- ✅ Config Monitoring: Automatically detect config file changes (supports external editing)
- ✅ Atomic Operations: Use temp file + rename to ensure config file integrity
- ✅ Nested Structure: Supports directory hierarchy in config file organization
- ✅ Real-time Sync: All modifications are saved and view updated immediately
📝 Version History
1.0.0 (2025-11-03)
🎉 First Official Release!
Core Features:
- ✅ File alias add, edit, delete
- ✅ 10 quick template support
- ✅ File decorator displays aliases directly
- ✅ Config file auto-monitoring and sync
- ✅ Content hash-based smart cache mechanism
- ✅ Single-file incremental refresh optimization
- ✅ Context menu integration
- ✅ Command palette support
- ✅ Auto cleanup of aliases on file deletion
- ✅ Custom config file path
- ✅ Alias display length limit
Technical Highlights:
- 🚀 High Performance: Content hash detection avoids unnecessary reloading
- 🔄 Smart Sync: Distinguishes between internal saves and external edits
- 💾 Data Safety: Atomic writes ensure config file integrity
- 🎨 User Friendly: Quick templates + custom input
Get Started! Add aliases to your important files and make project management more efficient! 🎉
| |