Well "width" is only be detected if the indent is spaces.
Detecting the indent type is a heuristic based on the most common indent in the file, so that means scanning the file, not so good for huge files. And being a heuristic it can be wrong, although medium sized files where most of the indent is the same should work. But detecting per file means it might find different settings for different files in the project.
That is why these settings can be set in the project file too, the intention is that you adapt each project file to the requirements of the specific project, then all files in the project remain consistent and can't have the heuristic get the wrong setting for some files in the project.
Tabs are the default because Geany uses tabs, no correspondence will be entered into ;-)
PS: Wasn't this feature the default back in the day?
According to git it has been false since 0.19 which was as far as I bothered to look back.
that means scanning the file, not so good for huge files.
Good point; I didn't think of that. I suppose that one easy way out is to only scan the first N lines (1000 or so); if that is not enough you could just say that the heuristics failed. (And for tabs vs spaces, the number of lines scanned could be even less.) This limit could be different if you explicitly select Document > Indentation type/width > Detect from document.
Tabs are the default because Geany uses tabs, no correspondence will be entered into ;-)
Sounds reasonable. There had to be a default, and I guess tabs are as good as any other.
According to git it has been false since 0.19 which was as far as I bothered to look back.
No idea... been using Geany since around 2008 or so.
No idea... been using Geany since around 2008 or so.
Ok, detect indent seems to have been released in 0.13 Feb 2008 with a default false. (Version control never forgets :-)
My (admittedly quick) search of issues did not turn up rampaging hoards of users demanding detect from file be the default, so I'm not sure it should be changed, it might provoke rampaging hoards of users wanting it reverted.
For religious issues like indentation its probably better to have it enforced because as I said, detecting per file is not really correct, its usually the project (the user one, not the Geany one) that decides which religion is used for the whole project so there should be no need to detect per file. Just a pity there is no agreed way of detecting per project.
Or of course we could hard code the holy grail, 4 spaces (my indent religion), and be done with it :-)
Tabs were a good idea when coding was ed on clattering teletypes and disks were 100k, not now we have Geany that can count indent spaces and disks of several T bytes, and as for two spaces, what is this? Emacs? [end rant]
github-comments@lists.geany.org