Add Line Number before each line in Notepad++ using Column Editor


If you have a use case wherein you want to add a line number before each line, you can do that using Column Editor in Notepad++ text Editor.

Number to Insert Notepad++

Steps:

  1. Open a file or be on the tab where you want to insert line numbers,
  2. Be at the start of the line from where you want to prefix line numbers (advance: better to do a Multi-Column Select),
  3. Go to Menu: Edit -> Column Editor,
  4. Select: Number to Insert
  5. Add: Initial number: 1
  6. Add: Increase by:
  7. Select Leading zeros if you want them.
  8. Click OK
Before:
A
B
C
D
E
F
G
H
I
J
K
After:
01 A
02 B
03 C
04 D
05 E
06 F
07 G
08 H
09 I
10 J
11 K
-


Have Questions? Post them here!

Topics Coverage:


🎉 We are celebrating the 10th years of Code2care! Thank you for all your support!

We strongly support Gender Equality & Diversity.

Follow Us: GitHub | Facebook | Twitter | Instagram