Highlight Code lets you quickly mark important sections of source files with vibrant colors so you can present, teach, or revisit critical snippets with ease. Highlights persist per file, can be restored after reloads, and are fully controllable through simple commands.
✨ Features
Persistent color highlights that survive editor reloads and file switches.
Palette picker with curated colors plus support for custom hex inputs.
One-click cleanup for either the active editor or the entire workspace.
Selective removal so you can clear just the highlight under your current selection.
📸 Preview
The screenshot above shows two highlighted sections in different colors. Use this view as a reference for how the extension renders decorations in VS Code.
⚡ Quick Start
Install the extension (or clone this repo and run it via F5 in VS Code).
Select any text and press Cmd/Ctrl+Shift+H to highlight it.
Change colors with Cmd/Ctrl+Shift+M.
Manage highlights using the shortcuts below.
⌨️ Commands & Shortcuts
Command
macOS Shortcut
Windows/Linux Shortcut
Description
extension.highlightText
Cmd+Shift+H
Ctrl+Shift+H
Highlight the current selection using the configured color.
extension.selectHighlightColor
Cmd+Shift+M
Ctrl+Shift+M
Open the color picker to choose a highlight color.
extension.clearAllHiglightsInCurrentFile
Cmd+Shift+L
Ctrl+Shift+L
Remove every highlight in the active editor.
extension.clearHighlightForSelectedRange
Cmd+Shift+D
Ctrl+Shift+D
Remove the highlight covering the current selection.
extension.clearAllHighlights
Cmd+Shift+G
Ctrl+Shift+G
Clear all highlights across the entire workspace.
All commands are also available through the Command Palette by searching for “Highlight”.
🎛️ Settings
Setting
Type
Default
Description
highlightExtension.highlightColor
string
rgba(255,255,0,0.2)
Overrides the color applied when highlighting (supports CSS color values).
To change the color:
Open Settings (Cmd/Ctrl+, or File → Preferences → Settings).