Is there a way to select a few lines of code in Visual Studio Code and, somehow, automatically wrap them with a div (or other tag)?
Thank you for any help
Mitsos
Is there a way to select a few lines of code in Visual Studio Code and, somehow, automatically wrap them with a div (or other tag)?
Thank you for any help
Mitsos
You can use Emmet: Wrap Individual lines with abbreviation
.
If you have a fixed tag you want to use to wrap you can add a keyboard shortcut in keybindings.json
{
"key": "shift+alt+d",
"when": "editorTextFocus && editorLangId == html",
"command": "editor.emmet.action.wrapIndividualLinesWithAbbreviation",
"args": { "abbreviation": "div" }
}