[Geany-devel] Per document tab width

Jiří Techet techet at xxxxx
Tue Jul 20 20:20:52 UTC 2010


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?



More information about the Devel mailing list