
A VS Code extension that removes all AI comments from your code files with a single keybind. Perfect for cleaning up code before sharing, documentation, or when you need a comment-free version of your files.
✨ Features
- 🚀 One-key solution: Press
Ctrl+Alt+T
to remove all comments from the current file
- 🌍 Multi-language support: Works with Python, JavaScript, TypeScript, Java, C/C++, Go, Rust, HTML, CSS, Shell scripts, YAML, and more
- 🧠 Smart comment detection: Preserves strings and handles different comment styles correctly
- 💰 Preserve important comments: Comments marked with
$
(like # $ TODO
or // $ Important
) are kept
- 🔒 Safe operation: Only removes actual comments, not code within strings
- 📝 Context menu integration: Right-click in editor to access the command
- ⚡ Lightning fast: Processes files instantly
🎯 Supported Languages
Language |
Comment Styles |
Example |
Python |
# |
# This comment will be removed |
JavaScript/TypeScript |
// , /* */ |
// Single line or /* Multi-line */ |
Java/C/C++/C# |
// , /* */ |
// Single line or /* Multi-line */ |
Go/Rust |
// , /* */ |
// Single line or /* Multi-line */ |
HTML |
<!-- --> |
<!-- HTML comment --> |
CSS/SCSS/Less |
/* */ |
/* CSS comment */ |
Shell/Bash |
# |
# Shell comment |
YAML |
# |
# YAML comment |
JSON |
// , /* */ |
// Non-standard JSON comment |
Use the $
marker to preserve important comments:
# This comment will be removed
# $ This comment will be preserved
import os # This inline comment will be removed
import sys # $ This inline comment will be preserved
def hello_world():
# Regular comment - removed
# $ TODO: Add error handling
print("Hello, World!") # Regular inline comment - removed
print("Goodbye!") # $ Important: Don't forget this message
return True
# End of file comment - removed
# $ Remember to update version number
After running Tidy Up:
# $ This comment will be preserved
import os
import sys # $ This inline comment will be preserved
def hello_world():
# $ TODO: Add error handling
print("Hello, World!")
print("Goodbye!") # $ Important: Don't forget this message
return True
# $ Remember to update version number
🚀 Installation
From VS Code Marketplace
- Open VS Code
- Go to Extensions (
Ctrl+Shift+X
)
- Search for "Tidy Up - Comment Cleaner"
- Click Install
From VSIX Package
- Download the
.vsix
file from the releases page
- Open VS Code
- Go to Extensions (
Ctrl+Shift+X
)
- Click the "..." menu and select "Install from VSIX..."
- Select the downloaded file
📖 Usage
Method 1: Keyboard Shortcut (Recommended)
- Open any code file
- Press
Ctrl+Alt+T
- All comments are removed instantly!
Method 2: Command Palette
- Press
Ctrl+Shift+P
- Type "Tidy Up - Remove Comments"
- Press Enter
- Right-click in the editor
- Select "Tidy Up - Remove Comments"
⚙️ Configuration
The extension works out of the box with no configuration needed. It automatically detects the file type and applies the appropriate comment removal logic.
🔧 Development
Building from Source
git clone https://github.com/SoumilB7/tidy-up.git
cd tidy-up
npm install
npm run compile
Running in Development Mode
npm run watch
# Then press F5 in VS Code to launch Extension Development Host
Packaging for Distribution
npm install -g @vscode/vsce
vsce package
🤝 Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature
)
- Commit your changes (
git commit -m 'Add some AmazingFeature'
)
- Push to the branch (
git push origin feature/AmazingFeature
)
- Open a Pull Request
🐛 Bug Reports & Feature Requests
If you find a bug or have a feature request, please open an issue.
📝 Changelog
See CHANGELOG.md for version history.
📄 License
This project is licensed under the MIT License - see the LICENSE file for details.
🙏 Acknowledgments
- Built with ❤️ for the VS Code community
- Inspired by the need for clean, comment-free code
- Thanks to all contributors and users
📊 Stats
- Version: 1.0.4
- Last Updated: Sept - 2025
- VS Code Version: ^1.74.0
- Languages Supported: 10+
Made with ❤️ by Soumil'
⭐ Star this repository | 🐛 Report an issue | 💡 Request a feature