![indent1](https://cloud.githubusercontent.com/assets/7548378/10269226/535982de-6ac8-11...) ![indent2](https://cloud.githubusercontent.com/assets/7548378/10269227/535c2caa-6ac8-11...)
When I indent a block of code with tab, my comments get indented as well. Should they be left as is?
--- Reply to this email directly or view it on GitHub: https://github.com/geany/geany/issues/674
No, if you move the start of the characters on the line by one tab, then, since the whitespace between the code and the comment has moved by one tab the same amount of whitespace will move the comments by one tab.
--- Reply to this email directly or view it on GitHub: https://github.com/geany/geany/issues/674#issuecomment-145392564
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
@b4n, indent_style plugin API needed
--- Reply to this email directly or view it on GitHub: https://github.com/geany/geany/issues/674#issuecomment-145678852
github-comments@lists.geany.org