Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

VSCode: Change Background Color of Unselected Occurrences

When I select some content, VSCode automatically highlights other occurrences like this:

enter image description here

In the above example, the pass in line 2 is the selected one while others are automatically highlighted. This is a really nice feature, but the problem is, the background color of those unselected occurrences is too close to that of selections. How can I change the background color for those unselected occurrences?

like image 785
Leon Cruz Avatar asked Sep 16 '25 15:09

Leon Cruz


1 Answers

The settings which will change backgorud is editor.selectionHighlightBackground. For changing background of highlighted similar words you should go to settings.json (CTRL+SHIFT+P -> type settings.json) of your theme and enter above code inside workbench.colorCustomizations.

"workbench.colorCustomizations":{
        "editor.selectionBackground": "#013c53",
        "editor.selectionHighlightBackground": "#ff0000"
}
like image 190
shrzd Avatar answered Sep 19 '25 06:09

shrzd