Closed
Description
Most XML editors have a feature to wrap the current selection in an XML element, providing completion to suggest valid tags at that point in a file.
Within VS Code, the built-in 'Emmet: Wrap with Abbreviation' function provides part of this, but it is not XML-aware and does not give a list of the allowed tags in the current context. It would thus be brilliant if the XML extension could provide this.
There are at least two ways to implement this:
- Inline: TextMate allows the user to make a selection, then type Ctrl + < to insert open/close tags around it, balancing the element name as the user types. The VS Code XML plugin could use this approach to immediately provide a list of options identical to the current functionality when typing <.
- With a dialogue box: Similar to the existing Emmet function but with autocompletion. The Oxygen XML Editor, for example, provides such a dialogue with the shortcut Ctrl + E. The Scholarly XML extension for VS Code has an implementation of this, but it conflicts with this XML plugin.
Many thanks for your work on this project and considering this request!