Service manual
140 Cyclades ACS 5000 Advanced Console Server Command Reference Guide
Appendix D: The vi Editor
To edit a file using the vi editor:
# vi file_name
The vi editor is a three-state line editor with command, line and editing modes. If in doubt as to
which mode you are in, press the
Esc key, which brings you to the command mode.
Use the following keys to navigate to a part of the file you need to edit.
Use the following commands to modify the text. Commands -i and -o enforce an edit mode. Press
Esc to return to the command mode.
Table D.1: vi Modes
Mode Purpose How to execute
Command mode To navigate within an open file. Press the Esc key.
Editing mode To edit text. See Table D.2 and Table D.3 for a list of
editing commands.
Line mode To open, save and do other file
manipulations.
From the command mode, type colon (:)
Table D.2: vi Navigation Commands
Command Description
h Moves the cursor to the left (left arrow).
j Moves the cursor to the next line (down arrow).
k Moves the cursor to the previous line (up arrow).
l Moves the cursor to the right (right arrow).
Table D.3: vi File Modification Commands
Command Description
i Inserts text before the cursor position (everything to the right of the cursor is shifted right).
o Creates a new line below the current line and insert text (all lines are shifted down).
dd Removes the entire current line.
x Deletes the letter at the cursor position.