首先,有一個(gè)"Emmet: Remove Tag"功能,但它只會(huì)刪除特定標(biāo)籤的包裝。它不會(huì)刪除包括其中的子元素在內(nèi)的整個(gè)元素。
我正在尋找能夠同時(shí)刪除子元素的相同操作。這對(duì)於經(jīng)常編輯HTML的人來(lái)說(shuō)可以節(jié)省幾秒鐘的時(shí)間。
在下面的範(fàn)例中,我想透過(guò)使用Emmet或類(lèi)似的命令來(lái)刪除整個(gè)
<!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>