The emacs text editor has variations that run in a text-based command shell, or in a GUI such as gnome or X windows.
emacs (filename)
Invokes emacs on the designated filename.
Unlike vi, emacs is immediately in a mode in which the text can be edited. Often the arrow keys can be used to move the cursor about, but in case your configuration does not accept the arrow key input, use the following:
Cursor Position
^A - go to the beginning of the current line.
^E - go to the end of the current line.
^N - go to the next line.
^P - go to the previous line.
^F - move forward one character.
^B - move backward one character.
Esc< - move to the beginning of the file.
Esc> - move to the end of the file.
Cut and Paste
^K - Kill (cut) line. Eack ^K removes another line from the buffer and places it on the clipboard.
^Y - Yank (paste) line(s) on the clipboard at the current cursor position.
Save and Exit
^XS - Save the file.
^X^C - Exit emacs. (If the buffer is unsaved, you will need to answer "yes" when prompted to exit without saving.)
