[英]Indenting changed after I re-installed Visual Studio 2010
When I edit C# file in Visual Studio 2010, it looks ok, but when I open it in another IDE or push to github, I notice that indenting is wrong. 当我在Visual Studio 2010中编辑C#文件时,它看起来还可以,但是当我在另一个IDE中打开它或将其推送到github时,我注意到缩进是错误的。 It happened after I reinstalled Visual Studio. 重新安装Visual Studio之后发生了。
Any idea how put this on the line again? 知道如何再次将其放在网上吗? I do not remember changing any indenting options in previous installation, and I definitely didn't do anything to it this time either. 我不记得在以前的安装中更改任何缩进选项,并且这次我绝对也没有做任何事情。
UPDATE: 更新:
By wrong I mean this (faked, since it cannot if copy/pasted it gets ok): 错误的意思是我(这是假的,因为如果复制/粘贴就不能,它就可以了):
_req = (HttpWebRequest)WebRequestCreator.ClientHttp.Create(new Uri(_options["url"]));
_req.Method = _options["method"];
// disable buffering (this only works for ClientHttp version)
//_req.AllowWriteStreamBuffering = false; // causes silent crash on Mac OS X 10.8.x
in Visual Studio it looks ok. 在Visual Studio中看起来还可以。 Basically any new line that I add (that didn't exist in files created in previous installation), I get weird indenting. 基本上,我添加的任何新行(在以前的安装中创建的文件中都没有),我会产生奇怪的缩进。
Probably in your previous installation of VS you have a different settings for your tabs. 可能在以前的VS安装中,您的选项卡具有不同的设置。
Now, the reinstall resetted everything to the default settings. 现在,重新安装将所有内容重置为默认设置。
Check the menu Tools, ->Options, ->Text Editor, ->C#, Tabs
检查菜单Tools, ->Options, ->Text Editor, ->C#, Tabs
and try with different settings 并尝试不同的设置
You can change the automatic formatting of text in Visual Studio by going to Tools --> Options --> Text Editor --> C#. 您可以通过在工具->选项->文本编辑器-> C#中更改Visual Studio中文本的自动格式。
There you can change the way indentation is done in the Tabs submenu and in --> Formatting --> Indentation. 您可以在“选项卡”子菜单和->“格式设置”->“缩进”中更改缩进的方式。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.