Vim has the ability to display line numbers on the left side of the text, but normally is not enabled by default.
You can set Vim to display line number by following any of the following methods;
While in Vim, press the
ESC key to get into command mode.
Type the following to enable line numbering, followed by
Vim will now display the line number on the left side of the texts.
To disable it, just type the following, also while in command mode, followed by
and the line number is gone.
To make the setting permanent, add the following line to
~/.vimrc using your favorite text editor
Vim will read the configuration file every time it's started, and will display the line numbers.
Share your thoughts, suggest corrections or just say Hi. Login not required.