Line Wrap HTML
Wrap all touched lines with an HTML tag in VS Code.
Features
- Wraps all lines touched by the current selection
- Expands selection to full lines before wrapping
- Inserts the wrapper as a snippet
- Lets you edit the created tag name immediately
Usage
- Select text across one or more HTML lines.
- Run
Wrap Touched Lines With HTML Tag.
- The touched lines will be wrapped with a tag like
div.
- Edit the tag name directly after insertion.
Example
Before:
<!-- | is block-->
<div>|a</div>
<div>b|</div>
<div>c</div>
If the selection touches the first two lines, the result becomes:
<div>
<div>a</div>
<div>b</div>
</div>
<div>c</div>
| |