Today I tried Ctrl-I to reformat some old code to new tab settings, and it didn’t do anything. I seem to recall it was working fine last week.
Is anyone else seeing the same thing, or is this something on my end?
Today I tried Ctrl-I to reformat some old code to new tab settings, and it didn’t do anything. I seem to recall it was working fine last week.
Is anyone else seeing the same thing, or is this something on my end?
I didn’t even know that was a feature. I reformat code manually line by freaking line…
It seems to be working in the classic editor.
I checked it in the Beta Editor and it seems to be working fine for me
Ctrl+I
still works for me.
It stops working if there are syntax errors, for example if two consecutive lines have illegal inconsistent indentation.
Don’t do that, if you are going to bother to go that far, copy-pasta your code to your local machine and use black
instead.
black
is good, but I like something more user friendly.
I pizza paste my code to PyCharm and press Ctrl+L
.
That’s what’s happening for me, thanks for that! I was pasting in code that was indented at 2 spaces into code that was indented at 4, and trying to use Ctrl+I to fix it up. But the 2 space indentation was causing syntax errors.
I obviously need to reverse my workflow…reformat the old 2 spaces code, then copy it into the 4 spaces code.