Visual Studio 2013: Format the Current Document or Selection

  NOTE: This is an older feature. I’ve updated the information for VS2013.     Format Document This one is a little known feature you can take advantage of when working with your code. Assuming you have some unformatted code:       You can format the entire document by going to Edit -> Advanced…

15

Format HTML on Paste

Menu:  Tools -> Options -> Text Editor -> HTML -> MiscellaneousVersions:  2008,2010Published:  12/22/2010Code:  vstipEdit0092   Work with SharePoint?  Then make sure to check out the new SharePoint Developer Team Blog!   If you find yourself pasting unformatted HTML a lot then this one is for you!  Just go to Tools -> Options -> Text Editor ->…

0

Format the Current Document or Selection (HTML Designer)

Keyboard:  CTRL + K, CTRL + D (document); CTRL + K, CTRL + F (selection)Menu:  Edit -> Advanced -> Format Document; Edit -> Advanced -> Format SelectionCommand:  Edit.FormatDocument; Edit.FormatSelectionVersions:  2008,2010Published:  12/18/2010Code:  vstipEdit0089   In vstipEdit0057 (http://blogs.msdn.com/b/zainnab/archive/2010/05/19/format-the-current-document-or-selection-vstipedit0057.aspx) I showed you how to format code.  I thought it would be a good idea to look at the…

0

Format the Current Document or Selection

Keyboard:  CTRL + K, CTRL + D (document); CTRL + K, CTRL + F (selection)Menu:  Edit -> Advanced -> Format Document; Edit -> Advanced -> Format SelectionCommand:  Edit.FormatDocument; Edit.FormatSelectionVersions:  2008,2010Published:  5/19/2010Code:  vstipEdit0057   So, let’s say you have some funky code that isn’t formatted properly:   And you want it to look good.  Just select…

8