• Login
Community
  • Login

How to insert text before every line

Scheduled Pinned Locked Moved General Discussion
6 Posts 5 Posters 3.3k 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.
  • C
    Chuck Roberts
    last edited by Chuck Roberts Oct 16, 2023, 4:17 PM Oct 16, 2023, 3:35 PM

    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.

    M 1 Reply Last reply Oct 16, 2023, 4:45 PM Reply Quote 0
    • C
      Coises
      last edited by Oct 16, 2023, 4:08 PM

      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.

      C 1 Reply Last reply Oct 16, 2023, 4:15 PM Reply Quote 1
      • C
        Chuck Roberts @Coises
        last edited by Chuck Roberts Oct 16, 2023, 4:15 PM Oct 16, 2023, 4:15 PM

        @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
        
        A 1 Reply Last reply Oct 16, 2023, 7:57 PM Reply Quote 0
        • M
          mkupper @Chuck Roberts
          last edited by Oct 16, 2023, 4:45 PM

          @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.

          M 1 Reply Last reply Oct 16, 2023, 7:13 PM Reply Quote 2
          • M
            Mark Olson @mkupper
            last edited by Oct 16, 2023, 7:13 PM

            @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
            • A
              Alan Kilborn @Chuck Roberts
              last edited by Alan Kilborn Oct 16, 2023, 8:26 PM Oct 16, 2023, 7:57 PM

              @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
              4 out of 6
              • First post
                4/6
                Last post
              The Community of users of the Notepad++ text editor.
              Powered by NodeBB | Contributors