omz:forum

    • Register
    • Login
    • Search
    • Recent
    • Popular

    Welcome!

    This is the community forum for my apps Pythonista and Editorial.

    For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.


    Pythonista indent with cursor before EOL

    Pythonista
    3
    4
    2822
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Webmaster4o
      Webmaster4o last edited by

      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.

      Phuket2 1 Reply Last reply Reply Quote 1
      • JonB
        JonB last edited by

        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 1 Reply Last reply Reply Quote 1
        • Phuket2
          Phuket2 @Webmaster4o last edited by

          @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

          1 Reply Last reply Reply Quote 1
          • Webmaster4o
            Webmaster4o @JonB last edited by

            @JonB Yeah, this is what I do now. It's not convenient at all, though.

            1 Reply Last reply Reply Quote 0
            • First post
              Last post
            Powered by NodeBB Forums | Contributors