Bug 5460 - creating new project: files are double-indented
Summary: creating new project: files are double-indented
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: Text Editor ()
Version: Trunk
Hardware: PC Mac OS
: Normal normal
Target Milestone: ---
Assignee: Mike Krüger
Depends on:
Reported: 2012-06-01 14:59 UTC by Jeffrey Stedfast
Modified: 2012-07-17 01:11 UTC (History)
2 users (show)

Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:

Description Jeffrey Stedfast 2012-06-01 14:59:45 UTC
if you are using git master and create a new C# project, all the files are double-indented (2 tabs instead of 1).

This does not happen in 3.0.2
Comment 1 Jeffrey Stedfast 2012-06-01 15:02:44 UTC
C# Formatter options ("Use default settings from 'Text File'"):

Tab Width: 4
Indent Width: 4
Convert tabs to spaces: No
Allow tabs after non-tabs: Yes
Remove trailing whitespace: Yes
Comment 2 Mike Krüger 2012-06-04 01:30:42 UTC
Does work for me - are you sure the project settings are the same ?
I suspect that there is a 8 indent with somewhere.
Comment 3 Jeffrey Stedfast 2012-06-04 13:24:46 UTC
Somehow the indent width got set to 8, I have no idea how.

But what is weird is that wasn't the case if I switched back to 3.0.2, it *only* happened when I did "make run" for git master.
Comment 4 Mike Krüger 2012-06-04 13:41:00 UTC
It may be that the policy loading didn't work correctly ?

Any output on the console ?
Comment 5 Jeffrey Stedfast 2012-06-04 14:32:30 UTC
Nope, none.

Michael informed me that "make run" makes MonoDevelop use a different settings file, and suggested that maybe there was a bug at some point in the past which caused that file to get its indent level to 8 spaces?

In any case, if I hit this again, I'll reopen - but so far it's been "fixed' once I set the value back to 4.
Comment 6 Mike Krüger 2012-06-05 02:33:15 UTC
There was a bug some time ago - yes. But that is maybe a month back.
Comment 7 James Clancey 2012-07-16 18:41:31 UTC
This is happening to me. Jeff, were you able to change something locally to fix it?  It happens from trunk and on the latest alpha.

I can even create a brand new solution, then every file inside the solution has 2x tabs.  If I hit enter on any line, that line then tabs properly. But everything else is still out of place.

I can fix all the tabs, then it is great. If I do Edit -> Format -> Format document, it messes all the tabs up again.
Comment 8 James Clancey 2012-07-16 18:49:54 UTC
I have "Use default settings from 'Text File'" checked.  But it does have Indent width at 8. It is grayed out. I never changed anything in here.  If I uncheck it and change the width to 4 it works properly.

What would cause that default to change?
Comment 9 Mike Krüger 2012-07-17 01:11:00 UTC
the default is 4 - I've no clue what can go wrong there - it may that one of the 3.0.x versions did something wrong ? At least now it works for me when I nuke the settings.