Emacs: linum mode 👎
linum-mode (obselete)
linum.el
is from
Emacs 23.1 (released 2009-07).
It's a hack, and slows your emacs into a crawl if you have a thousand lines.
linum.el is obselete as of Emacs 29 (Released 2023-07)
- Alt+x
linum-mode
- toggle line number in current.
- Alt+x
global-linum-mode
- toggle line number in all buffers.

To set it permanetnly, put this in your Emacs Init File:
(global-linum-mode 1)
How to Set Linum Line Number to Start at 0
If you want line number to start at 0, put this in your Emacs Init File:
(require 'linum) (setq linum-format (lambda (line) (propertize (number-to-string (1- line)) 'face 'linum)))
Setting line number to start at 0 is useful because some editors do that. See: bug#4274.
Author
linum-mode is written by Markus Triska. Thanks Markus.
http://stud4.tuwien.ac.at/~e0225855/index.html