[Github-comments] [geany/geany] Confusing meaning of the Auto-indent modes (#2696)

nomadbyte notifications at xxxxx
Mon Dec 21 00:44:31 UTC 2020


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. 

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/issues/2696
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.geany.org/pipermail/github-comments/attachments/20201220/c990830a/attachment.htm>


More information about the Github-comments mailing list