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. Qt Creator editor: Can we insert a column of sequential numbers?
Forum Updated to NodeBB v4.3 + New Features

Qt Creator editor: Can we insert a column of sequential numbers?

Scheduled Pinned Locked Moved Unsolved Qt Creator and other tools
7 Posts 4 Posters 790 Views 2 Watching
  • 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.
  • R Offline
    R Offline
    Robert Hairgrove
    wrote on last edited by
    #1

    This seems to me that it would be a very useful addition to have, if it is not already implemented.

    The Geany editor on Linux is based on the same Scintilla software as the editor in Qt Creator. Geany has a plugin with this capability. There have been many occasions where I had to copy a block of code from Qt Creator, paste it into Geany and insert the numbers there.

    I am using the latest version of Qt Creator at the moment (17.0.0) on Ubuntu Linux 24.04.3.

    Pl45m4P 1 Reply Last reply
    0
    • R Robert Hairgrove

      This seems to me that it would be a very useful addition to have, if it is not already implemented.

      The Geany editor on Linux is based on the same Scintilla software as the editor in Qt Creator. Geany has a plugin with this capability. There have been many occasions where I had to copy a block of code from Qt Creator, paste it into Geany and insert the numbers there.

      I am using the latest version of Qt Creator at the moment (17.0.0) on Ubuntu Linux 24.04.3.

      Pl45m4P Offline
      Pl45m4P Offline
      Pl45m4
      wrote on last edited by
      #2

      @Robert-Hairgrove

      Hi!
      A column with numbers for each row or what numbers do you have in mind?!
      Or do you mean the "cursor" position like row: 24, col: 42?

      Isn't it already in there?'
      (I guess)

      Maybe you only have to make it visible/enable it first


      If debugging is the process of removing software bugs, then programming must be the process of putting them in.

      ~E. W. Dijkstra

      R 1 Reply Last reply
      0
      • Pl45m4P Pl45m4

        @Robert-Hairgrove

        Hi!
        A column with numbers for each row or what numbers do you have in mind?!
        Or do you mean the "cursor" position like row: 24, col: 42?

        Isn't it already in there?'
        (I guess)

        Maybe you only have to make it visible/enable it first

        R Offline
        R Offline
        Robert Hairgrove
        wrote on last edited by
        #3

        @Pl45m4 What I meant is like this:

        #define FIRST  1
        #define SECOND 1
        #define THIRD  1
        #define FOURTH 1
        // etc.
        

        Then using Alt+Shift+arrow up/down, the number column can be selected and (wishful thinking) insert the sequence 1,2,3,4 automatically so that we have:

        #define FIRST  1
        #define SECOND 2
        #define THIRD  3
        #define FOURTH 4
        // etc.
        
        Pl45m4P cristian-adamC 2 Replies Last reply
        1
        • R Robert Hairgrove

          @Pl45m4 What I meant is like this:

          #define FIRST  1
          #define SECOND 1
          #define THIRD  1
          #define FOURTH 1
          // etc.
          

          Then using Alt+Shift+arrow up/down, the number column can be selected and (wishful thinking) insert the sequence 1,2,3,4 automatically so that we have:

          #define FIRST  1
          #define SECOND 2
          #define THIRD  3
          #define FOURTH 4
          // etc.
          
          Pl45m4P Offline
          Pl45m4P Offline
          Pl45m4
          wrote on last edited by Pl45m4
          #4

          @Robert-Hairgrove

          Ah... so this "auto-step" feature that programs like MS Excel also have... I don't know what the "official" / professional name for this is.
          You select two or more cells with data, then drag the cursor down in a straight line and it automatically fills the cells below with data folllowing the "rule" (step-size)

          // initial data
                   A     B     C 
          0:       2
          1:       4
          
          // after selecting row 0 and 1 and "pulling the data down" it adds steps of 2
          // (or any given logic in the selected cells)
                   A     B     C 
          0:       2
          1:       4
          2:       6
          3:       8
          4:      10
          5:      12
          6:      14
          7:      16
          
          

          Mh, honestly I think this is a niche feature for an IDE. Might be more helpful in generic text editors.

          But yeah, better have features like this and don't need them, than not having them but missing them :))


          If debugging is the process of removing software bugs, then programming must be the process of putting them in.

          ~E. W. Dijkstra

          1 Reply Last reply
          0
          • R Robert Hairgrove

            @Pl45m4 What I meant is like this:

            #define FIRST  1
            #define SECOND 1
            #define THIRD  1
            #define FOURTH 1
            // etc.
            

            Then using Alt+Shift+arrow up/down, the number column can be selected and (wishful thinking) insert the sequence 1,2,3,4 automatically so that we have:

            #define FIRST  1
            #define SECOND 2
            #define THIRD  3
            #define FOURTH 4
            // etc.
            
            cristian-adamC Online
            cristian-adamC Online
            cristian-adam
            wrote on last edited by
            #5

            @Robert-Hairgrove said in Qt Creator editor: Can we insert a column of sequential numbers?:

            @Pl45m4 What I meant is like this:

            #define FIRST  1
            #define SECOND 1
            #define THIRD  1
            #define FOURTH 1
            // etc.
            

            Then using Alt+Shift+arrow up/down, the number column can be selected and (wishful thinking) insert the sequence 1,2,3,4 automatically so that we have:

            #define FIRST  1
            #define SECOND 2
            #define THIRD  3
            #define FOURTH 4
            // etc.
            

            This works with ... AI. See https://forum.qt.io/topic/163001/local-llm-assisted-text-completion-for-qt-creator for details.

            Below you can see it in action (--fim-qwen-3b-default on MacBook Pro M3):
            alt text

            JonBJ 1 Reply Last reply
            2
            • cristian-adamC cristian-adam

              @Robert-Hairgrove said in Qt Creator editor: Can we insert a column of sequential numbers?:

              @Pl45m4 What I meant is like this:

              #define FIRST  1
              #define SECOND 1
              #define THIRD  1
              #define FOURTH 1
              // etc.
              

              Then using Alt+Shift+arrow up/down, the number column can be selected and (wishful thinking) insert the sequence 1,2,3,4 automatically so that we have:

              #define FIRST  1
              #define SECOND 2
              #define THIRD  3
              #define FOURTH 4
              // etc.
              

              This works with ... AI. See https://forum.qt.io/topic/163001/local-llm-assisted-text-completion-for-qt-creator for details.

              Below you can see it in action (--fim-qwen-3b-default on MacBook Pro M3):
              alt text

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

              @cristian-adam
              Purely ooi, why does it change from cardinal words to ordinal ones after SEVENTH? :)

              Pl45m4P 1 Reply Last reply
              1
              • JonBJ JonB

                @cristian-adam
                Purely ooi, why does it change from cardinal words to ordinal ones after SEVENTH? :)

                Pl45m4P Offline
                Pl45m4P Offline
                Pl45m4
                wrote on last edited by
                #7

                @JonB said in Qt Creator editor: Can we insert a column of sequential numbers?:

                Purely ooi, why does it change from cardinal words to ordinal ones after SEVENTH? :)

                Because:

                @cristian-adam said in Qt Creator editor: Can we insert a column of sequential numbers?:

                This works with ... AI

                :))


                If debugging is the process of removing software bugs, then programming must be the process of putting them in.

                ~E. W. Dijkstra

                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