Community
    • Login

    column editor with negative numbers

    Scheduled Pinned Locked Moved General Discussion
    6 Posts 3 Posters 517 Views
    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.
    • AlusA
      Alus
      last edited by

      Good day,
      I have been using Notepad++ for programming for a long time and now I need to insert a sequence of numbers in a column.
      For me the “column editing” function is very useful, but the function does not accept negative numbers.
      I should insert a sequence of numbers in the column starting from 512 and decreasing with a step of 8
      I had thought of using “Edit->column editor” and setting “start number” to 512 with an increment of -8 to decrease the number to zero, but unfortunately Notepad++ only accepts numbers.

      How can I automatically create a column of numbers in Notepad++ that starts with 512 and decreases in steps of 8 to zero?

      example:
      512
      504
      496
      488
      …

      Thanks for any help

      Alan KilbornA 1 Reply Last reply Reply Quote 0
      • Alan KilbornA
        Alan Kilborn @Alus
        last edited by

        @Alus

        I suppose you could generate them as positive numbers and then sort then as numbers in descending fashion?

        AlusA 1 Reply Last reply Reply Quote 4
        • AlusA
          Alus @Alan Kilborn
          last edited by

          @Alan-Kilborn said in column editor with negative numbers:

          @Alus

          I suppose you could generate them as positive numbers and then sort then as numbers in descending fashion?

          It could be done, but I would have to move each number manually…it’s a tedious job…I was hoping to do it automatically

          PeterJonesP 1 Reply Last reply Reply Quote 0
          • PeterJonesP
            PeterJones @Alus
            last edited by

            @Alus said in column editor with negative numbers:

            but I would have to move each number manually…it’s a tedious job

            1. Column Editor to generate 0 to 512 by steps of 4
            2. Select those 129 lines (you can skip the select if those are the only 129 lines in the file)
            3. Edit > Line Operations > Sort Lines As Integers Descending

            How is that “mov[ing] each number manually”? It’s literally using the sort feature in notepad++ to order the 129 integers automatically with a single menu action.

            AlusA 1 Reply Last reply Reply Quote 2
            • AlusA
              Alus @PeterJones
              last edited by Alus

              @PeterJones
              works!!
              I didn’t know this function … Beautiful
              notepad++ never ceases to amaze me :D

              However, when he reverses the numbers, he also reverses the unselected text.
              I had to build the numbers in an empty area and then copy everything where I had the text to avoid the problem

              Problem solved, thanks your help was invaluable

              Alan KilbornA 1 Reply Last reply Reply Quote 1
              • Alan KilbornA
                Alan Kilborn @Alus
                last edited by

                @Alus said in column editor with negative numbers:

                when he reverses the numbers, he also reverses the unselected text.
                I had to build the numbers in an empty area

                You did not have to do this if you would have done Peter’s step 2.

                1 Reply Last reply Reply Quote 0
                • First post
                  Last post
                The Community of users of the Notepad++ text editor.
                Powered by NodeBB | Contributors