简体   繁体   中英

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. It happened after I reinstalled 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. 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.
Now, the reinstall resetted everything to the default settings.

Check the menu 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#.

There you can change the way indentation is done in the Tabs submenu and in --> Formatting --> Indentation.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM