Visual Studio New Line Formatting
I'm new to visual studio, so perhaps this is something easy... but I've had no luck finding how to solve this formatting issue.
I would like for VS to auto format this
int x =
5;
like this
int x = 5;
When I type this in and开发者_开发知识库 select 'Format Document' nothing changes.
It will also not remove unnecessary newlines such as
MyClass someClass =
new MyClass();
Any help for this would be great!
Visual studio can't fix that. You can do it with the Replace All dialog + regex if you are careful.
jgauffin is right. However you can format other items to speed up the process.
Tip for key combinations for general reformatting
Tip for using a macro to modify all files in your solution
精彩评论