Is there a quick way to delete an HTML tag pair in vscode?

user2477 picture user2477 · Mar 17, 2018 · Viewed 10.8k times · Source

For example, before:

<div>
    <div>Titles</div>
    <div>Description</div>
</div>

After:

    <div>Titles</div>
    <div>Description</div>

Answer

Matt Bierner picture Matt Bierner · Mar 17, 2018

Use the Emmet: Remove Tag command:

enter image description here

Setup a keybinding for this with editor.emmet.action.removeTag:

{
    "key": "ctrl+shift+k",
    "command": "editor.emmet.action.removeTag"
}