School of Physics & Astronomy
School of Physics and Astronomy Wiki

### User Tools

computing:department:unix:text

# Text File Editing

Several editors are available, including vi, emacs, XEmacs, nedit, and pico. If you are using an X-windows (graphics) terminal, We recommend two editors: NEdit and XEmacs. NEdit is probably the simplist one to start with.

To edit a text file, type the name of the editor you want followed by the name of the file. For example:

nedit letter.txt

If the file is found in the current directory, the editor will open it for editing, otherwise it will create a new file.

For more advanced users, xemacs is a powerful editor with many features, such as special formatting of programming languages.

Users who are used to the traditional Unix editor vi may like to try an enhanced version, vim (or gvim for the graphical version).

## Setting a default editor

You can set the default editor for your account by setting the environment variable EDITOR. For most users, the correct way to do this is to add the line (for example):

setenv EDITOR nedit