Thanks Rob that was it. I changed disableIndentCorrections from ‘1’ to ‘emptyLines’ in the Python bundle and it has reverted to the old behaviour. { disableIndentCorrections = 'emptyLines'; indentOnPaste = 'simple'; } Pretty sure I have was using default settings before. — Iain
On alpha.9517 the auto indentation seems to have changed that if you leave a blank line after a function TextMate will keep indenting subsequent lines.
def boo(): """docstring for boo""" pass
print <— this line is automatically indented unless you use ⌘[
I had a look in the Python bundle and the language grammar is unchanged. Am I missing a setting somewhere to revert to the old behaviour?
From the release notes…
It is now possible to set the `disableIndentCorrections` to `emptyLines`. This will disable the indent corrections only when typing on empty lines, which has been made default for HTML.
I’m sure it has something to do with that, though it doesn’t sound like anything should change (outside of HTML) if you were still using default settings. Then again, if you were using default settings, the behavior you’ve noticed would not be new. (I disabled it a long time ago.)
I’m using “emptyLines” now just to see if there’s a benefit. Before, I was using “:true”. I haven’t figured out the difference yet.
On 5 Mar 2014, at 15:32, Iain Allan wrote:
I changed disableIndentCorrections from ‘1’ to ‘emptyLines’ in the Python bundle and it has reverted to the old behaviour.
Oh, I didn’t realize the Python bundle disabled it. I don’t think it did originally, so I had just done it globally for all scopes.
Like I said, I was using “:true” before. I wonder if “1” and “:true” were equivalent before, but something in the last update causes “1” not to be parsed the same way. If so, the Python bundle probably needs to be changed.
On 6 Mar 2014, at 3:43, Rob McBroom wrote:
Like I said, I was using “:true” before. I wonder if “1” and “:true” were equivalent before, but something in the last update causes “1” not to be parsed the same way. If so, the Python bundle probably needs to be changed.
Indeed: I now check for a string, and check if it’s ‘emptyLines’ and only if not a string, check if it’s a boolean.
I’ve fixed the code so that ‘1’ is still treated as a boolean value. But we’ll push a new bundle where it’s changed to :true, so people won’t have to wait for a new build.
That said, I think ‘emptyLines’ (now) make more sense for Python, as it will for example de-indent current line when typing the ending colon in ‘else:’. Though we can’t push that change, as it would cause people not on latest build, to get indent re-enabled for Python.
But I would encourage Python users (on nightly builds) to make that change and report if it’s causing issues.