Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. "auto indent selection " broken...
QtWS25 Last Chance

"auto indent selection " broken...

Scheduled Pinned Locked Moved Unsolved Qt Creator and other tools
7 Posts 4 Posters 545 Views
  • 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.
  • A Offline
    A Offline
    Anonymous_Banned275
    wrote on last edited by
    #1

    For unknown reason my "auto indent selection" is not working well.

    Is there a way to "select all" and totally rebuild the layout so all lines start at left side , position zero?

    Hence no indentation at all...

    1 Reply Last reply
    0
    • Christian EhrlicherC Online
      Christian EhrlicherC Online
      Christian Ehrlicher
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Strg+A to select all, then Strg+I to indent the current selected code.

      Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
      Visit the Qt Academy at https://academy.qt.io/catalog

      A 1 Reply Last reply
      1
      • Christian EhrlicherC Christian Ehrlicher

        Strg+A to select all, then Strg+I to indent the current selected code.

        A Offline
        A Offline
        Anonymous_Banned275
        wrote on last edited by
        #3

        @Christian-Ehrlicher That does not work , it does auto indentation - I need to remove all indentation .

        JonBJ 1 Reply Last reply
        0
        • A Anonymous_Banned275

          @Christian-Ehrlicher That does not work , it does auto indentation - I need to remove all indentation .

          JonBJ Offline
          JonBJ Offline
          JonB
          wrote on last edited by JonB
          #4

          @AnneRanch
          Untested, but doesn't Shift+Tab unindent the current selection? Select everything and hit it repeatedly if you want to unindent till the left margin/"position zero".

          A 1 Reply Last reply
          1
          • JonBJ JonB

            @AnneRanch
            Untested, but doesn't Shift+Tab unindent the current selection? Select everything and hit it repeatedly if you want to unindent till the left margin/"position zero".

            A Offline
            A Offline
            Anonymous_Banned275
            wrote on last edited by
            #5

            @JonB SOrry, no response, only "creator not responding" after a while. I can actually see where the indentation is broken and tried to "fix" it there.
            I am beginning to see a pattern after about 2500 lines of code , things just do not behave as expected... not sure where the problem is.

            1 Reply Last reply
            0
            • M Offline
              M Offline
              mchinand
              wrote on last edited by
              #6

              Breaking up your code into several files would help. Also, having the code in a revision control system like git has saved me many times when I've made a bad edit. This allows you to easily see changes between commits (commit often, not just once everything is working). It may seem like a hassle to get started but will save you time and frustration in the long run.

              A 1 Reply Last reply
              1
              • M mchinand

                Breaking up your code into several files would help. Also, having the code in a revision control system like git has saved me many times when I've made a bad edit. This allows you to easily see changes between commits (commit often, not just once everything is working). It may seem like a hassle to get started but will save you time and frustration in the long run.

                A Offline
                A Offline
                Anonymous_Banned275
                wrote on last edited by
                #7

                @mchinand Good points, but it is little too late to split the .cpp file . I keep local copy , but do it very seldom. I copy the entire entre project folder , but again it maybe too late. I am surprised that there is no way to "restore " this. I may try another IDE /banana like Eclipse...
                I will try git....

                1 Reply Last reply
                0

                • Login

                • Login or register to search.
                • First post
                  Last post
                0
                • Categories
                • Recent
                • Tags
                • Popular
                • Users
                • Groups
                • Search
                • Get Qt Extensions
                • Unsolved