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.
If you set the "Indentation mode" (Text Editor->Behavior) to "Automatic" then the "Remove trailing whitespace" setting (Source Code->Code Formatting->Text file) setting doesn't seem to work.
To reproduce, set indentation mode to automatic and turn on remove trailing whitespace. Now edit a file and hit enter on an indented line. There will be spaces inserted to match the indentation level. Hitting enter again leaves those spaces in the file (they are not removed).
Now change the indentation mode to "Smart" and repeat the experiment. Now when you hit enter the cursor is indented properly, but the spaces are not inserted into the file until you type something on that line. If you don't type something on that line then it doesn't insert any spaces.
This is important to me because the "Smart" indentation mode very often does the wrong thing in my code, and it insists on changing the indentation of lines incorrectly as I edit them. But if I don't use "Smart" then I get extra whitespace all over my file.
If the indentation in 'smart' does the wrong thing then either
a) Are the formatting settings wrong (there are plenty of formatting options). You need to adjust them to your desired formatting.
b) You're running into a bug