The c command is similar to d, except it toggles vi into Insert Mode, allowing the original (unwanted) text to be changed to something else.
For example, put the cursor on the beginning of a word (press w to get to the beginning of the next word). Then, press cw to change that word.Here i want to change if to while
Step 1: put the cursor on the beginning of a word
Step 2: press cw
Step 3: type while
Some other commands:
cw : Change current word
cc : Change current line
5cc : Change five lines (current and next four)
c$ : Change to end of line
c30G : Change from the current line to and including Line 30
cG : Change from curernt line to and including last line