<p><a href="https://github.com/vfaronov" class="user-mention">@vfaronov</a> 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 <em>aligns</em> with something in the line above (monospaced fonts only please).</p>
<p>As you and <a href="https://github.com/codebrainz" class="user-mention">@codebrainz</a> 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.</p>
<p>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.</p>
<p>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 <a href="https://github.com/codebrainz" class="user-mention">@codebrainz</a> said there is no alternative but to make it option protected code in Geany ATM.</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/geany/geany/issues/1535#issuecomment-313825134">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABDrJ7kMKdyOSLIhW9TopPtQTx6TdeL8ks5sLtsjgaJpZM4ORDPi">mute the thread</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/ABDrJzu9YfugSWSUpcAzn2O0Lsa7Ii-9ks5sLtsjgaJpZM4ORDPi.gif" width="1" /></p>
<div itemscope itemtype="http://schema.org/EmailMessage">
<div itemprop="action" itemscope itemtype="http://schema.org/ViewAction">
  <link itemprop="url" href="https://github.com/geany/geany/issues/1535#issuecomment-313825134"></link>
  <meta itemprop="name" content="View Issue"></meta>
</div>
<meta itemprop="description" content="View this Issue on GitHub"></meta>
</div>

<script type="application/json" data-scope="inboxmarkup">{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/geany/geany","title":"geany/geany","subtitle":"GitHub repository","main_image_url":"https://cloud.githubusercontent.com/assets/143418/17495839/a5054eac-5d88-11e6-95fc-7290892c7bb5.png","avatar_image_url":"https://cloud.githubusercontent.com/assets/143418/15842166/7c72db34-2c0b-11e6-9aed-b52498112777.png","action":{"name":"Open in GitHub","url":"https://github.com/geany/geany"}},"updates":{"snippets":[{"icon":"PERSON","message":"@elextr in #1535: @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).\r\n\r\nAs 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.\r\n\r\nNote 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.\r\n\r\nPersonally 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."}],"action":{"name":"View Issue","url":"https://github.com/geany/geany/issues/1535#issuecomment-313825134"}}}</script>