How to display line numbers in Vi and Vim


If you're using Vi/Vim editor on linux consolue maybe you would like to display line numbers. Here is solution how can you display lines in this great editor.



If you would like to display line numbers in Vi/Vim you have to type following line in editor:

:set number

If you want to set that VI always display line numbers while you edit your file, you have to add following line to you ~/.vimrc file:

set number

 




  Article "tagged" as:
  Categories: