Bug 1266 - [Feature request] - Ability to format as you type
Summary: [Feature request] - Ability to format as you type
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: Text Editor ()
Version: unspecified
Hardware: PC Windows
: --- normal
Target Milestone: ---
Assignee: Mike Krüger
Depends on:
Reported: 2011-10-05 14:32 UTC by Mike Christensen
Modified: 2011-10-27 06:03 UTC (History)
1 user (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 Mike Christensen 2011-10-05 14:32:29 UTC
Repro steps:

1) Configure C# formatting so curly braces will appear on their own line.

2) Type the following code:

for(int i = 0;i < 5; i++) {


Right when you type "}" to end the loop, that block of code should be formatted correctly with the { on its own line, a space after the "for", etc.

This should at least be an option you can configure in the IDE.  It would be somewhat of a hassle to have the run the formatter each time.
Comment 1 Mike Christensen 2011-10-05 15:30:42 UTC
I found the "on the fly" formatting option, however it seems to be a bit clunky.

I think it should trigger when you "close" the code block, and it also seems to eat keystrokes.  I believe this should be fixed up and work more like Visual Studio, and probably enabled by default.
Comment 2 Mike Krüger 2011-10-27 06:03:22 UTC
For me it doesn't eat keytrokes. It activates on close and some other chars.

Y fixing up that feature is a ongoing process. Currently our resolover/parser layer is in a somehow incosistent state.

When the branches get merged it'll be easier to maintain that feature again.

(btw. I work most of the time with turned on auto formatting)