Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

line numbers vi

Status
Not open for further replies.

buxtonicer1

Programmer
Sep 20, 2006
82
GB
In vi is there a way to have line numbers down the left hand side of the page. I know you can get the current line number by using ctrl + g
 
:set number

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
:set nonumber

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
If you want to have them turned on by default do

vi .exrc in your home dir
set nu
:wq

now everytime you start vi it will read .exrc and set nu

see man vi

Mike

"Whenever I dwell for any length of time on my own shortcomings, they gradually begin to seem mild, harmless, rather engaging little things, not at all like the staring defects in other people's characters."
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top