Emacs Tip: Set Line Number to Start at 0

If you want line number to start at 0, put this in your emacs init file:

(setq linum-format (lambda (line) (propertize (number-to-string (1- line)) 'face 'linum)))

For detail about linum-mode feature, see: New Features in Emacs 23.

Setting line number to start at 0 is useful because some editors do that. See: bug#4274

Popular posts from this blog

11 Years of Writing About Emacs

does md5 creates more randomness?

Google Code shutting down, future of ErgoEmacs