vi - A Full Screen Text Editor
(Page 4 of 4)
Deleting, Saving and Quitting in Command Mode
When in command mode, text under the cursor can be deleted using the x key or replaced by typing r followed by the new character. There are several delete commands in vi. Text can be deleted in several ways and (remember by entering a a number before the command this command will be repeated that number of times). For example the command:
Will delete the next five words. Each of the delete commands works in a similar fashion.
vi has several modes. The command to save the file and exit is ZZ. This typing this will save your edits and exit. Additionally within the command mode typing:
will also save and exit. One can exit vi without saving changes it is accomplished by typing:
while in the command mode.
This cconcludes a very short discussion of vi editor. Reading the man pages, the info pages and practicing is one of the most effective ways of becoming comfortable with vi. It will be well worth your efforts. Additionally most Linux distrbutions has a program, vimtutor, which gives a good basic tutorial on the use of vi.
Home - Table Of Contents - Contact Us
CertiGuide to A+ (A+ 4 Real) (http://www.CertiGuide.com/apfr/) on CertiGuide.com
Version 1.0 - Version Date: March 29, 2005
Adapted with permission from a work created by Tcat Houser et al.
CertiGuide.com Version © Copyright 2005 Charles M. Kozierok. All Rights Reserved.
Not responsible for any loss resulting from the use of this site.