Modes of Operation

Modes of Operation

vi doesn't use the function keys much, which will probably confuse those of you coming in from the commercial word processing world. Virtually all of the vi features are accessed via some combination of the normal alphanumeric keys. vi uses modes to distinguish between the times a key will just put a letter on the keyboard and the times a key will invoke some other vi function.

In edit mode (reached from command mode by typing one of the following; a, i, A, I, o, O ), whatever you type in will appear on the screen.

In command mode, (reached from edit mode by pressing the <Esc> key), the various keys have a confusing variety of functions.

Whatever mode you're in, it is probably wrong. Try hitting the <Esc> key. If that doesn't work, try i (for insert).

Another very common mistake is leaving your caps lock on. Since uppercase and lowercase characters may have very different functions in command mode, you can mess up a file in a hurry just by hitting that one key. After a while you get to where you recognize the symptoms, but when you're just getting started it can be confusing just something to keep in mind.

 



Linux Desk Reference
Linux Desk Reference (2nd Edition)
ISBN: 0130619892
EAN: 2147483647
Year: 2000
Pages: 174
Authors: Scott Hawkins

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net