Today fast and curious ;)
When using Visual Studio and working on a solution with many projects, folders and files it is easy to get lost. It will be very nice to know exactly where on the project structure in Solution Explorer you are when working on a code. And Visual Studio has this feature called “Track Active Item in Solution Explorer“.
Tools > Options > Projects and Solutions > General > Track Active Item in Solution Explorer
It expands folders structure and scrolls up/down to find currently opened file. It is very nice, but sometimes you don’t want to scroll. It can decrease your productivity if you have to go back and forth and this wasn’t your intention.
Better approach is to disable this feature and use the very nifty one called “Sync with Active Document“. There is a little icon on the Solution Explorer toolbar that lets you do exact the same thing but on demand. And it also has a shortcut: Ctrl + [ , S.
The one problem with this is that it opens folders and leave them open. So if you would like to keep it clean you will have to use another feature “Collapse All“. A small icon next to the previous one. Unfortunatelly it doesn’t have a shortcut out of the box.
I found a VisualStudio extension (Solution Explorer Collapse And Sync) that combines those two functions together. Just install it and you can now use the Ctrl + Alt + ; shortcut.
It collapses all folders except the one with the active file and selects this file.
So together with those 2 shortcuts you can manage your Solution Explorer the way you like it :)
Leave a Reply