Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>line-wrap-htmlNew to Visual Studio Code? Get it now.
line-wrap-html

line-wrap-html

Luca Park

|
5 installs
| (0) | Free
Wrap touched lines with an HTML tag
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

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

  1. Select text across one or more HTML lines.
  2. Run Wrap Touched Lines With HTML Tag.
  3. The touched lines will be wrapped with a tag like div.
  4. 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>
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft