-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Indentation issue using Tabs #3508
Comments
Wait, I lied a bit. Subsequent lines in a continuation do behave as expected, carrying over the previous line's indentation. I think I may have been triggering the new continuation line multiple times over (like where it tries to be smart about where a new line should start after several blank lines and/or comment-only lines) |
The original case in the steps to reproduce is still a problem (tested again with spyder 3.0.1). My previous comment was only that subsequent lines behave as expected. |
@rlaverde, please take a look at this one. |
Additional information in some testing just now: I suppose there could be some who prefer that behavior with spaces to help align the next lines with the opening brace, but with tabs that just doesn't work very well. |
Description of your problem
Using tabs for indentation, when indenting a new line in the middle of a statement (e.g. between parentheses/braces/brackets), it inserts more tabs than expected (looks like current indentation + 5), and there is no way to configure it.
What steps will reproduce the problem?
What is the expected output? What do you see instead?
expected: the new line is indented with 1 (or 2; configurable) tabs
actual: the new line is indented with 5 tabs
Please provide any additional information below
Hitting tab after removing any/all indentation immediately adds back to the original number of tabs.
Even if the first line in the continuation block (additional lines associated with a single statement) is indented the way I expect, subsequent lines still start with the original number of tabs rather than aligning with the previous line. This is the most obnoxious part of this issue as that means I have to manually correct each line of a continuation block.
Suggested behavior:
Continuation lines should indent with one more unit of indentation than the parent of that continuation block. Subsequent lines should indent with the same indentation as the previous line. Continuation blocks may be nested (e.g. if calling a function with many parameters, where one parameter is another function call with many parameters and I want to have each parameter on its own line, or if defining a nested json-like structure of dicts and lists), in which case each new nesting would increase the indentation by one unit of indentation.
It would be nice if the continuation indentation were configurable as well, as some users may prefer 2 indents instead of 1.
Versions and main components
Dependencies
Please go to the menu entry
Help > Optional Dependencies
(orHelp > Dependencies
), press the buttonCopy to clipboard
and paste the contents below:
I don't see a menu.
I installed it using pip.
The text was updated successfully, but these errors were encountered: