VisualStudio curly brackets won't indent macos

2019-07-27 02:34发布

I downloaded and installed visual studio on my mac to work with xamarin and every time I try to use the text editor I just can't. This is how the layout looks like:

Visual studio text editor

And this is how it looks like when I use monoDevelop instead:

MonoDevelop text editor

Now, I want to use xamarin and I can't seem to find a solution to the brackets acting they way they do. If anyone can help I would much appriciate it. It's been bothering me for a while now.

1条回答
成全新的幸福
2楼-- · 2019-07-27 02:59

It seems like the tabs for C# were not set up correctly within your Visual Studio.

Please try the following:

a) On the 'Tools' menu, click 'Options'.
b) Click 'Text Editor'.
c) Open C# and click 'Tabs'.
d) Make sure that 'Smart' Indentation is selected.

For further information please check out: https://msdn.microsoft.com/en-us/library/999b219z(v=vs.71).aspx

Note
You can automatically let Visual Studio indent your code:

  • Autoformat selection: Ctrl+K, Ctrl+F
  • Autoformat document: Ctrl+K, Ctrl+D
查看更多
登录 后发表回答