How can we show the  line numbers using vim?

Ans : It is easy to debug problem when vim shows line numbers.

This can be done when you are in command mode. To go to command more from any mode just press esc key

Then try typing below line and then enter.

:set nu

This will set the line number

How about without  setting the number?

Means  to remove the numbers  in the file

To go to command mode from any mode just press esc key

Type below entry then press enter

:set nonu

This will remove the line numbers.

The following two tabs change content below.
Mr Surendra Anne is from Vijayawada, Andhra Pradesh, India. He is a Linux/Open source supporter who believes in Hard work, A down to earth person, Likes to share knowledge with others, Loves dogs, Likes photography. He works as Devops Engineer with Taggle systems, an IOT automatic water metering company, Sydney . You can contact him at surendra (@) linuxnix dot com.