[MonoDevelop] Formatting text: change pasted / open document formatting?

Michael Hutchinson m.j.hutchinson at gmail.com
Sat Dec 18 19:34:31 EST 2010

On Sat, Dec 18, 2010 at 3:48 PM, Dotan Cohen <dotancohen at gmail.com> wrote:
> Hi all, Monodevelop newbie here. When opening Visual C# code in
> Monodevelop 2.4 in Kubuntu 10.10 (yes, I know that I cannot build
> Visual C# in this environment), the code formatting is displayed
> exactly how the file was written, not as I have set my preferences for
> in Edit -> Default Policies. I have looked everywhere for an option to
> reformat on open/paste but I cannot find such an option. Does this
> option exist, or should I file a feature request? Visual Studio has
> this terrific feature and it allows coders with differing indentation
> preferences to work on file together comfortably (we normalise for
> diffs).

Our solution to ensuring style consistency between different team
members on one project is to save style policies in the solution (or
project). The "default policies" are only used for new solutions.
Format on paste should happen if you enable "on the fly formatting".

I suppose you could file an enh bug to allow MD to reformat files to a
user-defined style on load and reformat to the solution's style on
save. Obviously this would only work for projects that were fully
normalized to their coding style, and might have problems if the
formatting didn't roundtrip properly.

Michael Hutchinson

More information about the Monodevelop-list mailing list