CommentClear — is a handy tool for removing comments from your code in the Visual Studio Code editor. The extension supports comment removal for several programming languages, making it an indispensable tool for developers.
comment-clear supports comment removal in the following programming languages:
| Language | File Extension | Comment Syntax |
|---|---|---|
| JavaScript | .js |
// Single line comment /* Multi-line comment */ |
| TypeScript | .ts |
// Single line comment /* Multi-line comment */ |
| Python | .py |
# Single line comment ''' Multi-line comment ''' """ Multi-line comment """ |
| HTML | .html |
<!-- Single line comment --> <!-- Multi-line comment <br> continues here --> |
| CSS | .css |
/* Single line comment */ /* Multi-line comment <br> continues here */ |
| C | .c |
// Single line comment /* Multi-line comment */ |
| C++ | .cpp |
// Single line comment /* Multi-line comment */ |
| C# | .cs |
// Single line comment /* Multi-line comment */ |
| Java | .java |
// Single line comment /* Multi-line comment */ |
- Visual Studio Code Support: Compatible with Visual Studio Code version 1.94.0 and higher
- Cross-platform Support: This extension works on various operating systems, including Windows, macOS, and Linux.
Ось покращений опис функцій вашого розширення:
-
Removing One-Line Comments: Easily remove single-line comments that start with
//(JavaScript, TypeScript) or#(Python). This streamlines your code by eliminating unnecessary annotations. -
Removing Multi-Line Comments: Effortlessly remove multi-line comments that span several lines, such as
/* ... */(JavaScript, CSS) and""" ... """(Python). This helps in cleaning up the code without manually searching for and deleting each comment. -
Context Menu Integration: Access the comment removal functionality directly from the context menu in the editor. This allows for a seamless user experience when cleaning up code comments.
-
Keyboard Shortcuts: Quickly invoke the comment deletion command using the keyboard shortcut Ctrl + Alt + D. This feature enhances productivity by providing a fast and convenient way to remove comments without navigating through menus.
- Select Code: Highlight the portion of code that contains comments you want to remove.
- Use Shortcut: Press
Ctrl + Alt + Dto remove comments from the selected code. - Context Menu: Alternatively, right-click on the selected code and choose Remove Comments from the context menu.
Sometimes regular expressions can be removed from the code.
