Hi,
I have noticed a weird behavior with indentation that I'm pretty sure hasn't always been present (as it would have driven me nuts). I've only seen this with python files, and since I keep my own python3 bundle I removed that and installed the default python bundle with the same results.
Let me try to illustrate.
Using the settings increaseIndentPattern = '^\s*(class|((async\s+)?(def|with|for))|elif|else|except|finally|if|try|while)\b.*:\s*$|({|[)\s*$'; decreaseIndentPattern = '^\s*(elif|else|except|finally)\b.*:|^\s*(}|])'; disableIndentCorrections = :true; indentOnPaste = 'simple';
I see the following behaviour (annotations where strange things happen):
if 1: pass else: # Expected this line to decrease indent when typing ':' (not OK) pass
def foo(): def bar(): pass return bar # I back up caret one level and type return (OK)
If I change disableIndentCorrections to :false, I get the following behaviour:
if 1: pass else: # Did decrease indent when typing ':' (OK) pass
def foo(): # back up caret to col 0 and type def => auto-indent to align with previous non-empty line (not OK) pass
# <- Force alignment to col 0, and retry def foo(): def bar(): pass return bar # I back up caret one level and type return => auto-indent to align with previous non-empty line (not OK)
FWIW, I scoured the installed bundles for any setting that might interfere, but did not find anything suspicious.
Is anyone else seeing the same behaviour, and if so, has it always been that way? Is there something I can do to fix it?
Regards, Per