Vi display line number
![Vi display line number](/content/images/size/w2000/2020/03/vim.jpg)
Quite a few times its been useful to see the line number while editing a file. Easily done too :')
Heres our poor file without an line numbering.....
![](https://www.m00nie.com/content/images/2020/03/viwithoutlines-1.jpg)
Now we use the command
:set number
(the colon is needed too)
and it gives us this :)
![](https://www.m00nie.com/content/images/2020/03/viwithlines.jpg)
You can revert to no lines again by using
:set nonumber
(again notice the colon is part of the command)
Opening a file with line numbers showing by default can be do with creating or adding to a file ~/exrc and adding the line
set number
Have fun!