简体   繁体   中英

How to sync a code window and solution explorer in Visual Studio?

如果在 Visual Studio 中打开了一个代码窗口,我如何快速让解决方案导航器或解决方案资源管理器显示当前文件已打开?

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

Resharper? Alt + Shift + L ?

:D

With larger solutions, I find the Track Active Item option annoying as it often rearranges the view in Solution Explorer as I move from one code window to the next.

My preference is to use an extension called Code Maid , which allows you to find the item in the Solution Explorer via a context menu popup or keyboard shortcut. Has other features that you may find useful as well.

http://visualstudiogallery.msdn.microsoft.com/ef4ac3e9-d056-4383-8ca2-11721bd879b4 Here is a plugin which does that. It is also provided with on/off button which makes it comfortable to use.

There is also native shortcut in VS - CTRL + [, CTRL + S by default. See keyboard shortcut to command SolutionExplorer.SyncWithActiveDocument

No plugins needed since at least VS 2017.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM