I'm Rituraj, a Developer @Nagarro. founder of Maddyzone. JavaScript, Angular, Node.

Buy Me a Coffee at ko-fi.com

Show and hide line number in vim

In vim by default line number are not shown so to show the line number in vim we need to set it manually also we can unset.Here i am describe how to show and hide line number in vim.

This command will not run in insert and visual mode.It will work in command mode. for command mode press ESC key then write below

Show line number in vim

:set number

Or

:set nu

Hide line number in vim

:set nonumber

Or

:set nonu

Or

:set nu!

If you want by default vim load this above setting then write in your .vimrc file

set number

Or

set nu

like as we mention on above.

Thanks!


Rituraj Ratan

I'm Rituraj, a Developer @Nagarro. Founder of Maddyzone .