I like to disable this option (especially when working with a large project), but it is useful in order to find a file in the tree from time to time. I found a way to do it here .
Hope I'm not too verbose, but here is the guide to creating this work that I wrote for my wiki:
- Go to Tools-> Macros-> Macro Explorer.
- In the macro explorer tree that appears, right-click MyMacros and then the new module ....
- Call the new SyncItem module (if you want).
- Right-click the new module, then select Modify.
- Paste this into the code window. (I do not know and do not care about whether import strings are needed, they are by default only there.)
the code:
Imports System Imports EnvDTE Imports EnvDTE80 Imports EnvDTE90 Imports System.Diagnostics Public Module SyncItem Sub SyncSolutionExplorer() DTE.ExecuteCommand("View.TrackActivityinSolutionExplorer") DTE.ExecuteCommand("View.TrackActivityinSolutionExplorer") End Sub End Module
A macro is most useful if you bind it to a keystroke. Here's how to do it:
- Go to Tools-> Options, then select "Environment-> Keyboard".
- Find the new macro in the list (start typing "syncitem" or similar in the search field).
- I choose Alt - Shift - T (which likes to call this dialog box Shift - Alt - T ) for, um, "Tree", I think? If you're a fan of
Edit.LineTranspose , whatever it is (I think it changes the current line as follows), then you might like to choose a different shortcut.
Owen Sep 05 '08 at 16:17 2008-09-05 16:17
source share