Vim can output the number of each line on the left side of the screen. Questions about customizing this behavior.

Interesting related help topic: