MarkMyCode - Persistent Code Highlighter
A powerful VS Code extension that allows you to highlight and mark important code snippets with persistent, colorful highlighting that survives editor restarts and file changes.
✨ Features
🎨 Multi-Color Highlighting
- 9 vibrant colors to choose from: Red, Green, Blue, Yellow, Purple, Orange, Pink, Teal, and Gray
- Each color is carefully designed for optimal readability and contrast
- Mix and match different colors within the same file
💾 Persistent Storage
- All marks are automatically saved and restored when you reopen files
- Marks survive VS Code restarts, file saves, and workspace changes
- Smart position tracking - marks adjust automatically when you edit code
🎯 Smart Mark Management
- Context Menu Integration: Right-click selected text to access color options
- Intelligent Unmarking: Click anywhere in a marked section to remove it
- Bulk Operations: Clear all marks from a file with confirmation
- Quick Navigation: List all marks and jump to any of them instantly
📍 Visual Indicators
- Overview Ruler: See all marks in the scrollbar for quick navigation
- Rich Tooltips: Hover over marks to see content, color, and creation time
- Border Styling: Clean, rounded borders distinguish marks clearly
🚀 Getting Started
Installation
- Open VS Code
- Go to Extensions (Ctrl+Shift+X)
- Search for "Mark It - Persistent Code Highlighter"
- Click Install
Basic Usage
Marking Text
- Select the text you want to highlight
- Right-click to open the context menu
- Choose "Mark with Color" submenu
- Select your desired color
Alternative: Command Palette
- Select text
- Open Command Palette (Ctrl+Shift+P)
- Type "Mark" and choose a color option
Unmarking Text
- Click anywhere within a marked section
- Right-click and select "Unmark Selection"
🎮 Available Commands
Command |
Description |
Shortcut |
Mark with [Color] |
Highlight selection with chosen color |
Right-click menu |
Unmark Selection |
Remove mark at cursor position |
Right-click menu |
List All Marks |
Show all marks in current file |
Command Palette |
Clear All Marks |
Remove all marks from current file |
Command Palette |
🎨 Available Colors
Color |
Use Case |
Appearance |
🔴 Red |
Critical issues, errors, important warnings |
Bright red with white text |
🟢 Green |
Completed items, success cases, approved code |
Vibrant green with white text |
🔵 Blue |
General information, notes, references |
Clean blue with white text |
🟡 Yellow |
Attention needed, pending items, cautions |
Bright yellow with dark text |
🟣 Purple |
Special cases, unique logic, experiments |
Rich purple with white text |
🟠 Orange |
Review needed, temporary code, debugging |
Warm orange with white text |
🩷 Pink |
UI/UX related, design notes, user-facing |
Bright pink with white text |
🫧 Teal |
Data processing, algorithms, logic flow |
Modern teal with white text |
⚫ Gray |
Deprecated code, comments, low priority |
Neutral gray with white text |
⚙️ Configuration
Customize the extension through VS Code settings:
{
"markIt.showInOverviewRuler": true // Show marks in the scrollbar overview
}
Settings Options
markIt.showInOverviewRuler : Boolean (default: true )
- Controls whether marks appear in the editor's overview ruler (scrollbar)
- Disable if you prefer a cleaner scrollbar appearance
📝 Use Cases
For Developers
- Code Review: Mark sections that need attention with different colors
- Bug Tracking: Use red for bugs, yellow for potential issues
- Feature Development: Green for completed features, orange for in-progress
- Documentation: Blue for areas needing documentation
For Students & Learners
- Study Sessions: Highlight important concepts in different colors
- Code Analysis: Mark different patterns or structures
- Learning Progress: Green for understood code, red for areas needing review
For Teams
- Collaborative Review: Use consistent color coding across team members
- Priority System: Red (urgent), yellow (important), blue (informational)
- Status Tracking: Visual progress indicators in shared codebases
🔧 Advanced Features
Smart Position Tracking
The extension automatically adjusts mark positions when you:
- Insert or delete lines above marked sections
- Edit text before marked areas
- Refactor code structure
Conflict Resolution
- Overlapping edits automatically remove affected marks
- Clean removal prevents orphaned highlights
- Maintains data integrity across complex edits
- Efficient decoration management for large files
- Minimal memory footprint
- Fast load times even with hundreds of marks
🎯 Tips & Tricks
Workflow Optimization
- Establish Color Conventions: Use consistent colors across projects
- Regular Cleanup: Use "Clear All Marks" to start fresh when needed
- Quick Navigation: Use "List All Marks" to jump between important sections
- Review Mode: Mark sections during code review for follow-up discussion
Best Practices
- Don't Over-Mark: Use highlights strategically for maximum impact
- Color Consistency: Stick to a color system that makes sense to your team
- Regular Review: Periodically review and clean up old marks
- Combine with Comments: Use marks alongside code comments for context
🔍 Troubleshooting
Marks Not Persisting
- Ensure you're working within a VS Code workspace
- Check that files are saved after marking
- Verify the extension is enabled and active
- Consider reducing the number of marks in very large files
- Disable overview ruler if not needed:
"markIt.showInOverviewRuler": false
Color Visibility
- Marks are designed to work well with both light and dark themes
- If contrast is poor, try a different color or adjust your theme
🆚 Why Choose Mark It?
vs. Built-in Highlighting
- Persistent: Unlike VS Code's built-in highlighting, marks survive restarts
- Multi-Color: 9 colors vs. single highlight color
- Smart Management: Organized mark management with navigation
vs. Other Extensions
- Reliability: Robust position tracking and conflict resolution
- User Experience: Intuitive interface with rich visual feedback
- Performance: Optimized for large files and extensive usage
🎉 What's New
Version 1.0.4
💡 Feature Requests & Feedback
Have ideas for new features or found a bug? We'd love to hear from you! Your feedback helps make Mark It better for everyone.
Happy Marking! 🎨✨
| |