Previous topic |
Next topic |
Contents |
Contact z/OS |
Library |
PDF
A simple vi session z/OS UNIX System Services User's Guide SA23-2279-00 |
|||||||||||
This information shows you how to edit a simple text file. Try
it to get the feel of using vi. You can
edit the text file:
which is supplied
as part of the z/OS® shell.
It is in the directory /samples. To do this, copy this file
to current working directory:
Now, begin your vi session by typing:
vi clears
the screen, then displays the contents of the file. , vi also
displays:
This
tells the name of the file being edited and how big it is.The cursor is positioned at the beginning of the file. These keys
let you position the cursor anywhere on any line in the file:
Note: The arrow keys do not work on all terminals.
To experiment a bit more, move the cursor to the beginning of the first line in the file, then press 5 followed by →. You do not see the 5 displayed anywhere—but when you press →, you see the cursor move five characters to the right. As a general rule, when you type a number followed by an action, vi repeats the action that number of times. By the way, ask yourself if you are in Insert Mode or Command Mode. You must be in Command Mode because the characters you type (for example, the 5) do not appear on the screen. When you start a vi session, you always begin in Command Mode. |
Copyright IBM Corporation 1990, 2014
|