Vim is one of the most commonly used editors in all Linux based systems. Home users and Server administrators both use the Vim editor to create/edit files. If you have ever edited a large file with Vim then you probably have faced the problem of finding some particular line number. Let me share an easy way to display the line number count in Vim.
In order to make this setting active, we will need to make some small change in the configuration file of the Vim editor. You can find the configuration of Vim in the /etc/vim directory with the name vimrc. Open this file by running the following command in the terminal:
sudo gedit /etc/vim/vimrc
Once the file is opened, navigate to the end of the file and add the following:
That’s it, now whenever you will open any file with the Vim editor you will see the line count.