Vi Vi Vi is a small, compact, powerful editor. It is worth your time to learn and use vi, especially if you plan on writing a lot of code. Since vi is such a compact editor, it responds much faster on an overloaded system than larger editors such as emacs. It is only necessary to learn a small subset of the vi keystrokes to use vi swiftly and efficiently. To start vi, type vi filename in any shell window.
Command mode is the default mode, and is used to enter commands to manipulate and move the text.
Insert mode is used to actually enter text into the file. Pressing 'i' while in Command mode will allow you to insert text before the cursor. Manuvering Use the arrow keys to manuver while in either Command or Insert mode.