Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Highlight the closing tag of the currently selected opening tag

One thing I'm missing from SublimeText, is it's ability to highlight the currently selected elements closing tag.

For eg,

highlight tag

Because my cursor is in a div, it highlights every occurrence of the word div when it would be so much more useful, to rather highlight the closing div only.

Is this possible?

like image 920
Mark Avatar asked Apr 24 '17 09:04

Mark


1 Answers

Had the same problem as OP, and finally found the solution!!

As it turns out, the same issue was only occurring to me when editing .PHP files.

Placing my cursor on any tag will trigger auto highlighting for any occurring tags that matched. See image below:

enter image description here

To turn this behaviour off, add this into your settings.json in VS code:

"editor.occurrencesHighlight": false,

To target specific languages, add this instead:

 "[php]": {
    "editor.occurrencesHighlight": true,
 }

Result:

enter image description here

Hope this helps :)

like image 74
dian jin Avatar answered Oct 26 '22 17:10

dian jin