Quantcast
Channel: Visual Studio and tools – The Wiert Corner – irregular stream of stuff
Viewing all articles
Browse latest Browse all 239

Select matching element/rename HTML tag in Visual Studio Code – Stack Overflow

$
0
0

I totally missed that in 2019, the F2 key was enabled to rename HTML tags, but it does: [Wayback/Archive.is] Select matching element/rename HTML tag in Visual Studio Code – Stack Overflow:

HTML rename tags
You can now use F2 to rename the opening/closing tag pairs in HTML.
F2 when the cursor is over one of the tags and you will get a little input box with the cursor to input the new tag name and the start/end tags will be replaced with whatever you type upon .
demo of HTML rename tags

[Wayback/Archive.is] Another answer indicates that even more recently, Linked Editing can do the same without even pressing F2. Too bad it is not enabled by default:

No need for extension, this is now cooked into VSCode.
"editor.linkedEditing": true

–jeroen


Viewing all articles
Browse latest Browse all 239

Trending Articles