[Beta] Ctrl-I no longer reformatting code?

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… :exploding_head:

It seems to be working in the classic editor.

@user8, here’s a list of keyboard shortcuts that I always forget to check :

1 Like

I checked it in the Beta Editor and it seems to be working fine for me

1 Like

Ctrl+I still works for me.

It stops working if there are syntax errors, for example if two consecutive lines have illegal inconsistent indentation.

3 Likes

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.

2 Likes

black is good, but I like something more user friendly.

I pizza paste my code to PyCharm and press Ctrl+L.

1 Like

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.

2 Likes