Bug 20778 - Is a bug ? - how to set the editor correct indentation and code formatting policy in xamarin studio 5.0
Summary: Is a bug ? - how to set the editor correct indentation and code formatting po...
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: Text Editor ()
Version: 5.0.1
Hardware: Macintosh Mac OS
: Normal normal
Target Milestone: master
Assignee: Mike Krüger
Depends on:
Reported: 2014-06-20 23:31 UTC by tinyhu
Modified: 2014-06-21 21:20 UTC (History)
1 user (show)

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

screenshot (190.69 KB, image/png)
2014-06-21 04:35 UTC, tinyhu
screenshot2 (214.23 KB, image/png)
2014-06-21 04:43 UTC, tinyhu

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 tinyhu 2014-06-20 23:31:05 UTC
in xamarin studio 5.0.1(build3)

I input the code in the editor, when I enter "ENTER", why the indentation is too long, and the "{" symbol is not align to the " if " keyword, and "int i=3" is not align the above line.

        if (mUri == uri)
                   mImageView.Image = image;
                           int i=3        


xs perferences: behavior=> indentation mode: smart (also try option: none,automatic) SourceCode/Code formatting: c# source code/ Policy: has been try the following options: mono/visual studio/custom/tab width:4 ...

but the same setting is xamarin studio 4.3 is ok, I also try to uninstall xs5.0 and reinstall it, but not resolved.
Comment 1 Mike Krüger 2014-06-21 02:06:15 UTC
Go to the project preferences. I assume that the code formatting/text settings may be messed up there.

Other than that I can't reproduce the behavior.

Does that happen for new projects  ?
Comment 2 tinyhu 2014-06-21 04:35:16 UTC
it also will be happen for any new projects.
Comment 3 tinyhu 2014-06-21 04:35:51 UTC
Created attachment 7142 [details]

Comment 4 tinyhu 2014-06-21 04:43:27 UTC
Created attachment 7143 [details]

Comment 5 Mike Krüger 2014-06-21 04:44:13 UTC
You're screenshotting the IDE setting. They're not taken for existing projetcs. The projects overwrite these settings - can you look in the project preferences ?
Comment 6 Mike Krüger 2014-06-21 04:46:28 UTC
Hm, looking at the screenshots you're running into a bug that got fixed.

I think the fix should've hit the alpha channel already - can you try to switch to 5.1 ?
Comment 7 tinyhu 2014-06-21 21:20:06 UTC
thanks, sure to fix in 5.1 alpha.