Skip to content
| Marketplace
Sign in
Visual Studio Code>Formatters>Collapse/Expand-Empty-TagNew to Visual Studio Code? Get it now.
Collapse/Expand-Empty-Tag

Collapse/Expand-Empty-Tag

Wong Jia Hau

|
5,618 installs
| (0) | Free
Collapse or expand empty XML/HTML tag.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Collapse/Expand Empty Tag

This extension is used for collapsing or expanding empty HTML/XML tag (inspired by Jetbrain Resharper).

<example></example>
      |   ^
      |   |
      |   |
      V   |
    <example/>

Features

Collapsing empty tag

extensionexample

Expanding tag

expand

Requirements

  1. Visual Studio Code

Extension Settings

Currently there are no settings available for this extension.

Known Issues

  1. Cannot expand an collapsed tag that is on a few lines. For example, the following tag cannot be expanded unless joined into a single line. (Pull request are welcome!)
<example 
  att="hello"
  />

Release Notes

  • Added collapse/expanding empty tag function.

1.0.0

Initial release of Collapse/Expand Empty Tag

Enjoy!

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft