Pythonista indent with cursor before EOL
If I'm trying to indent part of a line, and I have the cursor before the end of the line, the new indent won't match the level of indentation that I had previously won't be reflected.
If my cursor is at the end of a line when I press enter, the next line will be auto-indented to match. But if it's in the middle of a line, the part of the line that was indented will be at the beginning of the line, with no indentation.
Possible cases in which I might want to indent the middle of a line include indenting a list to occupy multiple lines instead of one.
This is something that's been bugging me for a while, it'd be great if it could be fixed.
I think what you are saying:
When you press enter at the EOL, the next will be auto indented.
When you press enter in the middle of a line, the rest of the line is put on a new line without indent.
It is not obvious to me what the "correct behavior" should be, but one workaround is to tap back to the previous line, press enter, then tap to the line in the wrong place and press backspace.
@Webmaster4o , I also started writing something and deleted it. But basically what @JonB says about the correct behaviour was I was trying to express. What comes before and what is anticipated should come next.
With dicts and lists etc, writing them on a new line etc, you can get it to indent correctly. Without doing it in the editor, I am not sure how I do it. But I just some how learnt what comes before matters. I never really worried about it, because if it works one way one time then another way another time (trying to be to smart) that can be a lot worse
@JonB Yeah, this is what I do now. It's not convenient at all, though.