To start vi just type vi at the operating system prompt.
You will see a screen with a column of tildes (~) down the
left side of the screen. This signifies an empty workspace.
To edit a file, just include the filename after it, e.g. vi
filename. You will see the text of the file you
Vi is now in command mode. The most basic command to enter
insert mode is i which lets you insert text to the left of
I begin with a brief description of the insert mode because it is very
straight forward. In insert mode the characters you type are inserted
into your document. You can use the backspace key to delete any typing
mistakes you have made on the current input line. The escape key
(<esc>) takes you out of insert mode and back to the command mode.
If you are ever in doubt about what mode you are in, just press
<esc> a few times until vi starts complaining.
You will then know that you are in the command mode.
Command mode is where you do everything that isn't done in insert mode.
In command mode the same keys that caused letters to appear on your
screen in insert mode now represent
totally different functions. Rather than go into a detailed discussion of
the 100 or so commands, this section contains a list of the more popular
commands. A more comprehensive list of vi commands may be found
in the Vi reference section.
1 If the file does not exist, it will be
Find this site useful? Want to give something back?
© 1993-2000 Christopher C. Taylor