How To: Vim show line numbers by default on Linux

How To: Vim show line numbers by default on Linux

To show line numbers in Vim by default on Linux, you can add the following line to your ~/.vimrc configuration file:

re‮‬fer to:lautturi.com
set number

This will enable line numbering every time you start Vim.

Alternatively, you can also enable line numbering within Vim by using the :set number command. This will enable line numbering for the current session only.

You can also customize the formatting of the line numbers by using the 'number' option. For example, to set the line number format to 'nnn. ', you can use:

:set numberformat=nnn.

You can find more information about line numbering in Vim in the Vim documentation by typing :help number within Vim.

Created Time:2017-10-29 22:08:35  Author:lautturi