To edit and save a file with the vi editor.
*************************************************************************************
>vi filename ------- this command will open the file for editing. If the file does not exist it will create a new one.
The VI editor works in modes and to edit the file you need to go to the insert mode. To do this press i
This should enable you to edit the file by typing in stuff. When you are done making changes to the file you can save
the file using the following sequence of keys esc, :, wq, enter
This should save the file and exit.
*************************************************************************************
For a terse and neat :) description of vi go here This was from the colorado math institute.
The VI reference card can be found here.