Skip to content

Royhtml/catnime

Repository files navigation

Universal Comment Remover

CatNime

A VS Code extension to instantly and automatically remove all comments across various programming languages. Perfect for code minification, cleaning up debugging comments, or preparing your code for production.

Key Features

  • Auto-Language Detection: Automatically adjusts the removal pattern based on the file extension (.js, .py, .html, etc.).
  • Inline Comment Removal: Deletes comments located right next to your code (e.g., code // comment).
  • Block Comment Removal: Clears multi-line comments along with their empty lines to keep your code clean and tidy.
  • Supports 20+ Languages: JavaScript, TypeScript, Python, Java, C/C++, C#, PHP, Go, Rust, HTML, CSS, SQL, YAML, Bash, Ruby, Lua, and more.

How to Use

  1. Open the code file you want to clear of comments.
  2. Open the Command Palette by pressing Ctrl+Shift+P (Windows/Linux) or Cmd+Shift+P (Mac).
  3. Type "Remove All Comments".
  4. Press Enter. All comments will vanish instantly!

Keyboard Shortcuts (Optional)

If you want to assign a custom shortcut, you can configure it manually in VS Code:

  1. Open Keyboard Shortcuts (Ctrl+K then Ctrl+S).
  2. Search for the command: Remove All Comments.
  3. Double-click it and bind it to your preferred keys (e.g., Ctrl+Shift+Delete).

Supported Comment Patterns

Language Extension Removed Patterns
JavaScript / TS / Java / C++ .js, .ts, .java, .cpp // ... and /* ... */
Python / Ruby / YAML .py, .yml, .rb # ..., """ ... """, and ''' ... '''
HTML / XML / Markdown .html, .xml, .md <!-- ... -->
CSS / SCSS .css, .scss /* ... */
SQL .sql -- ... and /* ... */
Visual Basic .vb ' ...

Contribution

This extension is open-source. If you find a programming language whose comment patterns are not correctly detected, please open an Issue or submit a Pull Request on our GitHub repository.

License

This application is licensed under the [MIT License.

About

Tolls Delete Comments For Vscode

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages