SCS1620 Product Manual
Lightwave Communications
Page
96
www.lightwavecom.com
F.2.3 Using
vi
in Command mode
The following keyboard commands apply to
vi
in Command mode.
The cursor is moved 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)
The text within the open file is edited or changed using the following commands:
•
i
insert text before the cursor position. All existing text to the right of
the cursor is shifted to the right (not overwritten).
•
o
create a new line below the current line, and insert the text. All
existing text is shifted down and follows the text you are about
to
insert.
•
u
undo the last modification
•
x
delete the letter at the current cursor position
•
dd
delete the current line
Once all editing is complete, you must close or save the file. You must go to
"Line Mode" to accomplish this.
F.2.4 Closing a file opened in
vi
After all editing is done, enter
line mode
by typing the colon (
:
).
Use one of the following commands to work with your file as desired:
•
e <filename>
open the file named <filename>
•
w <filename>
write (save) this file with the name <filename>
Caution:
this will overwrite an existing file with that exact name
without
warning.
•
q
quit
•
q!
quit
and
disregard
changes
•
w
write the file (save it) with its existing filename
•
wq
write the file and close the file (save and quit)
•
<ESC>
go to command mode
Save and Quit =
:wq <enter>
Quit, do not Save =
:q! <enter>