Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Comment Remover by MenukNew to Visual Studio Code? Get it now.
Comment Remover by Menuk

Comment Remover by Menuk

Menuk Fernando

|
18 installs
| (0) | Free
Remove redundant comments (AI/boilerplate) safely—configurable, multi-language, optional on-save.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

VS Code Comment Remover

License: MIT

A Visual Studio Code extension that removes comments from your source code.
Supports line comments, block comments, and JSDoc comments across multiple languages.
Includes customization options for preserving important comments and advanced regex filtering.


✨ Features

  • Remove all comments at once
  • Remove only line comments
  • Remove only block comments
  • Remove JSDoc comments (/** ... */)
  • Remove comments matching regex patterns
  • Run automatically on save
  • Preserve shebang lines (e.g. #!/usr/bin/env node)
  • Preserve first block headers (e.g. license text)
  • Supports C-like, hash-based, and HTML-style comments

⌨️ Keyboard Shortcuts

Command Default Shortcut
Remove all comments Ctrl+Alt+A
Remove line comments only Ctrl+Alt+L
Remove block comments only Ctrl+Alt+B
Remove by regex pattern Ctrl+Alt+P

👉 Shortcuts can be customized in:
File → Preferences → Keyboard Shortcuts → search for commentRemover.


⚙️ Extension Settings

This extension contributes the following settings in your settings.json:

{
  // Run automatically on save
  "commentRemover.onSave": false,

  // Remove JSDoc /** ... */ comments
  "commentRemover.removeDocComments": false,

  // Preserve first block comment in file (e.g. license headers)
  "commentRemover.preserveFirstBlock": true,

  // Preserve shebangs like #!/usr/bin/env node
  "commentRemover.preserveShebang": true,

  // Define patterns to KEEP (regex per language or global)
  "commentRemover.keepPatterns": {
    "global": ["TODO", "FIXME", "KEEP"],
    "javascript": ["DEBUG", "IMPORTANT"]
  },

  // Limit removal to only selected text (instead of full file)
  "commentRemover.workspaceScope": "selection"
}
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft