From the command line, you can edit with vi or vim. First
then su to become root.
to enter the editor. The most intuitive way to use vim is to enter the "insert" mode. To do this, just type i. Now use the up, down, left, right arrows to put the cursor where you want it. You can use delete or backspace and any character you type will be inserted. To leave insert mode, just pres the Esc key. To save the file (you must not be in insert mode) type
which is write quit. If you mess up and want to start over, type
which will quit the edit w/o saving.
Once you are done and you want to proof read the edit, I like to use
which will give you one terminal screen at a time view of the file. Use page up and page down to move up and down one screen. To leave less, just type q.