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:

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:


Getting help:

:help topic

 Some Vi  version specific information type:



 Source:Jack Vamvas(
Author: Rambler(


Verify your Comment

Previewing your Comment

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

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.


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

Comments are moderated, and will not appear until the author has approved them. | DB2 Performance Tuning | DBA DB2:Everything | FAQ | Contact | Copyright