To move the cursor around the document, you can use the arrow keys, or h, j, k, and l, for left, up, down, and right, respectively.
To begin typing text, press a to append after the cursor, or i to insert before the cursor. When done typing, press the Esc key to go back to command mode, in which you can preform all the commands you want. One useful command is :set showmode, which will display the current mode in the lower right-hand corner.
To delete a character, hit x for after the cursor, or X for before the cursor. To delete a whole word, press dw. To delete a line, use dd. To replace a character, use r.
To search your document, type ?whatyouaresearchingfor to search backwards, or /whatyouaresearchingfor to search forwards.
When you're done editing the file, you can type ZZ to save the file and then quit. :w will save your file without quitting, and :q! will quit without saving any changes.
These are just a few of the VI commands that I often use. To unleash more of its surprising power, check out a VI command reference like http://www.cs.wustl.edu/~jxh/vi.html or http://www.eng.hawaii.edu/Tutor/vi.html
Go To Page: 1