Skip to main content

Show lines in Vi

To show lines in a file opened in vi, press Esc to enter Normal/Command mode and type :set number.

To make this persistent = show lines by default when you open any file, create a file called .nexrc in your home directory and put set number on the first line of it.

$ cd ~
$ touch .nexrc
.nexrc
set number