Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
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
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.
Description of Problem:
The smart indentation settings seem to get stuck on whatever they were when the file is created. Subsequent changes to Indent Width in the project options have no effect. If you hit enter, the cursor is indented using the original setting. Choosing Format Document from the Edit menu will adjust the indentation for existing lines, but does not fix the autoindentation setting.
Steps to reproduce the problem:
1. Go to project options and select an Indent Width of 6.
2. Create a new source file and add it to the solution. The code stubs will be indented with 6 spaces.
3. Go back to project options and change the Indent Width to 3.
4. Enter some code in one of the method blocks and hit enter. You will be indented 6 spaces.
5. Select Edit -> Format -> Format Document. The existing code in the document will be reformatted to 3 space indentation.
6. Enter some code in one of the method blocks and hit enter. You will be indented 6 space.
Ending a statement ignores the current setting of Indent Width, and instead uses the setting from when the source file was originally created.
The auto-indenter will respect the current setting in Indent Width.
How often does this happen?
The typing indenter atm doesn't respect the indent width - but the formatter does.