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
 
         
                                         
                                         
                                         
                                        ![Interactive visualization of a graph in python [closed]](https://www.devze.com/res/2023/04-10/09/92d32fe8c0d22fb96bd6f6e8b7d1f457.gif) 
                                         
                                         
                                         
                                         加载中,请稍侯......
 加载中,请稍侯......
      
精彩评论