Vi : modes,open,quit ,help

07 April,2011 by Tom Collins

The text editor vi is either in insert mode or normal mode .

Insert mode – allows the user to type text into the document

Normal mode – keystrokes are commands controlling an edit session

 To enter Vi type:

 vi FILENAME
 
The filename can be an existing file or a file you want to create 

Vi has two modes: Normal (command) mode and edit mode.

 Switch to normal mode:     <ESC>
 Switch to edit mode:       i or a

Getting out of Vi (change to normal mode <ESC>):

 Exit Vi:                       :q
 Exit Vi (ignore changes):      :q!
 Save:                          :w
 Save and Exit:                 :wq

Switch to (edit) an other file:

:edit FILENAME

Getting help:

:help topic

 Some Vi  version specific information type:

 Vi

 Vi

 Source:Jack Vamvas(http://www.dba-db2.com)
Author: Rambler(http://www.dba-db2.com)

Share:

Verify your Comment

Previewing your Comment

This is only a preview. Your comment has not yet been posted.

Working...
Your comment could not be posted. Error type:
Your comment has been saved. Comments are moderated and will not appear until approved by the author. Post another comment

The letters and numbers you entered did not match the image. Please try again.

As a final step before posting your comment, enter the letters and numbers you see in the image below. This prevents automated programs from posting comments.

Having trouble reading this image? View an alternate.

Working...

Post a comment on Vi : modes,open,quit ,help

Comments are moderated, and will not appear until the author has approved them.


dba-db2.com | DB2 Performance Tuning | DBA DB2:Everything | FAQ | Contact | Copyright