Electric Type

Multimedia

About Us

News

Help

Introduction to vi

Page 5 — Replacing Text

By now, my file looks like this:

<HTML>
<HEAD><TITLE>vi is fun!</TITLE>
</HEAD>

<BODY bgcolor="#FFFFFF" text="#0000CC" link="#CC0000" vlink="#000000">
This is a list of the crucial keys in vi. 
Remember: the escape key is your friend.
O means to go into insert tect mode one character to the right
r means to replace something
x means to delete something
E means to revert to the last saved version
I means to insert text. This is what we use to begin typing
these four keys are used in edit mode: h j k l
w means to overwrite the last version
q means to quit without changing anything
</BODY>
</HTML>

"commands.html" 17 lines, 279 characters

I've decided that the next thing I want to do is change the misspelled word "tect" into "text." I'd move up two lines (k again), and then to the right (l all the way) until the cursor was on the character c in "tect" in the following sentence:

O means to go into insert tect mode one character to the right

I'd then type r (this tells the editor I want to replace the highlighted character), and then x (to make "text"). If I wanted to change the letter c to s, I'd type r, then s. If I wanted to change it to - well, you get the picture: Type r and then the replacing character.

next page»


Dynamic HTML  

Frames  

HTML Basics  

Stylesheets  

Tables  

XML  

Javascript  

Database Connections  

Intro To Perl  

HTML 4.0  

User Blogs

Screen Shots

Latest Updates

Contact Us

Valid HTML 4.01!
Valid CSS!

Breadcrumb

© ElectricType
Maintained by My-Hosts.com
Site map | Copyright | Disclaimer
Privacy policy | Acceptable Use Policy
Legal information.