Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

When I have an open code file in Visual Studio that I am editing I would like to keep that same file highlighted inside of the solution Explorer so that I know where I am at.

What I'd really like is to change the focus to a different code file and the solution explorer to move to the file that I am editing.

Further Explanation and example: I have a project with 2 files. Class1 and Class2. I open both files. The focus is on Class1. I click on the Class2 Tab, thereby changing the file that I am editing to Class2.
Desired Behavior The solution explorer will highlight Class2.

share|improve this question

2 Answers 2

up vote 35 down vote accepted

Tools - Options - Projects and Solutions - General - Track Active Item In Solution Explorer

I don't have full Visual Studio, only the Express Editions, where it seems to be checked by default for VB.NET and unchecked by default in C++.NET.

share|improve this answer
1  
It's not immediately clear that when you turn this option off in VS2012 (maybe 2010 as well), you get a 'Sync' button in the solution explorer. This prevents your solution view from jumping all over the place and expanding the source tree to each new file, which drives me nuts when I'm following references through a larger project. This is what osh's answer is all about, but I thought it was worth noting that the same option controls/hides the sync button in later versions. Now if I can just set up a keybinding... –  Patrick M Sep 10 '13 at 17:14

I prefer this solution. It allows me to work most of the time without syncying code with solution explorer. when I want to sync I just press the sync button on the solution explorer.

share|improve this answer
2  
Welcome to Super User! It would be nice to include the essential parts of the answer here, and provide the link only for future reference. –  slhck Mar 31 '12 at 12:44
    
Nice! Just what I was looking for- Did not want the old VS2008 style jumping all over the place - only when i need it. +1 (VS2012 has this built in ;) –  ppumkin Aug 30 '12 at 8:57

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.