Text Highlighter
A VS Code extension that highlights all occurrences of selected text with a marker color.
Features
- Automatic Highlighting: When you select text, all occurrences of that text in the current document are highlighted with a marker color.
- Configurable Colors: Customize the background and border colors of the highlights.
- Case Sensitivity: Choose whether highlighting should be case sensitive or not.
- Minimum Selection Length: Set a minimum character count to trigger highlighting.
- Status Bar Feedback: Shows the count of occurrences found.
- Overview Ruler: Highlighted occurrences are also shown in the editor's overview ruler for easy navigation.
Commands
Highlight Selection: Manually trigger highlighting for the current selection.
Clear All Highlights: Remove all current highlights.
Extension Settings
This extension contributes the following settings:
| Setting |
Default |
Description |
textHighlighter.backgroundColor |
rgba(255, 255, 0, 0.4) |
Background color for highlighted text (supports rgba) |
textHighlighter.borderColor |
rgba(255, 200, 0, 0.8) |
Border color for highlighted text |
textHighlighter.highlightOnSelection |
true |
Automatically highlight all occurrences when text is selected |
textHighlighter.minSelectionLength |
2 |
Minimum selection length to trigger highlighting |
textHighlighter.caseSensitive |
false |
Whether highlighting should be case sensitive |
Usage
- Open any text file in VS Code
- Select some text
- All occurrences of the selected text will be highlighted with a yellow marker color
- The status bar will show the number of occurrences found
Customization Examples
Change highlight color to blue
{
"textHighlighter.backgroundColor": "rgba(0, 120, 255, 0.3)",
"textHighlighter.borderColor": "rgba(0, 100, 255, 0.8)"
}
Enable case-sensitive matching
{
"textHighlighter.caseSensitive": true
}
Require longer selections
{
"textHighlighter.minSelectionLength": 3
}
Known Issues
None at this time.
Release Notes
0.0.1
Initial release:
- Automatic highlighting of selected text occurrences
- Configurable highlight colors
- Case sensitivity option
- Minimum selection length setting
| |