
SCSxx05/SCSxx20 User Guide A: Unix Command Help
A-4
If you are not sure which mode you are in at any time, press Esc, which returns
you to the command mode. A summary of the modes and some vi commands
follows.
Using vi in Command Mode
The following keyboard commands apply to vi in command mode.
Move the cursor within the open file using the following position commands:
h Moves cursor to left (left arrow).
j Moves cursor to next line (down arrow).
k Moves cursor to previous line (up arrow).
l Moves cursor to right (right arrow).
Edit the text within the open file using the following commands:
i Inserts text before the cursor position. All existing text to the right of the
cursor shifts to the right (and is not overwritten).
o Creates a new line below the current line, and inserts the text.
All existing text shifts down and follows the text you are about to insert.
u Reverts to the previous text (“undo”).
x Deletes the letter at the current cursor position.
dd Deletes the current line.
Once you have completed all editing, you must close or save the file in line
mode.
Closing a File Opened in vi
After you are done editing, enter line mode by typing the colon (:). Use one of the
following commands to work with your file as desired:
e <filename> Opens the file named <filename>.
w <filename> Writes (saves) this file with the name <filename>.
Note: This will overwrite an existing file with that exact name
without warning.
q Quits.
q! Quits and disregards changes.
w Writes the file (saves it) with its existing filename.
wq Writes the file and closes the file (saves and quits).
<ESC> Goes to command mode.
Save and Quit = :wq <enter> Quit, do not Save = :q! <enter>
Comentários a estes Manuais