Notepad++ add number in each line

Notepad++

Notepad++ Problem Overview


I have the following data in a text file

p=1
p=1
p=1
p=1

etc. I open that file in Notepad++.

How would I change it to

p=1
p=2
p=3
p=4

etc.

Notepad++ Solutions


Solution 1 - Notepad++

You can use the "Column Editor" mode. First, select the column you want by holding Alt and dragging down the column. Then go to "Edit->Column Editor", you will get a box that looks like this:

enter image description here

Choose the "Number to Insert" button, then choose the starting value and the increment. It will replace the column with the values you want.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionEhsan MohammadiView Question on Stackoverflow
Solution 1 - Notepad++darthbithView Answer on Stackoverflow