Communities for your favorite technologies. Explore all Collectives
Stack Overflow for Teams is now called Stack Internal. Bring the best of human thought and AI automation together at your work.
Bring the best of human thought and AI automation together at your work. Learn more
Find centralized, trusted content and collaborate around the technologies you use most.
Stack Internal
Knowledge at work
Bring the best of human thought and AI automation together at your work.
I would like Visual Studio to format my source code every time I save. I can do this in Eclipse. Can it be done in Visual Studio 2005?
It is possible with the Powercommands plugin for VS.NET, but, I fear that this plugin is only available for VS.NET 2008.
Add a comment
You can do it with a macro.
Here is the code for the macro, which can be mapped to a button in a toolbar and/or a keyboard shortcut
Public Module SaveAndFormat Sub SaveAndFormat() DTE.ExecuteCommand("Edit.FormatDocument") DTE.ActiveDocument.Save() End Sub End Module
Required, but never shown
By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.
Start asking to get answers
Find the answer to your question by asking.
Explore related questions
See similar questions with these tags.