Like this CertiGuide? Get it in PDF format!
Click Here!

Custom Search







Table Of Contents  CertiGuide to A+ (A+ 4 Real)
 9  Chapter 5: The Linux Operating System
      9  Basic Concepts and Procedures for Creating, Viewing and Editing Files and Directories
           9  Common Commands

Previous Topic/Section
jobs - List Jobs that are Running from the Current Shell
Previous Page
Pages in Current Topic/Section
12
3
4
Next Page
Meta Characters
Next Topic/Section

vi - A Full Screen Text Editor
(Page 3 of 4)

Cursor Movement



With Vim in Linux, the arrow keys will move the cursor around the screen. Entering a number before depressing the arrow key will cause arrow key to be repeated that many times. So 5-left arrows would move the cursor five spaces to the left. When the vi was written, terminals at that point in time did not have arrow keys (or a mouse either) so the h, j, k and l keys work just like the arrow keys as shown by table X. To maintain compatibility with the original version of vi, vim also supports this functionality of those keys when in the command mode, in insert modes those keys merely enter the character associated with each key.

There are several commands, which will move the cursor around the file. Learning these commands will speed your ability to move around the file under edit and in the non graphical interface. Individual keys can move you from the beginning of the file to the middle of file to the end of the file or to the top of the screen to the middle of screen or to the bottom a screen.

Adding Text in Insert, Append and Open Modes

There are several insert modes within vi, however, only four of them will be dealt with here: In command mode and pressing i will start insert mode immediately under the cursor. Text can then be entered as necessary.

Insert mode is terminated by pressing <esc> and the editor will return to command mode.

Append mode is entered the by pressing the a key, which will start text entry at the character position immediately following the cursor.

Two other important insert modes are what are known as open modes which are the o and the O keys. The lowercase o will cause an empty line to be inserted immediately below or after the current line, the cursor will be moved to the beginning of that line and text entry will start there. The uppercase O will open an empty line above or before the current line and start text entry at the beginning of this line. Again all insert modes can be exited by pressing the <esc> key to return to command mode.


Previous Topic/Section
jobs - List Jobs that are Running from the Current Shell
Previous Page
Pages in Current Topic/Section
12
3
4
Next Page
Meta Characters
Next Topic/Section

If you find CertiGuide.com useful, please consider making a small Paypal donation to help the site, using one of the buttons below. You can also donate a custom amount using the far right button (not less than $1 please, or PayPal gets most/all of your money!) In lieu of a larger donation, you may wish to consider buying an inexpensive PDF equivalent of the CertiGuide to A+ (A+ 4 Real) from StudyExam4Less.com. Thanks for your support!
Donate $2
Donate $5
Donate $10
Donate $20
Donate $30
Donate: $



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.