HTML rename start and ending tag

When using lang-html, is there a way to enable renaming both the start and end tag?

E.g. If you have <div>Hello</div> , can you rename to <h1>Hello</h1> by only selecting one of the tags and typing h1?

This used to be possible in CodeMirror 5 but matchBrackets functionality in CodeMirror 6 and matchClosingTags in lang-html don’t seem to work in the same way. Not sure the official name for that feature, so maybe my searches have just been wrong.

It is possible to implement something like this using the parse tree, but indeed, lang-html doesn’t provide it as a command or similar.

1 Like