|
 |
|
The vi Text Editor
Oracle Database Tips by Donald Burleson |
The text editor
vi, pronounced ?vee-eye,? can be called from the command line,
and it stays on the command line. This powerful editor is easy to use,
but it is not intuitive. You must know the commands to make it work or
at the very least know how to look them up. Pointing and clicking will
get you nowhere. Fortunately, just memorizing a few basic commands
will make it quite useful.
In Fedora Linux, the original
vi has been replaced with
?vi improved,? launched on the command line with
vi or
vim. The syntax to open a
file in the vim editor is vi
</path/filename>. If the file exists, it will open that file; if it
does not exist, it will create the file. If you do not name a file,
the editor will run without editing a named file until what has been
created is saved.
The vieditor utilizes three modes: command mode, edit
modeand ex mode. Open the editor with
the vi command to begin in
the command mode. In this mode, the editor can be given commands that
it will follow such as write (:w), quit (:q), quit without saving
(:q!), replace (:R), or find (:/<text_to_find>). Most important of all
are the commands help (:h) and help about a particular subject (:h
subject).
To enter the edit mode,
you can press the ?i? key to begin inserting text or the a key to
append text. Type in the text desired. The up, down, left and right
arrows will work as expected. Exit the edit mode by pressing [Esc],
and you are ready to type a command for
vito respond to.
Vi's ex mode
(extended mode) is beyond the scope of this book. For more information
on vi,
visit the vim website at
http://www.vim.org.
 |
If you want to learn RAC at home, get the bestselling book "Personal
Oracle Real Application Clusters" by Edward Stoever.
You can buy it direct from the publisher for 30%-off and get
instant access to the code depot of Oracle tuning scripts. |
|