Clean Ur Code - Say goodbye to clutter! Remove all comments from your source code instantly while preserving strings, URLs, and regular expressions. Perfect for cleaning up AI-generated code, production builds, or just making your code cleaner! Features Removes ALL comments - Single-line (//), multi-line (/ /), and HTML comments () Installation
Method 2: Quick Install bash Install from VS Code Marketplace (once published) code --install-extension your-publisher-name.cleancode-ai Method 3: Manual Install (.vsix file) bash Download the .vsix file and run: code --install-extension cleancode-ai-1.0.0.vsix How to Use 🖱️ Method 1: Right-Click Menu Open any code file Right-click anywhere in the editor Select "Clean Ur Code: Remove All Comments" ⌨️ Method 2: Keyboard Shortcut Windows/Linux: Ctrl+Shift+R Mac: Cmd+Shift+R Method 3: Command Palette Press Ctrl+Shift+P / Cmd+Shift+P Type "Remove All Comments" Select the command ✂️ Method 4: Selected Text Only Select specific lines of code Right-click and choose the command Only selected text's comments will be removed! Examples JavaScript / TypeScript javascript // BEFORE // This is a single-line comment const apiUrl = "https://api.example.com"; // inline comment / Multi-line comment that spans multiple lines / const regex = /https?:///; // regex comment console.log("Hello // not a comment"); // AFTER const apiUrl = "https://api.example.com"; const regex = /https?:///; console.log("Hello // not a comment"); PHP / Laravel php Hello World
{{--
Footer section
multi-line comment
--}}
{{-- AFTER --}}
Hello World
CSS / SCSS
css
/ BEFORE /
body {
background: fff; / white background /
font-family: 'Arial', sans-serif; / main font /
/
Responsive design
for mobile devices
/
margin: 0 auto;
max-width: 1200px;
}
/ AFTER /
body {
background: fff;
font-family: 'Arial', sans-serif;
margin: 0 auto;
max-width: 1200px;
} What's Preserved?
The extension intelligently preserves these elements:
Strings: "This is // not a comment", 'Still / safe / here'
Template Literals: URL: https://site.com
Regular Expressions: /https?:\/\//, /\/\//g
Special Characters: All code structure remains intact
Supported Languages
Language File Extensions
JavaScript .js, .jsx, .mjs
TypeScript .ts, .tsx
PHP .php
Laravel Blade .blade.php
Python .py
Java .java
HTML .html, .htm
CSS/SCSS .css, .scss, .sass
C/C++ .c, .cpp, .h
C .cs
Ruby .rb
Go .go
Rust .rs
Swift .swift
Kotlin .kt
Dart .dart
And more...
Keyboard Shortcuts
Action Windows/Linux Mac
Remove All Comments Ctrl+Shift+R Cmd+Shift+R
Want to customize? Open Keyboard Shortcuts (Ctrl+K Ctrl+S) and search for "Clean Ur Code".
Requirements
VS Code version 1.85.0 or higher
Any operating system (Windows, Mac, Linux)
1.0.0 (Initial Release) 🎉
✨ Initial release
Single-line comment removal
Multi-line comment removal
String and URL preservation
Context menu integration
💖 Support
If you find this extension helpful, please:
⭐ Star it on GitHub
📢 Share it with your developer friends
🐦 Tweet about it
👨💻 Author
Muhammad Arbaz Khan
GitHub: https://github.com/arbazkhan123812
LinkedIn: https://www.linkedin.com/in/mrarbazkhan/
Youtube: ArbazyCode
🙏 Acknowledgments
VS Code Extension API team
All beta testers
Thank You, for using this extension!
Made with ❤️ for the developer community
|