Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>Single Line Comment And NestedNew to Visual Studio Code? Get it now.
Single Line Comment And Nested

Single Line Comment And Nested

SoulFriends

|
1 install
| (0) | Free
Multiline Text Single Line Comment And Support Nested Comment (for HTML, JSX, Vue, CSS, XML, XSL and Markdown)
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info


logo
Multiline Text Single Line Comment And Support Nested Comment (for HTML, JSX, Vue, CSS, XML, XSL and Markdown)

VS Code Marketplace Installs VS Code Marketplace Downloads VS Code Marketplace Installs VS Code Marketplace Installs

This extension enhances the comment functionality of VS Code for HTML, JSX, Vue, CSS, XML, XSL and Markdown files.

  • Call the "Add Comment" command on multiple lines and each line will get its own block comment.
  • If you add a comment to a line which already has a comment, the opening and closing block will be replaced.
  • The "Toggle Comment" command checks if all selected lines are comments and then adds or removes block comments.
  • For all other file types the corresponding vscode built-in comment commands are invoked.

Demo jsx-nested

Configuration

Keybindings

the following keybindings: Starting with Enhanced Comments

Shortcuts

Indentation Mode

There are three different indentation modes:

  1. global(default,this can prevent the appearance of prettier eslint problem): The comment starts for each line at the position where the first non-whitespace charakter of the first marked line is. Example: global
  2. individual: The comment starts at the position where the first non-whitespace charakter is. This is computed for each line individually. Example: individual
  3. add indent of first line: The comment starts for each line at the position where the first non-whitespace charakter of the first marked line is. Additionally the indent of the first line is added to every line. Example: add indent of first line

You can specifiy it in the settings: Settings

Known Issues

  • Only use the same comment style in the same file. so embedded CSS and JavaScript Code in HTML is not supported. But I don't think this is a big problem. You can use this plugin's features wherever needed. In other places, you can use the vscode built-in comment commands.
  • The global indentation mode does not work properly, if you use whitespaces and tabs for indentation at the same time.
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft