Search code examples
visual-studiocode-formatting

Code Formatting in Visual Studio


Is there some combination of keys or a menu option that I can use to automatically format my code in Visual Studio?


Solution

  • It sounds like you want to format the entire document in Visual Studio (this feature is some times referred to as pretty printing). If so then you can use the menu command. Edit -> Advanced -> Format Document. This is typically bound to the key stroke CTRL+KCTRL+D