February 2001
Beginner to intermediate
448 pages
9h 2m
English
The vi editor is invoked by the vi command:
$ vi filename
The editor functions in one of three modes: command mode, insert mode, and last-line mode (sometimes called single-line mode, or ex mode). When the edit session starts, vi enters command mode. Several commands can change the mode to insert mode (I, i , a , A, o, O, and so on), and one command can change the mode to last-line (:).
If the file to be edited does not exist, vi reports that it is a new file and enters the command mode of operation. The following example show the startup of a vi session involving a new file:
$ vi junk ~ ~ ~ ~ (...) "junk" [New File]
If the file exists, vi displays a screen full of data from the file—or the whole file if it is less ...
Read now
Unlock full access