In many languages, under many coding styles, given the following line:
``` some_var = some_function_name(long_argument_name, another_one, ```
the next line should begin at column 30 — right after the opening parenthesis:
``` some_var = some_function_name(long_argument_name, another_one, more_stuff, even_more_stuff) ```
(same for brackets and braces).
At the very least, this is true for Python according to [PEP 8](https://www.python.org/dev/peps/pep-0008/).
Many popular editors (for example, Emacs and Sublime Text) do this indentation automatically, but Geany does not, leaving the user to insert a long string of spaces manually, which is quite a nuisance (also runs the risk of forgetting to press *Insert Alternative White Space* instead of just Tab).
It should not be too hard to do the right thing in [`get_indent_size_after_line`](https://github.com/geany/geany/blob/master/src/editor.c), at least for Python, which already has a dedicated `get_python_indent`.
It's one of those things where if Geany did that other people would want it to not to. I don't think anyone would be opposed to adding an option to make it do that, perhaps in Prefs->Editor->Indentation (and the equivalent for project settings).
BTW, for languages supported by clang-format (not Python AFAIK), you could use the [code format plugin](http://codebrainz.github.io/code-format/) and configure it to do that when formatting the code.
@vfaronov to be just a tiny bit picky with terminology, thats alignment not indent. Indent adds a fixed number of spaces/tabs at the start of the line, thats what Geany does, alignment is adding extra spaces to the indent so that the start of a line _aligns_ with something in the line above (monospaced fonts only please).
As you and @codebrainz have noted, alignment is language specific and coding standard specific. Thats why it can be done right by tools with language knowledge like clang-format. There have been several attempts (of varying sophistication) to provide smarter indentation and any form of alignment. None have so far passed the "correct enough of the time to not be annoying" test. And PEP8 allows many options some fo which are indentation and some are alignment, and applies it to list comprehensions and dict comprehensions too.
Note also that Python3 disallows mixing tabs and spaces, so it you use tabs for indenting you cannot do alignment at all, unless you are incredibly lucky and the position you want happens to fall at a tab stop. But of course that won't work when someone else opens the file with a different tab size.
Personally I would not like to see any more language specific code added to Geany, but then the maintainer has in the past refused to allow plugins to do indentation/alignment in place of Geany's. So as @codebrainz said there is no alternative but to make it option protected code in Geany ATM.
github-comments@lists.geany.org