Indentation is stupidly complex, everyone should use my standard, 4 spaces 😀

But sadly thats not the case, in languages like Python indentation sets program structure, so Python really should use spaces and it defines tab as 8 spaces for where they are mixed, Geany is C which doesn't care, but the devs do and decree tabs but 4 space width, GNU uses two spaces IIRC, other projects use other rules.

So it varies by project, by filetype, and needs a default for new files. So Geany has all three, with filetype file indentation settings (if present) overriding default in the preferences, and project overriding both filetype and default (IIRC, I didn't check).

But that doesn't handle the user opening a random file from somewhere else, so they need to be able to select the indentation setting manually, and have that override everything, and stick (at least as long as the file is open, and across Geany restarts).

But that can be quite a pain, so there is an option to try to detect the indentation from the file when its opened, but its a heuristic, and as such can be wrong, so the manual override is still needed.


Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <geany/geany/issues/3721/1996170068@github.com>