Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Remove unnecessary comments from code automaticallyNew to Visual Studio Code? Get it now.
Remove unnecessary comments from code automatically

Remove unnecessary comments from code automatically

remove-unnecessary-comments-from-code-automatically

|
11 installs
| (2) | Free
Remove unnecessary comments from code automatically
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

🧹 Remove Unnecessary Comments

A Visual Studio Code extension that automatically removes unnecessary comments from your codebase.
Shortcut: Ctrl + Alt + R


🎯 Purpose

This extension helps you keep your code clean, readable, and professional by removing unused single-line (//) and multi-line (/* ... */) comments across multiple languages.
It’s designed for developers who want a distraction-free code environment without manually scanning for leftover comments.


🚀 Features

  • Removes single-line and block comments automatically
  • Works across multiple programming languages
  • Simple and fast execution
  • Keyboard shortcut included
  • Clean and developer-friendly commands
  • Marketplace-ready performance

🛠️ How It Works

You can trigger the cleanup in two ways:

1. Using the shortcut:
Ctrl + Alt + R

2. Using the Command Palette:
Press Ctrl + Shift + P → search for
“Remove Unnecessary Comments”


⌨️ Keyboard Shortcuts by OS

To ensure a smooth experience across different systems, here are the exact keybindings supported by the extension:

Windows

Ctrl + Alt + R

macOS

Cmd + Option + R

Linux

Ctrl + Alt + R


📦 Installation (VS Code Marketplace)

This extension is available directly on the Visual Studio Marketplace.

To install:

  1. Open VS Code
  2. Go to the Extensions tab
  3. Search for: Remove Unnecessary Comments
  4. Click Install

Once installed, the command becomes available immediately — no extra configuration required.


▶️ Example

Below is a simple before/after example showing what the extension does.

Before

// This is an old comment
function sum(a, b) {
  /* temporary comment */
  return a + b;
}

👨‍💻 Author

Manuel Gouveia Cunga

🌐 LinkedIn: linkedin.com/in/manuel-gouveia-cunga-943a62332

🐙 GitHub: github.com/manuelgouveiacunga

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