About the Number Lines
Numbering a list by hand goes wrong the moment you insert something in the middle. This tool prefixes every line with a sequential number, counting from whatever value you choose, followed by the separator you pick: a full stop, a closing bracket, a colon, a tab or a plain space. Tab separation is the one for a result headed into a spreadsheet, since each number then lands in its own column.
Padding is where the detail lives. Space padding aligns the numbers so the text begins at the same column on every line, which is what makes a numbered code listing readable in a code review comment. Zero padding produces fixed-width identifiers such as 001, useful for filenames that have to sort correctly as strings. The width comes from the total line count, so a nine-line list gets single digits, a ten-line list gets two throughout, and adding one more line renumbers everything.
Counting never skips, so blank lines are numbered too, and a file ending in a newline produces one extra numbered empty line at the bottom worth deleting. To take numbering off a list that already carries it, use Remove Line Numbers, and put the list through Sort Lines before numbering when the order is meant to be meaningful.
How to use
- Paste the lines.
- Set the start value, separator and padding.
- Copy the numbered list.
Common questions
- Can I start at zero or another number?
- Yes, set the start value to any number.
- How do I get 01, 02 instead of 1, 2?
- Choose zero padding; numbers are padded to the width of the largest.
- Does it renumber a list that already has numbers?
- It adds new numbers in front. Strip the old ones first with Remove Line Numbers.