LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   how to show line number with vi (https://www.linuxquestions.org/questions/linux-newbie-8/how-to-show-line-number-with-vi-4175475112/)

ust 08-29-2013 01:36 AM

how to show line number with vi
 
I know when use vi to read file , it can show the line number at left hand side , can advsie how to make it ?

thanks

astrogeek 08-29-2013 01:38 AM

Code:

:set number

To disable...

:set nonumber


ust 08-29-2013 01:51 AM

thanks

shivaa 08-29-2013 02:07 AM

You can also show line numbers using:
Code:

:se nu
To stop this:
Code:

:se nonu

ust 08-29-2013 02:07 AM

thanks

pan64 08-29-2013 02:35 AM

and also you can set default in ~/.vimrc if you would like to do so.
(just insert that command into that file)

Oh yes, and please press YES if you really want to say thanks


All times are GMT -5. The time now is 03:20 PM.