First, there is an "Emmet: Remove Tag" function, but it will only remove the wrapper for a specific tag. It does not delete the entire element including its children.
I'm looking for the same operation to be able to remove child elements at the same time. This can save a few seconds for people who frequently edit HTML.
In the example below, I want to remove the entire
<!DOCTYPE html> <html> <head> <title>My Dummy HTML Snippet</title> </head> <body> <h1>Hello, World!</h1> <p>This is a dummy HTML snippet with nested tags.</p> <div> <h2>A Nested Section</h2> <p>This is a paragraph inside a div element.</p> <ul> <li>List item 1</li> <li>List item 2</li> <li>List item 3</li> </ul> </div> <p>Back to the main content.</p> </body> </html>
Maybe this extension expand-region can solve the problem.