Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual Studio identical token highlighting

I coded a Mancala game in Java for a college class this past spring, and I used the Eclipse IDE to write it. One of the great (and fairly simple) visual aids in Eclipse is if you select a particular token, say a declared variable, then the IDE will automatically highlight all other references to that token on your screen. Notepad++, my preferred Notepad replacement, also does this.

Another neat and similar feature in Eclipse was the vertical "error bar" to the right of your code (not sure what to call it). It display little red boxes for all of the syntax errors in your document, yellow boxes for warnings like "variable declared but not used", and if you select a word, boxes appear in the bar for each occurrence of the word in the document.

A screenshot of these features in action: screenshot

After a half hour of searching, I've determined that Visual Studio cannot do this on its own, so my question is: does anyone know of any add-ins for 2005 or 2008 that can provide either one of the aforementioned features?

Being able to highlight the current line your cursor is on would be nice too. I believe the add-in ReSharper can do this, but I'd prefer to use a free add-in rather than purchase one.

like image 796
Darren Steinweg Avatar asked Aug 28 '08 14:08

Darren Steinweg


People also ask

How do I turn off highlighting in VS Code?

You can enable / disable semantic highlighting in the VS Code settings. Press F1 to open the command window, and then enter "Open Settings (UI)". Search "semantic" to find the Editor>Semantic Highlighting item . Set the value to true to enable semantic highlighting; otherwise set it to false .

How do I highlight in Visual Studio?

On windows hold down Ctrl + Shift and on mac Command + Shift, then press the key P.


2 Answers

There is a RockScroll alternative called MetalScroll which is essentially the same thing with a few tweaks and improvements.

Also there is a small and simple WordLight plug-in that only highlights the identical tokens.

Both are open source and support code folding which is nice.

Imho, the bar next to the scroll bar in Eclipse is a lot more elegant solution than the scroll bar replacement of RockScroll/MetalScroll. Unfortunately I couldn't find any VS plug-ins that do it the Eclipse way, so I just stick with WordLight.

like image 117
Alex_P Avatar answered Sep 27 '22 20:09

Alex_P


Check following addins Productivity Power Tools- Displays error in scrollbar and

Highlight selected word

like image 28
meetjaydeep Avatar answered Sep 27 '22 18:09

meetjaydeep