[Monodevelop-devel] Default TextStyle's

Christian Hergert chris at dronelabs.com
Tue Aug 25 16:33:51 EDT 2009


Lluis Sanchez Gual wrote:
> El dt 25 de 08 de 2009 a les 01:31 -0700, en/na Christian Hergert va
> escriure:
>> While trying to figure out how to add a default style for python I
>> came across a couple things.  It seems like the mime-types that are
>> globally configurable are hard coded (See
>> MonoDevelop.Projects.Gui.Dialogs.OptionPanels/CodeFormattingPanel.cs
>> or patch below).
>
> This is now fixed. MD will show mime types for which there is a custom
> options panel defined, and users can also manually register them.

Great!

>>   And beyond that, I can't seem to find a way to set
>> the default settings for a mime-type.  Am I correct in that all the
>> default global formats inherit from the plain-text style?
>
> Yes. Right now there is no way of setting the default settings for a
> specific mime type.

This might be a good candidate to add before the 2.2 release.  I'm sure 
some of users wont even think to change the default settings.  I'll 
volunteer if its desired and those intimate with the feature are busy.

>> For python specifically, almost nobody does anything other than
>> PEP8[1] (4 space tabs, etc).  So having that as the default for
>> text/x-python makes a lot of sense.
>
> You should define those settings as a policy set. I've seen you added
> them to the Mono policy set, but you should create a PEP8 policy set.
> Unfortunately, there is no way of setting the default policy set.

I added the python style to the Mono policy set thinking that it might 
be useful for IronPython.  Migrating to PEP8 sounds fine with me.

Thanks!

-- Christian


More information about the Monodevelop-devel-list mailing list