VisualStudio大括号不会缩进macOS [英] VisualStudio curly brackets won't indent macos

查看:184
本文介绍了VisualStudio大括号不会缩进macOS的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Mac上下载并安装了Visual Studio,以便与xamarin一起使用,每次尝试使用文本编辑器时,我都做不到. 这是布局的样子:

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文本编辑器

这就是我改用monoDevelop时的样子:

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

MonoDevelop文本编辑器

现在,我想使用xamarin,但似乎找不到解决方括号的方法.如果有人可以帮忙,我会非常感谢.现在已经困扰了我一段时间了.

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.

推荐答案

似乎在Visual Studio中未正确设置C#选项卡.

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

请尝试以下操作:

Please try the following:

a)在工具"菜单上,单击选项".
b)点击文本编辑器".
c)打开C#,然后单击制表符".
d)确保选择智能"缩进.

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.

有关更多信息,请查看: https ://msdn.microsoft.com/zh-CN/library/999b219z(v = vs.71).aspx

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

注意
您可以自动让Visual Studio缩进您的代码:

Note
You can automatically let Visual Studio indent your code:

  • 自动格式化选择: Ctrl + K Ctrl + F
  • 自动格式化文档: Ctrl + K Ctrl + D
  • Autoformat selection: Ctrl+K, Ctrl+F
  • Autoformat document: Ctrl+K, Ctrl+D

这篇关于VisualStudio大括号不会缩进macOS的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆