Cadmeo

Add Line Numbers

Numbered

Line numbering runs down the left of your text, and you control what it looks like: where it starts, how far it counts, what sits between the number and the line, and whether numbers are padded with leading zeros so the text stays aligned.

How it works

Padding width is calculated from the highest number that will actually appear, not from a fixed guess. A 9-line list pads to one digit and a 90-line list pads to two, so the text after the numbers lines up in a monospaced font without you specifying a width.

  • Start at any number, which matters when you are continuing a numbered list from an earlier document.
  • Count by any step. A step of 10 gives the 10, 20, 30 style that old BASIC listings used so lines could be inserted between.
  • Six separators, including a tab for pasting into a spreadsheet as two columns.
  • Blank lines can be skipped, so a numbered paragraph list does not waste numbers on the gaps between paragraphs.

The numbers become part of the text. That is the point. It is for pasting somewhere that has no line numbering of its own, unlike a code editor.

Examples

A simple numbered list

Lines

Gather the requirements / Draft the schema / Review with the team

Result

1. Gather the requirements
2. Draft the schema
3. Review with the team

Default settings: start at 1, count by 1, a full stop and a space after the number.

Zero padding keeps text aligned

Lines

12 lines

Padding

On

Result

01. first
02. second … 12. twelfth

Padded to two digits because 12 is the highest number used. Without padding, line 1 and line 12 start their text at different columns.

Counting by ten

Start

10

Step

10

Result

10. first
20. second
30. third

Leaves room to insert lines later without renumbering, which is exactly why line-numbered BASIC used this convention.

Frequently asked questions

Can I number only the non-blank lines?

Yes, turn on "skip blank lines" and blank lines pass through untouched while the count continues on the next line with content. That is what you want for a numbered list of paragraphs separated by blank lines.

Why do the numbers sometimes have leading zeros?

Only when you turn padding on. It pads to the width of the highest number that will appear, so a list of 12 lines pads to two digits. In a monospaced font this makes the text after the numbers line up in a single column.

Can I remove line numbers with this?

No, it only adds them. To strip numbers from a numbered list, use find and replace with a regular expression such as ^\d+\.\s* matching the start of each line.

How do I get the numbers into a spreadsheet as a separate column?

Choose the tab separator. Pasting tab-separated text into a spreadsheet puts the number in one cell and the line in the next, because a tab is the delimiter spreadsheets expect from the clipboard.

How is this different from the list operations tool?

List operations numbers lines as one step in a pipeline that also sorts, shuffles and deduplicates, with no control over the format. This does one thing and exposes the start, step, separator and padding.