Tutorial #4 - vi: inserting and changing


1. Bring up my.address in vi.  

2. Move the cursor to the very end of the work buffer and read in 

the contents of the phone.list file created in Tutorial #1 - vi.   

Bring up the status line and examine the information.

3. Use a replace command to change the last character of one 

phone number to a different digit.

4. Use a change command to replace the full name on one line of 

the telephone information.

5. Use a change command to replace the date line near the 

beginning of the file with a line containing your own area code 

and telephone number.

6. At the very end of the file, insert your current directory listing 

by running the ls command.

7. Between the address information at the beginning and the 

directory listing report that follows, insert two lines to title the 

report; insert Using vi and a primer on two separate lines.  Save 

the file as my.address .

If it doesn't work:

A.  The change commands delete the amount of text you specify; 
put $ at the end of a change command and then you automatically 
get put in insert mode.  You can type as much as you want, but 
you have to press  ESC  (The Escape key) to return to command 
mode.

B. Use :r to read in a file, ^G to bring up your status line, 
and !ls to get a directory listing.  Remember to use the long 
distance cursor movement commands to move long distances in the 
work buffer.

Questions? Robert Katz:rkatz@ned.highline.edu
Last Update July 9, 2002