Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to highlight javascript variables in Visual Studio 2012

When using Visual Studio I find the 'Highlighted Reference' feature really useful: when you click on a variable the IDE will highlight all uses of that variable, making it easy to see where it is used in your code.

One can set the Highlighted Reference colour (Tools > Options > Env > Fonts and Colors > Text Editor > Highlighted Reference) and this works fine for my C# code however it doesn't change the highlighted colour of my javascript code. Currently the javascript variables are highlighted in a very faint grey, which is very hard to see. Does anyone know how I can change this colour for Javascript variable highlighting?

like image 614
ninjaPixel Avatar asked Nov 25 '13 11:11

ninjaPixel


People also ask

How do you highlight variables?

Highlighting a variable or subfunction usage is easy, just click on any variable or subfunction name in the editor, and after a brief pause, all the usages of that variable or subfunction will be highlighted in light blue.

How do I highlight a line in Visual Studio?

Highlight current line To specify the color to highlight the current line, go to the Visual Studio options (Tools | Options), open the Environment | Fonts and Colors page, and then select the desired color for the ReSharper Current Line Highlight item.


1 Answers

This does sound like a bug in VS2012. The following is a screenshot from VS2010, where the option you reference, correctly affects javascript files as well.

enter image description here

like image 125
pkExec Avatar answered Oct 11 '22 13:10

pkExec