Vi has 2 modes: insert and command. When you initially enter vi, you will be in command mode. Command mode is used for moving the cursor within a file and for everything else except for entering text. The insert mode is used for entering text. From command mode, typing the command ``i'' will put you in insert mode. To return to command mode, press the escape key.
Moving the cursor requires the use of the h,j,k,l keys, as is illustrated below. Use of the arrow keys from within vi is not recommended.
The program ``vitutor'' contains a short tutorial that will help you learn vi. To execute this program, type vitutor. To leave the program, type ZZ (Capitalized).