Auto Rename Tag & Close Tag Sync

Auto Rename Tag & Close Tag Sync for HTML, JSX, Vue (Matching Tag Highlight), a VS Code extension by Zovo

Rename a tag and its matching tag changes as you type. Type > and the closing tag is there. One undo brings everything back. Works in HTML, JSX and TSX, Vue, Svelte, Astro, PHP, Blade, Twig, Jinja, ERB, Handlebars, XML, SVG and Markdown. Free, no sign-in, works offline.

Install in VS CodeOpen the Marketplace page

Free, MIT license. Needs VS Code 1.90.0 or newer. Extension ID zovo.zovo-auto-rename-tag, version 0.2.3.

Renaming section to section-card in a Vue file: the closing tag changes with it and both tags have a box

Questions people ask

Is Auto Rename Tag & Close Tag Sync free?

Yes. Auto Rename Tag & Close Tag Sync is free and MIT licensed.

How do I install Auto Rename Tag & Close Tag Sync?

Click "Install in VS Code" above, or search for zovo.zovo-auto-rename-tag in the Extensions view.

Why this one

The most installed tag rename, tag close and matching tag extensions have public reviews about the same few problems (links below; quotes are from those pages). This one is a different extension, built around them:

Problem people reportWhat this extension does
"This will destroy your undo stack", "can corrupt your UNDO stack" (reviews, issue 55)Rename uses VS Code's own linked editing, so your edit and the matching tag are one undo step. The closing tag joins the same undo step as the > you typed (HTML, Vue, Svelte, PHP, Blade, Twig, XML, Markdown and the rest).
<br> turned into <br></br>, Observable<boolean> turned into Observable<boolean></boolean> (rename reviews, close reviews)Void tags (br, img, input, meta, hr and the rest) never pair and are never closed. .ts files are left alone, and in .tsx only real JSX is a tag: comparisons like a < b && c > d, generics like useState<string>() or <T,> are not.
"Doesn't work in JSX", "not working well in mixed PHP and Twig", "doesn't work in a newly created document" (close reviews, rename reviews)One scanner for HTML, JSX/TSX, Vue, Svelte, Astro, PHP, Blade, Twig/Jinja/Nunjucks/Liquid, ERB/EJS, Handlebars, XML, SVG and Markdown. It skips comments, strings, <script> and <style> bodies, {{ }}, {% %}, <?php ?> and <% %> blocks. New unsaved files work as soon as they have a language.
"You won't see what is auto renamed" (reviews)The matching tag gets a box in your theme's bracket colors whenever the cursor is on a tag.
"The lag between typing </ and the tag being closed is too big", "VSCode hangs" (reviews)Closing runs right in the typing event: about 6 ms on a 10,000-line, 700 KB file. Files over 1 MB or 50,000 lines get no live rename or close, and the status bar says so, so typing never waits.
Pop-ups and course adverts (reviews)No ads, no tips, no notifications. The only question it ever asks is for a rating, after you have used it in two sessions, and you can turn that off.

Features

Typing <em> at the end of a line in a Vue file: </em> appears after the cursor and both tags have a box

Works with VS Code and your language extensions

Settings

SettingDefaultWhat it does
zovoTags.renameOnTypetrueRename the matching tag as you type
zovoTags.closeOnTypetrueClose tags on > and </ where nothing else does
zovoTags.highlightMatchingTagtrueBox around the matching tag
zovoTags.disabledLanguages[]Language ids where the extension does nothing, for example ["markdown"]
zovoTags.additionalHtmlLanguages[]More language ids to treat as HTML
zovoTags.maxFileSizeKB / zovoTags.maxFileLines1024 / 50000Above these, live rename, close and highlight are off for that file
zovoTags.showStatusBartrueThe Tags item in the status bar
zovoTags.askForRatingtrueOne rating question after real use in two sessions

Privacy

No network requests, no telemetry, no account. The extension reads only the open file, in memory. Links in the tooltip open a web page only when you click them.

Known limits

License

MIT

Guides

Install Auto Rename Tag & Close Tag Sync

Click the button to open VS Code and install it, or press Ctrl+P (Cmd+P on macOS) in VS Code and run ext install zovo.zovo-auto-rename-tag.

Free, MIT license. Needs VS Code 1.90.0 or newer. Extension ID zovo.zovo-auto-rename-tag, version 0.2.3.

Source code and issues are on GitHub.

All our VS Code extensions

Support this work

If this extension saves you time, you can support the work on GitHub Sponsors. Monthly tiers start at $5, and one-time tiers start at $15. Sponsorship is optional, and the tool works the same without it.

Need your format supported?

Open a format request with a sample file, and I reply there whether it can be done. For USD 299 once, through this GitHub Sponsors tier, I add your file format or a missing feature to this extension, with tests, within 7 days.