Hide Comments is a simple Visual Studio Code extension that helps you declutter your code view by folding all comments and empty lines in one shortcut.
Supports multiple languages such as:
JavaScript / TypeScript / Java / C / C++
Python
Shell Script / Bash
HTML / XML
✨ Features
🪄 Fold all comments instantly — one command hides them all.
📜 Supports single-line and multi-line comments
// and /* ... */ (C, C++, Java, JS)
# and ''' ... ''' (Python, Shell)
<!-- ... --> (HTML/XML)
🧼 Removes visual clutter by folding empty lines as well.
⏯️ Quick access shortcut: Ctrl + Shift + H
💬 Works in the active editor window.
⚙️ Command
Command ID
Description
Default Shortcut
hide-comments.fold
Folds comments & empty lines
Ctrl + Shift + H
You can also run it manually from the Command Palette (Ctrl + Shift + P) → “Fold Comments”
🚀 How It Works
The extension scans the current document and detects: