The Feature to automatically reformat the Code in Visual Studio is quite nice. But I always forget the combination for it so here they are:
Reformat only the selected Code (keeps Breakpoints):
- Select the Code you want to reformat
- Press Ctrl-K
- Press Ctrl-F
Reformat the Code in the active File (keeps Breakpoints):
- Press Ctrl-K
- Press Ctrl-D
Reformat the Code in the active File (looses Breakpoints):
- Press Ctrl-A (Select All)
- Press Ctrl-X (Cut)
- Press Ctrl-V (Paste)