When using the XSLT/XPATH for Visual Studio Code plugin with VSCode, I have to manually type every closing tag for any XML element. E.g. if I type
<xsl:t
I correctly get an offer of a matching template resulting in
<xsl:template match="" mode="#default">
</xsl:template>
But when I enter
<any-xml-element>
</
I expect to get am offer of any-xml-element>
that I can choose with the TAB or RETURN key.
But that is not the case in my installations on Win10 and Win11.
Currently I am typing the closing tag or cut'n-paste it from the opening one. That is annoying.
It may be a simple configuration or something else that I am missing. The author of that plugin has no solution for me. It works on his computer. Do you have an idea?
Or do you know another free or cheap editor supporting XSLT 3?
A possible cause (and solution) for failure of auto tag close when typing '</
' in this extensions:
The XSLT/XPath extension leverages the 'Format On Type' feature of VS Code to perform both the formatting and the auto tag close edit at the same time.
Auto tag close therefore only works with the 'Format On Type' setting enabled ("editor.formatOnType": true
) . This is now documented in the Editing XSLT section of the docs.
A recent update to this extension minimises risk of the problem occurring by including this setting in the default configuration for XSLT and XML. This setting will be highlighted as Modified Elsewhere in the User Settings panel, but it can still be overridden.