MPE/iX Shell and Utilities Reference Manual, Vol 2

vi(1) MPE/iX Shell and Utilities vi(1)
Current Position Pointer
The current position pointer indicates a position in the text that is currently being edited (or
has just been edited). In Ex mode, the current position pointer is just the line number of the
line being edited. In Vi mode, the pointer gives this line number plus the position of the cur-
sor within the line. The line indicated by the current position pointer is always on the screen.
Display Conventions
vi uses three display conventions that should be noted.
vi displays the input for search commands (/ and ?), Ex commands (:), and system com-
mands (!) on the bottom line of the screen. Error and informational messages also appear
on this line.
If the last line in the file is above the bottom of the screen, screen lines beyond the end of
the file are displayed with a single ˜ character in column one.
In certain infrequent circumstances (usually involving lines longer than the width of the
screen), vi is unable to fill the display with complete lines. In this case, one or more
screen lines are shown with a single @ character in column one.
These lines are not part of the file content and should be ignored.
Vi Command Summary
Vi commands may be divided into several categories.
(a) Scrolling commands adjust the position of text on the screen. The current position
pointer only changes if the current line is scrolled off the screen. For example,
CTRL-E scrolls the text on the screen up one line. The cursor remains pointing to the
same text that it was pointing to, unless that text is moved off the screen.
(b) Movement commands move the cursor in the file. For example, the character j moves
the cursor down one line and the screen is scrolled only if necessary. There are two
types of movement commands: absolute movements and context-dependent move-
ments. An absolute movement moves the cursor, regardless of the nature of the sur-
rounding text; for example, j always moves the cursor down one line. A context-de-
pendent movement moves the cursor based on the nature of the text; for example, w
moves the cursor to the beginning of the next word, so it must look at the text to de-
termine where the next word begins.
(c) Manipulation commands let you change the text that is already in the file.
(d) Text insertion commands let you add new text to the existing text.
1-648 Commands and Utilities