I was trying to make sense of the Geany's Auto-indent modes {Basic, Current chars, Match braces}, as listed in Preferences>Indentation:Auto-indent mode.
It's absolutely not clear [to me] from the names what these modes do and how they differ. Trying them out in practice still shows little difference between the "Current chars" and "Match braces" modes.
Geany's doc on [auto-indentation](../blob/d2740f21feb84b6f951398c6f683674b2b56bfed/doc/geany.txt#auto-indentation) spell out the distinction more clearly. But that's a stretch to expect users to look this up in the docs.
**Basic** Adds the same amount of whitespace on a new line as on the previous line. For the Tabs and the Spaces indent types the indentation will use the same combination of characters as the previous line. The Tabs and Spaces indentation type converts as explained above. **Current chars** Does the same as Basic but also indents a new line after an opening brace '{', and de-indents when typing a closing brace '}'. For Python, a new line will be indented after typing ':' at the end of the previous line. **Match braces** Similar to Current chars but the closing brace will be aligned to match the indentation of the line with the opening brace. This requires the filetype to be one where Geany knows that the Scintilla lexer understands matching braces (C, C++, D, HTML, Pascal, Bash, Perl, TCL).
I wonder if these auto-indent modes could be renamed to something more forthcoming about the actual mode of the operation?
My suggestion for the choices of Auto-indent mode: - Current chars => **Block** - Match braces => **Block with brace alignment**
Perhaps there are better alternatives for these which would communicate this more clearly to the user.
Totally agree the names are not great, but so far nobody has a better suggestion that they PR. I don't apologise for requiring the users to lookup the manual, its not realistic to expect a name short enough to fit on dialogs to do that.
I don't personally think `Block` and `Block with brace alignment` actually do any better, and "brace alignment" is misleading since it aligns to the indent of the line not of the brace, and in fact its "Block" that actually aligns braces if its used as intended (but that alignment is not enforced).
Maybe we should call them `Mode 1`, `Mode 2`, and `Mode 3` with a note to look at the manual for what they mean, at least nobody can then try to glean functionality from the name :grin:
github-comments@lists.geany.org