Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Hide Comments PlusNew to Visual Studio Code? Get it now.
Hide Comments Plus

Hide Comments Plus

codebytelab

| (0) | Free
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

🧩 Hide Comments – VS Code Extension

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:

  • Single-line comments (#, //)
  • Multi-line comment blocks (/* ... */, ''' ... ''', <!-- ... -->)
  • Empty lines (only whitespace)

Then, it programmatically folds those regions using the VS Code editor API, giving you a compact, focused view of your code.


  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft