Community
    • Login

    How to insert text before every line

    Scheduled Pinned Locked Moved General Discussion
    6 Posts 5 Posters 2.6k 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.
    • Chuck RobertsC
      Chuck Roberts
      last edited by Chuck Roberts

      I have Notepad++ 8.5.7. There used to be an option to insert text before every line, such as increasing numbers before each line of text but I cannot find this anymore. This was handy for numbering each line in Markdown before I converted it to an EPUB. Each line I select should begin with a number, a period, and a space. And this should only affect lines I select.

      I searched the menus 3 times but cannot find it. Has this feature been removed or moved? I thought it was on the Edit menu somewhere.

      Thank you.

      mkupperM 1 Reply Last reply Reply Quote 0
      • CoisesC
        Coises
        last edited by

        Edit | Column Editor…

        Put the cursor at the row and column where you want to begin inserting, and fill in the dialog options as desired.

        Chuck RobertsC 1 Reply Last reply Reply Quote 1
        • Chuck RobertsC
          Chuck Roberts @Coises
          last edited by Chuck Roberts

          @Coises It seems I am unable to insert numbers followed by a period and space this way, which is required for markdown numbered lists. Text should start like this, and should only affect selected rows.

          Stuff
          More stuff
          And more stuff
          

          And end like this after inserting a number, a period, and space:

          1. Stuff
          2. More stuff
          3. And more stuff
          
          Alan KilbornA 1 Reply Last reply Reply Quote 0
          • mkupperM
            mkupper @Chuck Roberts
            last edited by

            @Chuck-Roberts said in How to insert text before every line:

            Chuck Roberts
            about an hour ago

            I have Notepad++ 8.5.7. There used to be an option to insert text before every line, such as increasing numbers before each line of text but I cannot find this anymore. This was handy for numbering each line in Markdown before I converted it to an EPUB. Each line I select should begin with a number, a period, and a space. And this should only affect lines I select.

            As @Coises noted, Notepad++ has a built-in way to insert an incrementing number but as you discovered, that feature does not have an option to append things such as a dot and space as part of inserting numbers.

            Google finds this video on youtube from 2016 where the person already had a period or dot at the start of each line and then inserted the incrementing number. The video is handy as it shows that this Notepad++ feature has not changed, nor been improved on, since at least 2016.

            If you believe that you used to automatically be able to insert numbers including the trailing dot and space then you must have used a plugin. Hopefully someone else here will recall that the plugin both existed and is still available and works.

            Mark OlsonM 1 Reply Last reply Reply Quote 2
            • Mark OlsonM
              Mark Olson @mkupper
              last edited by

              @mkupper said in How to insert text before every line:

              The video is handy as it shows that this Notepad++ feature has not changed, nor been improved on, since at least 2016.

              I’m pretty sure that AlanKilborn recently authored at least one PR that improved the incrementing number feature in the column editor. In particular, I believe that adding incrementing numbers with leading spaces/zeros has been improved recently.

              1 Reply Last reply Reply Quote 3
              • Alan KilbornA
                Alan Kilborn @Chuck Roberts
                last edited by Alan Kilborn

                @Chuck-Roberts

                If you have the Better Multiselection plugin installed and enabled…

                If you create a “column caret” (hold Shift+Alt while using arrow keys) before invoking the Column Editor, like this:

                3160e7fb-181c-4ecd-9ba9-e905a3d6bb03-image.png

                Then, after Column Editor does its work:

                c6cbd864-cca7-4bd0-94b2-208dde6f7908-image.png

                arrow to the right one time:

                e938dcee-bc58-4793-a765-2a45347d66de-image.png

                Then press period and space:

                2a923793-eb8f-4843-ae41-f00bd7d7031d-image.png


                @Mark-Olson said:

                I’m pretty sure that AlanKilborn recently authored at least one PR that improved the incrementing number feature in the column editor

                It is true, see HERE, but it would not have any impact on what @Chuck-Roberts needs to do here.

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