How to insert text before every line
-
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.
-
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.
-
@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
-
@Chuck-Roberts said in How to insert text before every line:
Chuck Roberts
about an hour agoI 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.
-
@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.
-
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:
Then, after Column Editor does its work:
arrow to the right one time:
Then press period and space:
@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.