How to display line numbers in vim using .vimrc file

w‮ttual.ww‬uri.com
How to display line numbers in vim using .vimrc file

To display line numbers in vim using the .vimrc file, you can add the following line to your .vimrc file:

set number

This will enable line numbering whenever you open vim.

To disable line numbering, you can add the following line to your .vimrc file:

set nonumber

This will disable line numbering whenever you open vim.

The .vimrc file is a configuration file that is read by vim when it starts up. You can use the .vimrc file to customize various aspects of vim, including line numbering.

To edit the .vimrc file, you can use a text editor like nano or vi. For example, to edit the .vimrc file with nano, you can use the following command:

nano ~/.vimrc

This will open the .vimrc file in the nano text editor. You can then edit the file and save your changes.

Created Time:2017-10-28 21:39:02  Author:lautturi