Simple documents, some data files, and source codes for FORTRAN and C
programs are written as ASCII text files. This requires an ASCII
editor. Three commonly used such editors are:
- vi, an all-purpose screen
editor which comes standard with all UNIX implementations. This
is a fairly powerful editor, but its syntax is rather awkward.
Nevertheless, some UNIX users are reputed to like it. The
"vim" editor is an improved version of vi.
- emacs, a very powerful editor
available at many UNIX sites and standard on Linux. It was
written by the GNU organization and is therefore free
software. Among its many capabilities are:
- full X-window support, including all the mouse
functions available under textedit.
- the ability to handle multiple files in multiple
buffers, with split-screen and multi-window display.
- intelligent file-, buffer-, and command-completion.
- memory of all commands issued since the editing
session started, and the ability to undo or modify
arbitrarily many previous commands (vi
can undo only the last one or few commands).
- support for many different ``modes'', e.g. TeX,
Fortran, C,..., allowing the user to customize each.
- the capability of opening a UNIX shell within a
buffer, so that all output is automatically captured
and is immediately available for editing.
- automatic backups of all open files, and the
ability to recover files after (e.g.) a system crash.
- potential for virtually unlimited customization
via Lisp-language macros.
Many professional programmers never leave emacs
once they have started it up! On newton you
invoke emacs by typing
emacs fname &
where fname is optional and & runs the editor in the
background. (Tasks in UNIX can be run in foreground, e.g. in an
xterm window, or in the background, effectively
disconnected from any other window.)
Because of its many different capabilities, learning
emacs requires substantially more time
than textedit or vi. If your editing
requirements are simple, then emacs may be more
than you really need.
Any editor can be used to prepare any ASCII document. It is a
matter of choice as to which one you use. Can you guess which one I