VI is a great command line editor, once you get the hang of the commands. Here's a cheat sheet that has helped me a lot.

http://www.lagmonster.org/docs/vi.html