Emacs Init: Show Line Numbers

By Xah Lee. Date: . Last updated: .

Display Line Numbers Mode

New in Emacs 26 (Released 2018-06) .

Alt+x global-display-line-numbers-mode
show line numbers in all buffers.
Alt+x display-line-numbers-mode
show line numbers in current buffer.
global-display-line-numbers-mode 2020-12-04
M-x global-display-line-numbers-mode

Put this in your Emacs Init File:

(global-display-line-numbers-mode)

They are written by Eli Zaretskii. Thank you Eli.

Jump to a Line Number

Alt+x goto-line
move cursor to a given line position.

Emacs Lines, Column, Cursor Position

Soft-Wrap Lines

Reformat Lines (Hard-Wrap)

Show Line Number, Column Number

Highlight Current Line, Screen Line