Open Laboratory for Technocrats

Grab the developer role, learn concepts & prepare with senior software engineers to get solutions for problems in a software job. Coding and Programming Solutions crafted for you.

Vi/Vim Set Line Number By Default/Permanent - Ubuntu

Vim Editor
VIM Editor
Mostly every developer tries VI/VIM editor in dev lifespan.
Like other features, if you need to check the line number you need to play with the vimrc file.

Now let's explore the vimrc file, you can check the URL for more.

Now open the vimrc file by the following command:
vim ~/.vimrc
After the file is opened in the vim editor press
i
which will get you into insert mode.
Now at the end of the page put this if it's not there in the file
set number
Now save the file with the command
:wq
Now onwards the vim session will display the line numbers by default.

Keep Coding and Keep Smiling :)

Top #3 Articles

Most Read