Steps
1. Select the text portion to format OR (Ctrl + a)
2. Hold Ctrl and hit k followed by f (Ctrl + k + f)
To autoformat the code written in html and xml use the following tip
Steps
1. Select the text portion to format OR (Ctrl + a)
2. Hit Ctrl + k followed by Ctrl + d
Don't need to select all before CTRL-K, CTRL-D. Cheers!
ReplyDeleteIf you are using VS2010/2012 you can give a try to free VS extension:
ReplyDelete[AStyle][1]
[1]: http://visualstudiogallery.msdn.microsoft.com/2f3f04cd-2866-4e47-a671-d1cc9cc3fb02
Another extension to automatically format code on any edit is Continuous Formatting:
ReplyDeletehttps://visualstudiogallery.msdn.microsoft.com/08afc8d1-4b74-44df-b012-f225ee9e9220