Solaris Advanced User's Guide

Creating a File

Start vi and edit the file paint as shown in this example:

$ vi paint

If paint already exists, vi opens the existing file. If this is a new file, vi creates it. For the purposes of this example, paint should be a new file.

The vi editing screen appears in a moment:

Figure 6–1 vi Editing Screen

The following context describes the editing screen.

The cursor appears in the upper left corner of the screen. Blank lines are indicated by a vertical series of tildes (~).

Note that you can also start vi without specifying a file name by just typing vi. You can then name the file later when you exit vi.