vi line numbers

Emergency forum when Opus is down

vi line numbers

Postby juliana cheng on Wed Nov 27, 2013 5:27 pm

This should be posted as new topic but I did not see one...

How do I get to add or set the line numbers in vi? I got two error messages on line 91 and 119 and I have no idea where those lines are to go there to edit
-juliana
juliana cheng
 
Posts: 15
Joined: Wed Nov 27, 2013 4:15 pm

Re: vi line numbers

Postby Rich Simms on Wed Nov 27, 2013 6:46 pm

I split your post off to a new topic.

You could Google "vi show line number" or ...

Method 1:
Go into COMMAND mode ([b]<Esc>[/b]) and then the line/column number of the cursor position is displayed on the bottom line:
[code]"myscript" 118L, 3786C 3,7 Top[/code] indicates the cursor is on Line 3, column 7.

Method 2:
Go into Command LINE mode ([b]<Esc>:[/b]) and enter the [b]set nu[/b] command to enable line numbers or [b]set nu![/b] to disable line numbers.

- Rich
User avatar
Rich Simms
Site Admin
 
Posts: 640
Joined: Thu May 15, 2008 2:44 pm


Return to Temporary CIS 90 - Fall 2013

Who is online

Users browsing this forum: No registered users and 0 guests

cron