jayarjo
jayarjo

Reputation: 16726

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.

Upvotes: 0

Views: 94

Answers (2)

Roy Dictus
Roy Dictus

Reputation: 33139

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.

Upvotes: 2

Steve
Steve

Reputation: 216293

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

Upvotes: 2

Related Questions