@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.

-- 
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/1535#issuecomment-313825134

Reply via email to