[Geany-devel] Per document tab width

Jiří Techet techet at xxxxx
Fri Jul 23 17:23:49 UTC 2010

On Fri, Jul 23, 2010 at 00:18, Dominic Hopf <dmaphy at googlemail.com> wrote:
> Am Dienstag, den 20.07.2010, 22:20 +0200 schrieb Jiří Techet:
>> Hi,
>> I have one more feature idea and would like to ask if it is something
>> that others would like to see too before I start implementing it. I'm
>> working on a project where everyone expresses his personality by using
>> different tab width for indenting - I have already seen sources with
>> tab size of 2, 3, 4, 5, 6 and 8 (it's just a matter of time until I
>> see a source with tab width 7). Of course, these people (or people who
>> were editing the same source afterwards) also use spaces so sometimes
>> it happens that I have e.g. tab size set to 4 but the other file I
>> edit has tab size 2 and it uses spaces too, so what I see is that the
>> lines using tab get indented less than the lines using spaces. I
>> usually ignore it, but sometimes the code is so unreadable that I have
>> to change the tab size. And this is the problem - with geany you have
>> to do it either per project or globally, it's not possible for a
>> single file. So I have to switch it in the project settings, look at
>> the file, and switch it back again because I return back to a file
>> with different indent size.
>> 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. 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.



> Best Regards,
> Dominic
> --
> Dominic Hopf <dmaphy at googlemail.com>
> http://dominichopf.de/
> Key Fingerprint:
> A7DF C4FC 07AE 4DDC 5CA0 BD93 AAB0 6019 CA7D 868D
> _______________________________________________
> 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