Computing.Net > Forums > Unix > VI line number

VI line number

Reply to Message Icon

Original Message
Name: jb60606
Date: July 24, 2006 at 12:27:52 Pacific
Subject: VI line number
OS: Sun Solaris 10
CPU/Ram: Opteron
Model/Manufacturer: Sun
Comment:

No, this isn't about applying line numbering to the left margin of VI.

I recall being able to get a simple line number, at the bottom of my vi editor, that told me which line I was presently working on.

Is there any way to re-activate that feature, or was it only native to older releases...

thanks


Report Offensive Message For Removal


Response Number 1
Name: Vertabreaker
Date: July 25, 2006 at 08:01:14 Pacific
Subject: VI line number
Reply: (edit)

Hi,

Did you try CTRL-G?

~Regards

Verta


Report Offensive Follow Up For Removal

Response Number 2
Name: jb60606
Date: July 25, 2006 at 08:49:48 Pacific
Subject: VI line number
Reply: (edit)

eh, that's handy, though not quite the same thing.

Anyways, I just discovered it's standard on all of our Linux boxes. In the lower right hand corner of the vi window, it tells you the exact line & character number you're on.


Report Offensive Follow Up For Removal

Response Number 3
Name: Vertabreaker
Date: July 25, 2006 at 08:51:48 Pacific
Subject: VI line number
Reply: (edit)

Cool. Glad ya found it :)


Report Offensive Follow Up For Removal

Response Number 4
Name: jb60606
Date: July 25, 2006 at 11:04:15 Pacific
Subject: VI line number
Reply: (edit)

thanks. Just wish there was a way to get it on our solaris 10 boxes.


Report Offensive Follow Up For Removal

Response Number 5
Name: lchi2000g
Date: July 25, 2006 at 11:25:11 Pacific
Subject: VI line number
Reply: (edit)

If you do the following on Linux:

$ type vi
vi is aliased to `vim'

vim will display the cursor line # you want, but /bin/vi will not.

vim can be downloaded from http://www.vim.org/download.php.

(The alias on linux is defined in /etc/profile.d/*, like vim.sh, vim.csh)


Luke Chi


Report Offensive Follow Up For Removal







Use following form to reply to current message:

   Name: From My Computing.Net Settings
 E-Mail: From My Computing.Net Settings

Subject: VI line number

Comments:

 


  Homepage URL (*): 
Homepage Title (*): 
         Image URL: 
 
Data Recovery Software




How often do you use Computing.Net?

Every Day
Once a Week
Once a Month
This Is My First Time!


View Results

Poll Finishes In 3 Days.
Discuss in The Lounge