views:

86

answers:

3

Is there a Visual Studio shortcut to highlight the current file in Solution Explorer?

+9  A: 

You can enable this option to always highlight the current (active) file:

Tools -> Options -> Projects and Solutions -> Track Active Item in Solution Explorer

To my knowledge there's no shortcut to go to it directly, however you could bind your own key combination by going to Tools -> Options -> Environment -> Keyboard, search for View.TrackActivityInSolutionExplorer then assign a shortcut to it. The downside to this approach is that it toggles the option on and off rather than perform a one time highlight of the active file.

Alternately, you can use a macro to accomplish what you originally asked about. This blog post provides such a macro: Visual Studio Macro: Locate Item in Solution Explorer on Demand.

Ahmad Mageed
awesome! thx. I assigned it to a shortcut key, that works well enough.
BrokeMyLegBiking
+2  A: 

the option for auto-sync is:

Tools|Options|Projects and Solutions|General|Track Active Item in Solution Explorer

this will give an outline of the class or file you are currently working on

PaulStack
+3  A: 

Tools – Options – Projects and Solutions – Track Active Item in Solution Explorer

Johnny Saxon