[Geany-devel] Per document tab width

Jiří Techet techet at xxxxx
Thu Aug 12 09:48:01 UTC 2010


On Wed, Aug 11, 2010 at 14:25, Nick Treleaven
<nick.treleaven at btinternet.com> wrote:
> On Fri, 23 Jul 2010 19:23:49 +0200
> Jiří Techet <techet at gmail.com> wrote:
>
>> >> I would propose to have one more entry in the Document menu called
>> >> e.g. "Tab size" and placed under "Indent type" with a submenu
>> >> containing numbers from 2 to 8 (I hope there is nobody so crazy that
>> >> he would use tab for a single char indent or go over 8 characters)
>> >> with a radio button selecting the active selection. The user could
>> >> change the default tab size of the active document to anything he
>> >> wishes. This settings could also be saved into the project/session
>> >> file so the files get reloaded with the same tab size settings. What
>> >> do you think about this feature?
>> >
>> > I second the idea of the per-document tab-width.
>
> As we now have 3 devs in favour, perhaps we should support it ;-)

Great! Let me know if you think that the indent sizes should be saved
in the session file list as well.

>
> There is a related issue with applying changed default indent settings
> - ask the user whether to apply the new settings to all documents in
> the session. But this is something we should do anyway IMO, just
> mentioning it.
>
>> > Maybe I would design
>> > the menu a bit in another way and provide a small dialog with a text
>> > field or spinner where you can setup the tab-width. :)
>> > (I guess it's not possible to integrate something like a text field or
>> > spinner into a menu?)
>> >
>>
>> I suggested the settings to work this way because all the other per
>> document settings (indent type, file type, encoding, line endings) are
>> implemented as radio menu items. But can be done the way you suggest,
>> I don't care much. I'll wait for Enrico's or Nick's opinion on this.
>
> I think radio buttons is fine, I think 2-8 is reasonable.

At the end I made the range 1-8. Even though I can't imagine someone
would use 1-size indent with ANSI style, it could be used for GNU
style where you would indent { by one and the code by one as well (so
in fact the code would be indented by two).

Jiri

>
> Regards,
> Nick
> _______________________________________________
> Geany-devel mailing list
> Geany-devel at uvena.de
> http://lists.uvena.de/cgi-bin/mailman/listinfo/geany-devel
>



More information about the Devel mailing list