[file] VS 2012: Scroll Solution Explorer to current file

VS2010 had the feature that viewing a file would automatically cause Solution Explorer to scroll to that file.

With VS2012, viewing different files from within the IDE no longer scrolls and select the file in Solution Explorer automatically.

Is it possible to get this feature back? Is there a setting somewhere? If so, how/where?

This question is related to file visual-studio-2012 solution-explorer

The answer is


It is possible in VSS by three ways.

  1. You can click on Active sync icon on Solution Explorer.

VSS Active sync with icon in solution Explorer

  1. By selecting Active sync checkbox in Tools (Tools > Options > Projects and Solutions > General). In that check the Track Active Item in Solution Explorer Checkbox. When you select a file in the main window, it will automatically navigate to active file in the Explorer.

VSS_Tools_Active_sync

  1. By using the Shortcut key (Ctrl + [ + S), you can able to navigate to active Item.

Note: Either 1 or 2 only works in a mean time.. So You have to use either 1st or 2nd.


If you need one-off sync with the solution pane, then there is new command "Sync with Active Document" (default shortcut: Ctrl+[, S). Explained here: Visual Studio 2012 New Features: Solution Explorer


If you have ReSharper installed clicking Shift+Alt+L will move focus to the current file in Solution Explorer.

Active Item Tracking will also need to be enabled as described in the accepted answer

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


If you don't have ReSharper installed and still want to use the shortcut Shift+Alt+L to move focus to the current file in Solution Explorer in Visual Studio 2013 then please follow these steps:

  1. Go to Tools->Options and search for "Keyboard" in the Search Options textbox:

enter image description here

  1. In the Show commands containing box type "solutionexplorer" and then in the list below look for the SyncWithActiveDocument command: enter image description here

  2. Click in textbox under "Press short keys" label and press: Shift+Alt+L and click the Assign button and you are done: enter image description here

To verify open any file in Visual Studio and press the shortcut keys Shift+Alt+L and you'll see the file in the solution explorer. Enjoy!


I've found the Sync with Active Document button in the solution explorer to be the the most effective (this may be a vs2013 feature!)

enter image description here


On Visual Studio 2017, the shortcut is: Ctrl+´,S.

enter image description here


There are many ways to do this:

Go to current File once:

  • Visual Studio 2013

    VS 13 has it's own shortcut to do this: Ctrl+\, S (Press Ctrl + \, Release both keys, Press the S key)

    You can edit this default shortcut, if you are searching for SolutionExplorer.SyncWithActiveDocument in your Keyboard Settings (Tools->Options->Enviornment->Keyboard)

    In addition there is also a new icon in the Solution Explorer, more about this here.

    Sync with Active Document Button in VS2013 - Solution Explorer

  • Visual Studio 2012

    If you use VS 2012, there is a great plugin to add this new functionality from VS2013 to VS2012: . The default shortcut is strg + alt + ü. I think this one is the best, as navigating to the solution explorer is mapped to strg + ü.

  • Resharper

    If you use Resharper try Shift+Alt+L

    This is a nice mapping as you can use Strg+Alt+L for navigating to the solution explorer

Track current file all the time:

  • Visual Studio >= 2012:

    If you like to track your current file in the solution explorer all the time, you can use the solution from the accepted answer (Tools->Options->Projects and Solutions->Track Active Item in Solution Explorer), but I think this can get very annoying in large projects.