A simple extension to do the frustrating task of wrapping tags. Easily wrap code in your chosen HTML tags for enhanced markup.
To use, select one or many chunks of code and press "Alt + W" ("Option + W" for Mac).
Download for Visual Studio Code
No Wrap It: 4-5 steps.
Wrap IT: 2 simple steps.
- Select one or more blocks of text or strings of text.
- Press Alt + W or Option + W for Mac.
- Quick Wrap: For quickly running your favorite Wrap It command.
- Default Wrap: Wrap the selection(s) in the default tag.
- Selected Wrap: Input the tag you want the Selection(s) in.
- Fragment Wrap: Especially for us React Developers, Wrap the Selection(s) in a React Fragment(
<></>
).
wrap-it.quickWrap
: Alt + W or Option + W
You can change the default behavior of wrap-it with the following settings.
To open VS Code settings, click the "gear" icon > then "Settings" or Press Ctrl/Cmd+,
wrap-it.defaultCommand
- The default Command that will execute for the quickWrap keybinding.- defaultWrap
- selectedWrap
- fragmentWrap
wrap-it.defaultTag
- The default HTML tag to insert when using WrapIt.wrap-it.autoSelectTag
- Automatically select the opening tag after wrapping.(only applies to defaultWrap)
{
"wrap-it.defaultTag": "span",
"wrap-it.defaultCommand": "defaultWrap",
"wrap-it.autoSelectTag": true
}
Please create an issue on GitHub if you experience a bug. I also welcome pull requests.
Read Contribution Guide
Please report issues related to this extension on the repository page.
Kushagra Agnihotri
Please Visit Here for additional information