I have tried setting the "Files->Replace tabs with space" prefererence, and Project->Apply default indentation. Neither converts tabs, they are still there.
This is on a new Debian Bullsyeye installation, with Geany 1.37.1.
I do not have it set up to build Geany at present (it is on the list . . .), so if this is working upstream please close this issue!
Closed #2875.
Its working upstream because it is not intended to work the way I believe you expect.
The `Files->Replace tabs with space` is a change that is made at file saving (as the heading says) not to the buffer.
And has nothing to do with the default indentation, so `Project->Apply default indentation` won't be affected, its affected by the `Editor->Indentation type` but that sets what is to be input for new indentation, it doesn't affect existing spaces and tabs. The `Apply default indentation` applies the setting to all files to save you time, but its still the setting for new indents, not a command to change existing indents. Existing spaces and tabs are changed by `Document->Replace tabs with spaces`.
Basically the settings for new input are separated from the actions to change existing file content because otherwise its impossible to make files with mixed indents (don't ask me, but some people seem to need/want them).
The tabs are not converted to spaces on saving either. I can convert using your method, but whenever I insert a tab it only ever uses the tab character, not spaces, as I have set in Editor->Indentation.
So, a bit confusing (partly down to me I accept!), and I can now convert tabs to spaces from the Document menu, but cannot insert four spaces instead of a tab.
I think the problems in this post are still valid, but it is of course your call ;)
convert on save works here - new document - turn on `View->Show white space` so tabs and spaces are visible - set `Document->indent type` to tab - insert some tabby indented contents (and the tabs show as arrows) - set `Edit->Preferences->Files->Replace tabs with space` - save the file
and the tabs turn to spaces, the arrows become 4 little dots.
the `Document->Indent type` must be spaces to insert spaces when indenting (either by tab key at line start or automagically) and if you now set that and type return in the file above you get indented with spaces, which show as 4 little dots.
If following these steps does not work then there may be a bug, but thats how it is supposed to work and it works here.
If some other set of steps feels like it does not work, report the exact steps similar to the above so it can be replicated. If it can't be replicated its not a bug :grin:
Yes, I have set indent type to tabs, spaces, whatever, and it still only ever inserts tabs. Saving does not convert them. I have been viewing white space the whole time ;)
OK, so looks it is working upstream, and that is fine, but it is broken on Debian Bullseye. If any devs are using this OS, you can confirm my findings.
Yes, I have set indent type to tabs, spaces, whatever, and it still only ever inserts tabs.
Weird, did you follow the script I gave above exactly? Which step did not work?
The version 1.37.1 is essentially the same as the git version I am using. You have not given me any recipe for replicating the problem, as far as Git can tell that part of the code has not changed between that version and latest, so if a bug actually exists I should be able to replicate the problem, or understand where your misunderstanding is. Please test exactly the steps given and identify when it fails and provide a step by step recipe for replication of your problem.
Tabs were inserted, but not replaced on "Edit->Preferences->Files->Replace tabs with space". Nor on saving.
github-comments@lists.geany.org