Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

VScode isn't highlighting html close tags in PHP files

VSCode isn't highlighting HTML close tags after click on it in PHP files. In HTML file all is fine. Example:

HTML file, oneclick on div

HTML file, oneclick on div (highligh open and close tag)

HTML file, doubleclick on div (count all occurrences)

HTML file, doubleclick on div (count all occurrences)

And PHP file, it doesn't matter - oneclick or doubleclick - it always count all occurerences

And PHP file, it doesn't matter - oneclick or doubleclick - it always count all occurerences

I'm not sure, it's bug or feature but I would be really happy if I could find html close tags in my php file (like in html file). Especially in more complex projects.

like image 561
Pacjonek Avatar asked Oct 18 '22 02:10

Pacjonek


1 Answers

I'm having the same problem and it's very frustrating. As temporary solution I've installed the extension Auto Rename Tag and when I want to know which close tag belongs to an opening tag, I change div to diva and see which close tag changes to diva and then change it back to div.

EDIT:

Alternatively, you can also set editor.renderIndentGuides to true in your user settings:

{    
    //some other settings
    "editor.renderIndentGuides": true
}

This is how it looks like now:

Visual Studio Code

like image 185
UUioP Avatar answered Oct 21 '22 04:10

UUioP