Highlight any text in your code files and have it persist across sessions. Select text, pick a color, done.
Features
- Right-click → Highlight Selection — highlight in your default color instantly
- Color swatches in CodeLens — four color buttons appear above the line whenever you select text; sorted by most recently used
- More colors picker — 12 curated colors optimised for dark themes (high contrast, won't wash out syntax highlighting)
- Hover to remove — hover over any highlight and click the trash icon to remove it
- Highlights follow your edits — as you add or remove lines, highlights stay anchored to the correct text
- Persists across sessions — highlights survive closing and reopening VS Code
Usage
- Select any text in a code file
- Either:
- Right-click → Highlight Selection (uses your default color)
- Right-click → Highlight (Pick Color) to choose
- Click a color swatch in the CodeLens that appears above the line
- To remove: hover over the highlighted text and click Remove highlight
- To clear a whole file: right-click → Clear All Highlights in File
Color Picker
The picker groups colors into Recently used (your last 8) and Suggested — a palette chosen specifically for dark editor themes so highlighted text stays readable.
Settings
| Setting | Default | Description |
|---|---|---|
highlighter.defaultColor |
#FFD600 (Yellow) |
Color used by "Highlight Selection" |
Keyboard Shortcuts
No defaults are set to avoid conflicts. Open Keyboard Shortcuts (Cmd+K Cmd+S), search Highlighter, and bind your preferred keys to:
Highlighter: Highlight SelectionHighlighter: Highlight (Pick Color)Highlighter: Remove HighlightHighlighter: Clear All Highlights in File