Using the vi editor (Short Version)

The vi editor has two modes
1) The Command mode
2) The Insert mode

with the Command mode you can move around the file with the arrow keys and you can use the del key or keys like x to delete letters.

with the Insert mode you can insert characters using the keyboard.

Note: You cannot enter any letters when you are in the command mode. You must enter the Insert mode before typing in anything.

Common Task:

Say you want to delete a particular letter or a word and then insert some other word in its place. This is what you would do

By default the vi editor starts up with the Command mode.
Move your cursor to the letter you want to delete and press ‘x’ or ‘del’ key.
This will delete the letter.
Press ‘i’ to enter into the Insert mode.
Now your keyboard can enter alphabets and numbers.
Insert the content you want.
Press ‘Esc’ key to go back to the Command mode.
Remember that to delete a letter you should go to the command mode.

Note: To Undo a particular typo or a delete, press ‘u’ in the command mode to undo. Works like any other word editor.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s