Reputation: 171
I use Visual Studio for Mac and the curly brackets in my code are not indented automatically and they are aligned to the left.
Have somebody encountered this issue? How can I fix it?
.
Upvotes: 8
Views: 3104
Reputation: 1
To resolved this, I went to: Preferences-> Source Code-> Code Formatting-> C# Source Code
Under Policy, Select "Microsoft Visual Studio" Click Ok Restart Visual Studio.
Then you should be set!
Upvotes: -2
Reputation: 188
Preferences
Source Code
Source Code
; Select Code Formatting
C# Source Code
C# Format
tab in the new page then press the Edit
buttonIndention
to New Lines
in the Category
sectionNow, you can set your custom format settings as you want...
Upvotes: 16
Reputation: 4156
To Format Existing Code in Visual Studio for Mac
Highlight the code and in the edit menu select Format --> Format Selection.
To Adjust the Auto Formatting Settings in Visual Studio for Mac
In the Visual Studio Menu Select Preferences --> Source Code. --> Code Formatting --> C# Formatting. There is an option to select a few Policy one of them is Visual Studio
Upvotes: 3