This VS Code extension provides a simple and efficient way to remove single-line comments from your code. Whether you're cleaning up a file, preparing code for production, or simply need to declutter your workspace, Comment Remover makes it easy with just one command.
- Remove Single-line Comments: Quickly remove
//
single-line comments from any file. - Intelligent URL Skipping: Preserves URLs in your code, ensuring that only non-essential comments are removed.
- Support for Multiple Languages: Works with any programming language supported by VS Code that uses
//
for single-line comments.
- Open Visual Studio Code.
- Press
Ctrl+P
to open the Quick Open dialog. - Type
ext install your-publisher.comment-remover
and press Enter. - Once installed, you can access Comment Remover from the Command Palette.
To use Comment Remover, follow these steps:
- Open the file from which you want to remove comments.
- Open the Command Palette with
Ctrl+Shift+P
(orCmd+Shift+P
on macOS). - Type "Remove Single-line Comments" and press Enter.
Your file will be instantly cleaned of single-line comments, except for URLs or commented-out URLs.
No configuration is necessary to use Comment Remover. It works out of the box with any supported file type.
Currently, Comment Remover only supports single-line comments starting with //
. Block comments and other comment types are not affected.
If you encounter a bug or have a feature request, please open an issue on our GitHub repository. Contributions to improve Comment Remover are always welcome!
Initial release of Comment Remover:
- Remove single-line comments.
- Skip URLs in comments.