Editors
emacsA commonly used editor on the UNIX machines is called GNU Emacs . Being able to use the emacs editor effectively will help you write your programs, find errors, and correct them more efficiently. Also, the conventions you learn to use with Emacs can be applied to other programs, such as browsers and command-line editing.
Many people like to use xemacs, which is closely related to emacs.
Emacs provides its own tutorial, which is highly recommended. At the unix prompt type emacs to enter the editor. Once in emacs, press Ctrl-h and then t for the tutorial (or use the menu options if Control-h has already been redefined...Help-->Tutorial).
emacs References:
- emacs wiki
- A pdf of emacs commands (good for printing!)
- Very basic emacs commands (good for starting emacs)
- More extensive list of emacs commands (to get more advanced)
- An emacs reference page
vi
Another editor, useful because it is found on all UNIX
machines, is vi. Run man vi for more information. One way that
Where to get more vi information:
LaTeX
Where to get more latex information:
UNIX uses the EDITOR and VISUAL environment variables
to determine your default editor. For example, when using mutt or pine,
when you get to the part where you type in your mail message, they will start
up your default editor.
To see what your default editor is set to, try this:
If you want to change these, try this (from the bash shell):
If you want to change these permanently, edit your .profile file.
Changing your default editor
$ echo $EDITOR
vi
$ echo $VISUAL
vi
$ export EDITOR=vim
$ export VISUAL=vim