A Visual Studio Code extension that highlights custom keywords in comments with configurable colors and bold formatting. Perfect for tracking TODOs, FIXMEs, personal tags, and other important markers in your code.
Demo Screenshots
- Mode: Whole Line Highlighting

- Mode: Keyword Highlighting

Features
- Customizable Keywords: Define your own keywords to highlight (case-sensitive matching)
- Vivid Background Colors: Each keyword can have its own distinctive background color
- Bold Text: Highlighted lines are displayed in bold for better visibility
- Toggle On/Off: Quickly enable or disable highlighting with a command or status bar button
- Live Updates: Highlights update automatically as you type
- Configurable: Easily add, edit, or remove keywords through VS Code settings
- Status Bar Integration: One-click toggle button in the status bar
Default Keywords
The extension comes pre-configured with these keywords (dark backgrounds with white text):
// [SamChen] - Dark Blue (#1A3D64)
// TODO: - Dark Teal (#FFA240)
// FIX: - Dark Red (#DC0000)
// NOTE: - Dark Green (#41644A)
// LOG: - Dark Gray (#94B4C1)
Usage
Basic Usage
- Install the extension
- Open any file in VS Code
- Type one of the default keywords in a comment
- The entire line will be highlighted with the configured color and bold font
Example:
// TODO: Implement error handling
function processData() {
// FIX: This needs optimization
// NOTE: This is a temporary solution
// [SamChen] Review this logic
}
Toggle Highlighting
You can toggle highlighting on or off in three ways:
Option 1: Status Bar Button (Easiest)
- Look at the bottom-right of VS Code
- Click the "👁 Comments" button to toggle
- When enabled: Shows "👁 Comments" (eye icon)
- When disabled: Shows "👁🗨 Comments" with warning color
Option 2: Command Palette
- Open Command Palette (
Cmd+Shift+P on Mac, Ctrl+Shift+P on Windows/Linux)
- Type "Custom Comment Highlighter: Toggle Highlighting"
- Press Enter
Option 3: Keyboard Shortcut
- Assign a custom keyboard shortcut (see Keyboard Shortcut Setup section below)
Customize Keywords and Colors
- Open VS Code Settings (
Cmd+, on Mac, Ctrl+, on Windows/Linux)
- Search for "Custom Comment Highlighter"
- Click "Edit in settings.json"
- Modify the
customCommentHighlighter.keywords array:
{
"customCommentHighlighter.keywords": [
{
"keyword": "//[YourName]",
"color": "#8B2635"
},
{
"keyword": "// IMPORTANT:",
"color": "#8B0000"
},
{
"keyword": "// REVIEW:",
"color": "#4B0082"
}
]
}
Color Tips: Use darker, dimmed colors for best readability with white text:
- Dark Red tones:
#8B2635, #8B0000, #800020
- Dark Blue tones:
#1B5E63, #2C5F6F, #003366
- Dark Yellow/Gold:
#8B6F00, #B8860B, #9B870C
- Dark Purple:
#4B0082, #663399, #483D8B
- Dark Green:
#2F4F2F, #0B6623, #355E3B
Installation
Method 1: From VSIX File (Standalone Installation)
- Download the
.vsix file from the releases
- Open VS Code
- Go to Extensions view (
Cmd+Shift+X or Ctrl+Shift+X)
- Click the
... menu at the top of the Extensions view
- Select "Install from VSIX..."
- Choose the downloaded
.vsix file
Method 2: From Source
- Clone this repository
- Open terminal in the project folder
- Run:
npm install
- Run:
npm run package
- Install the generated
.vsix file using Method 1
Building a Standalone Package
To create a .vsix file for distribution:
Install vsce (if not already installed):
npm install -g @vscode/vsce
In the project directory, run:
vsce package
This will generate a file named custom-comment-highlighter-0.0.1.vsix
Share this file with others for easy installation
Configuration
Available Settings
customCommentHighlighter.enabled: Enable or disable highlighting (default: true)
customCommentHighlighter.keywords: Array of keyword configurations with colors
Example Configuration
{
"customCommentHighlighter.enabled": true,
"customCommentHighlighter.keywords": [
{
"keyword": "//[SamChen]",
"color": "#8B2635"
},
{
"keyword": "// TODO:",
"color": "#1B5E63"
},
{
"keyword": "//FIX:",
"color": "#8B6F00"
}
]
}
Tips
- Case Sensitivity: Keywords are case-sensitive.
// TODO: and // todo: are different.
- Whole Line Highlighting: The entire line containing the keyword will be highlighted with white text on dark background.
- Multiple Keywords: You can have as many keywords as you need.
- Color Contrast: Use darker background colors for best contrast with white text.
- Quick Toggle: Set up a keyboard shortcut for the toggle command for faster access.
Keyboard Shortcut Setup
To add a keyboard shortcut:
- Open Keyboard Shortcuts (
Cmd+K Cmd+S on Mac, Ctrl+K Ctrl+S on Windows/Linux)
- Search for "Custom Comment Highlighter: Toggle"
- Click the
+ icon and press your desired key combination
- Example:
Cmd+Shift+H or Ctrl+Alt+H
Requirements
- Visual Studio Code v1.107.0 or higher
Known Issues
None currently. Please report issues on the GitHub repository.
Release Notes
0.0.1
Initial release:
- Customizable keyword highlighting
- Bold text formatting
- Configurable background colors
- Toggle command
- Live updates as you type
License
This extension is provided as-is for personal and commercial use.
Contributing
Feel free to submit issues and enhancement requests!
Documentation
Enjoy highlighting your comments! 🎨