Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>I-Hate-Comments - Smart Comment RemoverNew to Visual Studio Code? Get it now.
I-Hate-Comments - Smart Comment Remover

I-Hate-Comments - Smart Comment Remover

Tanmoy Debnath

|
1 install
| (0) | Free
Fast, deterministic comment remover to strip and remove comments, clean code, and delete inline or block comments across JavaScript, Python, HTML, C++, and 30+ languages.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

I Hate Comments Header

I Hate Comments

Because your code should explain itself, and comments are just essays written by developers who love typing.


Why This Exists

  • Comments Lie: Code changes, comments stay outdated for eternity.
  • Save Bandwidth: Why transmit 500 lines of developer diary entries to production?
  • AI Is Overkill: You do not need a massive language model just to delete // TODO: fix this later.
  • Pure Syntax Engine: Strips comments deterministically without touching URLs, strings, or shebangs.

What It Does

  • One-Click Purge: Right-click any selection or document and select Remove Comments.
  • 30+ Language Rules: Full support for JavaScript, TypeScript, Python, HTML, CSS, C/C++, Java, Go, Rust, PHP, SQL, Lua, Shell, and more.
  • String & URL Safe: Advanced state-machine parser guarantees strings like "https://example.com#section" are never ruined.
  • Directive Aware: Option to keep critical linter rules (like eslint-disable or @ts-ignore) while erasing everything else.

Quick Usage

  1. Open any file in VS Code.
  2. Select a block of code (or leave unselected to process the whole file).
  3. Right-click anywhere and choose Remove Comments.
  4. Watch the fluff disappear.

Configuration

Custom options accessible via VS Code Settings:

Setting Key Default Description
smartCommentRemover.preserveShebang true Keeps top shebang lines like #!/usr/bin/env node intact
smartCommentRemover.preserveDirectives false Preserves linter/compiler flags like eslint-disable
smartCommentRemover.collapseEmptyLines true Collapses blank lines created by comment removal

Local Development

git clone https://github.com/TanmoyFRu/I-Hate-Comments.git
cd I-Hate-Comments
npm install
npm run compile
npm test

License

MIT

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
  • Your Privacy Choices
  • Consumer Health Privacy
© 2026 Microsoft