views:

5059

answers:

12
+2  A: 

DevExpress CodeRush does this when you press TAB when the cursor is in an identifier, you can then tab through all the highlighted instances. There's also a DXCore plugin (the foundation upon which CodeRush/Refactor Pro are built) that does current-line highlighting.

Duncan Smart
+1  A: 

The "error bar" functionality is provided in JetBrains ReSharper. I'm not sure if it does highlighting of references to the currently selected identifier.

Default hotkey is Alt+Shift+F11 for Visual Studio keyboard scheme
Cheburek
+5  A: 

In a different question on SO (link), someone mentioned the VS 2005 / VS 2008 add-in "RockScroll". It seems to provide the "error bar" feature I was inquiring about in my question above.

RockScroll

EDIT: RockScroll also does the identical token highlighting that I was looking for! Great!

dsteinweg
Try MetalScroll at http://code.google.com/p/metalscroll/ - it's an enhanced RockScroll.
Ricardo Nolde
+2  A: 
Steve Gury
A: 

Rockscroll rocks !!!! Thanks !!!

+2  A: 

I tried RockScroll and it doesn't even know anything about code folding!
Not my favorite...

rstevens
Should be a comment
Casebash
+1  A: 

About RockScroll: It doesn't highlight the identifiers. It only highlights the same string in the source code! If there are similar identifier declared : ex. _test and test, and test is highlighted it will highlight the string "test" in variable _test too! And it will also highlight the same string in a method called "sometesting()". So it isn't exactly like eclipse and doesn't work for me.

Micha
+2  A: 

The highlight functionality is conveniently implemented in VisualAssist. In my opinion, they are both must-have.

1) Highlight identifier under editing caret: Options -> Advanced -> Refactoring -> Automatically highlight references to symbol under cursor

2) Highlight search result - in all windows. Works for RegExps! Options -> Advanced -> Display -> Highlight find results

+1  A: 

Old question but... Visual Studio 2010 has this feature built-in, at last.

romkyns
Not for C++ programs.
DerMike
A: 

That's funny. So Microsoft finally caught up with what the open-source community had (for free) for years. This feature is still not available in Express versions of Visual Studio however.

kneufeld
+2  A: 

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.

Alex_P
A: 

i dont get it, the feature is NOT in Visual Studio 2010, or am i missing something.

Chris
VS2010 supports identical token highlighting for C#. It is not supported in other languages, and it does not do the "display all items in a modified scrollbar" thing.
sean e