vi Changing Text

Insert Mode--Changing and Replacing Text
In command mode, you can delete, copy, and paste text. But, to actually edit text, you'll have to change to insert mode. There are quite a few ways to do this.

Lesson 4 | Lesson 6

Change or Replace Text Commands
cs change a word from cursor position in the word
c$ change the line up to point of wrap to next line
r replace the character under the cursor
R replace text on the line where you placed the cursor

Use these keys while in command mode.  You will be taken to insert mode to make edits until you hit the Escape key.  The exception is the “r” command that will replace the letter with the next one you type.
To change or replace more than one word or character at a time, you can use the "force multipliers". For example, if you want to change six words, type "6cw" as your command.

Insert Mode--Adding and Inserting text
i insert text to the left of the cursor
I capital I will move the cursor to the beginning of the line to change text fro there
a Move cursor one position to the right before beginning insertion of text
A Move cursor to the end of the line to insert text from there
o open a new line below the current one to enter text on that line
O current line is dropped down to insert a line above the old line

vi Insert Mode

What insert mode looks like. . . note the lower left hand corner shows you.



Copyright CyberMontana Inc. and
All rights reserved. Cannot be reproduced without written permission. Box 1262 Trout Creek, MT 59874