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

Dotan Cohen dotancohen at gmail.com
Sat Dec 18 16:19:24 EST 2010

Thanks for the quick reply.

On Sat, Dec 18, 2010 at 22:57, IBBoard <ibboard at gmail.com> wrote:
> You can manually format,

Too much code!

> and you can format on save (the latest Git version
> has an option in Preferences under Behaviour),

Great, that might be a workaround: open then immediately save.

> but I think I had to argue
> for the latter to be added. Some people thought that it was bad behaviour
> because it meant that code changed in ways that they might not see (e.g.
> closing with unsaved changes and hitting "save" when prompted), but I wanted
> it for roughly the same reason as you.

Code changing in unseen ways would be bad, I agree, but formatting and
whitespace are for humans, not compilers. It is no more code than are
comments. Debatable, I know (it would be annoying to recompile due to
a "change" that is only whitespace) but that's my stand on it.

> Different indentation preferences in terms of how many spaces a tab is
> should be supported, but anything for the other formatting options needs an
> action to make it happen.

An action, such as?

> Normalising on commit is an interesting idea, though. Every project I've
> worked on just goes for "all code must be formatted like this, which we'll
> do by having people use the same format rules". Generally it doesn't cause
> much of a problem. We've said in the team that saving some abstract model of
> the code (like the compile tree) and formatting the code as the developer
> wants would solve all of these "whitespace and formatting changes" commits,
> but no-one seems to do it at the moment.

I see.

> I'm not sure why you wouldn't be able to build C# in Kubuntu, though. As
> long as you've got MD and all of the appropriate Mono dependencies then you
> should be able to build in KDE. There's something really wrong if you can't,
> what with MonoDevelop building code on Windows and Mac as well these days!

C# in the mono implementation builds on Kubuntu, but not Visual C#. C#
is the standard, the two big implementations of the standard are
Visual C# and Mono. I am working with Visual C# code.

Dotan Cohen


More information about the Monodevelop-list mailing list