[Github-comments] [geany] Indenting code indents comments as well (#674)

Colomban Wendling notifications at xxxxx
Mon Oct 5 12:49:42 UTC 2015


I think the behavior is correct/expected.  Well, it is almost for sure if the comment was already indented, and if it wasn't it highly depends on style and what the comment was actually commenting on.

Imagine the following code:
```python
# this function does nothing
def foo():
    pass
```
Now imagine I want to wrap it in a block (as in Python nested functions are valid):
```python
def get_foo():
    # this function does nothing
    def foo():
        pass
    return foo
```
Here indenting the comment (which was at column 0) is the expected behavior.

So IMO this depends when too much on style and meaning to get a logic that will always Do the Right Thing™.

Though, as in your case indeed you don't want it, maybe it could be added, especially if a plugin could do this.

---
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/issues/674#issuecomment-145517324
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.geany.org/pipermail/github-comments/attachments/20151005/382b6780/attachment.html>


More information about the Github-comments mailing list