Persistent Text Marker
A VS Code extension that permanently highlights all occurrences of selected text with your choice of marker colors via right-click menu.
Features
- Right-Click Menu: Select text, right-click, and choose from 8 different highlight colors
- Persistent Highlights: Highlights stay until you remove them (even after closing VS Code)
- Multiple Colors: Yellow, Green, Blue, Pink, Orange, Purple, Cyan, Red
- Custom Color Picker: Choose from 18 additional colors or enter your own RGBA/hex values
- Customizable Colors: Configure the preset colors via settings
- Whole Word Matching: Option to highlight only exact word matches (not substrings)
- Status Bar Indicator: Shows highlight count with quick access to manage highlights
- Works Across Files: Highlights are applied to all occurrences in your workspace
- Overview Ruler: Highlighted occurrences are shown in the editor's scrollbar for easy navigation
Usage
- Select text in the editor
- Right-click to open the context menu
- Choose Highlight Text → pick a color (Yellow, Green, Blue, etc.)
- All occurrences are now permanently highlighted!
To Remove Highlights
- Right-click → Remove Highlight (removes highlight for selected text)
- Right-click → Clear All Highlights (removes all highlights)
- Click the status bar → Select a highlight → Remove
Custom Colors
- Select text → Right-click → Highlight Text → Custom Color...
- Pick from the visual color palette (18 colors with emoji indicators)
- Or select "Enter Custom RGBA..." to type your own color values
Whole Word Matching
When enabled, highlighting "enable" will NOT match "enabled" or "disable".
Toggle whole word matching:
- Click the status bar indicator → Select "Whole Word Matching"
- Or use Command Palette (
Ctrl+Shift+P) → "Toggle Whole Word Matching"
- Or set
persistentTextMarker.wholeWordMatching in settings
Available Colors
| Color |
Preview |
| Yellow |
🟡 |
| Green |
🟢 |
| Blue |
🔵 |
| Pink |
🩷 |
| Orange |
🟠 |
| Purple |
🟣 |
| Cyan |
🩵 |
| Red |
🔴 |
Custom Color Palette
Additional colors available in Custom Color picker:
🟥 Bright Red, 🟧 Bright Orange, 🟨 Bright Yellow, 🟩 Bright Green, 🟦 Bright Blue, 🟪 Bright Purple, 🩷 Hot Pink, 🩵 Turquoise, 🤍 Light Gray, 🖤 Dark Gray, 🟤 Brown, 💚 Forest Green, 💙 Navy Blue, 💜 Indigo, 🧡 Coral, 💛 Gold, 🩶 Silver, ❤️ Crimson
Settings
| Setting |
Default |
Description |
persistentTextMarker.wholeWordMatching |
false |
When enabled, only highlight whole word matches |
persistentTextMarker.colors |
(see below) |
Customize the 8 preset highlight colors |
Customizing Colors
Add to your settings.json:
"persistentTextMarker.colors": {
"Yellow": { "background": "rgba(255, 255, 0, 0.5)", "border": "rgba(255, 200, 0, 1)" },
"Green": { "background": "rgba(0, 200, 0, 0.4)", "border": "rgba(0, 150, 0, 0.9)" }
}
Commands
| Command |
Description |
| Highlight Text → [Color] |
Highlight selected text with chosen color |
| Highlight Text → Custom Color... |
Pick from color palette or enter custom RGBA |
| Remove Highlight |
Remove highlight for selected text |
| Clear All Highlights |
Remove all highlights |
| Toggle Whole Word Matching |
Toggle between substring and whole word matching |
| Show All Highlights |
Open quick pick to view and manage highlights |
Status Bar
The extension shows a status bar item (bottom-right) displaying:
- Number of active highlights
- Total number of matches across all files
Click the status bar to:
- View all active highlights
- Toggle whole word matching
- Remove individual highlights
- Search for highlighted text in files
Known Issues
None at this time.
Release Notes
0.0.3
- Added custom color picker with 18 predefined colors
- Added whole word matching option
- Added status bar indicator with highlight management
- Added customizable colors via settings
- Added configuration change detection (live updates)
0.0.2
- Added extension icon
- Updated documentation
0.0.1
Initial release:
- Persistent text highlighting via right-click menu
- 8 color options: Yellow, Green, Blue, Pink, Orange, Purple, Cyan, Red
- Highlights persist across sessions
- Remove individual or all highlights