Info Node: (efaq)Displaying the current line or column
(efaq)Displaying the current line or column
How do I make Emacs display the current line (or column) number?
================================================================
To have Emacs automatically display the current line number of the
point in the mode line, do `M-x line-number-mode'. You can also put the
form
(setq line-number-mode t)
in your `.emacs' file to achieve this whenever you start Emacs. (Line
number display is on by default, unless your site-specific
initialization disables it.) Note that Emacs will not display the line
number if the buffer's size in bytes is larger than the value of the
variable `line-number-display-limit'.
As of Emacs 20, you can similarly display the current column with
`M-x column-number-mode', or by putting the form
(setq column-number-mode t)
in your `.emacs' file.
The `"%c"' format specifier in the variable `mode-line-format' will
insert the current column's value into the mode line. See the
documentation for `mode-line-format' (using `C-h v mode-line-format
<RET>') for more information on how to set and use this variable.
Users of all Emacs versions can display the current column using the
`column' package written by Per Abrahamsen <abraham@dina.kvl.dk>.
Note:Packages that do not come with Emacs, for instructions on how
to get it.
None of the `vi' emulation modes provide the "set number" capability
of `vi' (as far as we know).