vim Viewing line numbers


Example

To view line numbers from Default view enter

:set number

To hide line numbers

:set nonumber

There is also a shortcut for above. nu is same as number.

:set nonu

To hide line numbers, we can also use

:set nu!