OSU Computational Physics - Landau Research Group (nacse) -
Next 7.A.1: Moving in vi  Up 7: Editing Files  Prev 7: Editing Files  Contents

Basic

§ 7.A:  Starting vi


In its time, the vi editor was revolutionary because it was so visual. It is a full-screen editor, but is only one step up (in user-friendliness) from a line editor (which is some steps down below modern word processors). While vi is fairly primitive in the way you give it commands, it is also robust, fast, reliable and available on every Unix system (which you will give thanks for when your windowing system is down).

Even if you prefer to use some other editor as your workhorse, it's a good idea to learn some basic vi commands for backup purposes.

The vi editor has two basic modes:

By default, the vi editor is in command mode and returns to it after successful insertion of text.

As is true for most of Unix, vi is case sensitive. So while U and u are related, they are not the same.

Now that you understand some basic concepts of vi, let's start it up and try out some commands:

  1. Moving Around in vi
  2. Making Changes in vi
  3. Saving and Exiting in vi

Next 7.A.1: Moving in vi  Up 7: Editing Files  Prev 7: Editing Files  Contents

Comments and questions to CP-unix@physics.orst.edu.