What is it
Wraps your selection in HTML tags. Can wrap an inline selection or a selection of multiple lines.
To use, select a chunk of code and press "Alt + W" ("Option + W" for Mac).
How to Use It
Select a block of text or a string of text. Press Alt + W or Option + W for Mac. Type the tag name you want, and it will populate the beginning and end tag automatically.
This extension works best in files that either use tabs or spaces for indentation. It may not work as well with mixed tabs/spaces.
I welcome pull requests. Please report an issue on GitHub if you have trouble.
- Spaces and tabs for indentation are now both supported.
- Special thanks to @gdziadkiewicz for his PR #4, which also introduced tests for development!
Future features being explored
- #5 Once a user hits spacebar, then the second multi-cursor is lost so the user can write attributes like classes or styles. (Idea courtesy of Ruben Rios)
- Should we support
getSelections()allowing multiple selections to be wrapped?