Reputation: 4426
In Python IDE Spyder I frequently run into issues with the automatic indentation upon pressing <enter>
, despite already having disabled as many indentation features as possible (Tools → Preferences → Editor → Advanced Settings). This includes undesirably deep indentation when using nested parenthesis, and in a few cases outright bugs. An example would be
if True: # <enter>, <tab>
x = f(
a = lengthy_expression, # automatic indentation undesirably deep
b = lengthy_expression)
or as of Spyder 3.1.1
assert f(x) == 1
wrongly_indented_statement()
I would rather prefer for the automatic indentation to simply preserve the indentation-level of the previous line, leaving extra-indentation for multi-line expressions to the user, e.g.
if True: # <enter>, <tab>
x = f( # <enter>, <tab>
a = lengthy_expression, # <enter>
b = lengthy_expression) # <enter>
Is there some such "simple auto-indentation" mode in spyder?
Upvotes: 4
Views: 4122
Reputation: 34156
(Spyder developer here) No, there isn't. We'll try to fix these bugs in one of our next releases (3.1.3 or 3.1.4)
Upvotes: 5