Auto select file in Solution Explorer from its open tab in Visual Studio 2010
Normally, many files in Visual Studio 2010 are opened in many tabs, while massively working on a project. Many times I find myself right-clicking on tab-title and searching for "Show/Select/Scroll-to this file in Solution Explorer", and I can't find it.
Is there a way to finding, automatically-by-demand, an opened file in Solution Explorer?
Another option is to bind 'View.TrackActivityInSolutionExplorer' to a keyboard short-cut, which is the same as 'Tools-->Options-->Projects and Solutions-->Track Active Item in Solution Explorer'
If you activate the short-cut twice the file is selected in the solution explorer, and the tracking is disabled again.
Visual Studio 2013+
There is now a feature built in to the VS2013 solution explorer called Sync with Active Document. The icon is two arrows in the solution explorer, and has the hotkey Ctrl + [, S to show the current document in the solution explorer. Does not enable the automatic setting mentioned above, and only happens once.
我不知道您是否可以按需执行此操作,但是您可以启用“在解决方案资源管理器中跟踪活动项目”选项(工具 - >选项 - >项目和解决方案 - >常规),该选项将始终选择活动选项卡项目在解决方案浏览器中。
If you're using the ReSharper plugin, you can do that using the Shift + Alt + L shortcut or navigate via menu as shown.
链接地址: http://www.djcxy.com/p/81698.html