(Sorry, resend 'cause the mail server doesn't like HTML.)
Russell Bateman wrote:
cw means "change the word from where the cursor is when you type it to
the end of the word. What you type ends when you press escape just as
if you were exiting insert mode (here, you are exiting change mode).
A word is usually a token in the language of the file you are editing.
cW does the same thing, but the word becomes from the cursor to the
end of the word defined as being until the next white space.
Similarly, and because you haven't found a book on vi to read yet, 2cw
or 10 cw, etc. will replace 2 words or ten words with what you type
before hitting escape.
cl is the letter oriented equivalent to cw. 3cl means change the
current and next two letters.
That should get you going. The c command combination is one of the
most powerful and useful metaphors in vi, something I have never seen
in any other editor and one of my favorite reasons to use vi (or Vim
as the case may be).
linda.s wrote:
I read the help file of "cw" but really can not understand what it means.
I use "/" to get the word i want to replace, then no matter i type :cw
or cw, unexpected results show.