How to show line numbers in vim

To display line numbers in vim, use the set number command.

:set number

To turn off line numbers in vim, use the set number! command.

:set number!

Comments