[Geany-devel] Per document tab width

Dominic Hopf dmaphy at xxxxx
Thu Jul 22 22:18:25 UTC 2010

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?)

Best Regards,

Dominic Hopf <dmaphy at googlemail.com>


Key Fingerprint:
A7DF C4FC 07AE 4DDC 5CA0 BD93 AAB0 6019 CA7D 868D
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part
URL: <http://lists.geany.org/pipermail/devel/attachments/20100723/1c816920/attachment.pgp>

More information about the Devel mailing list