Go to the U of M home page
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

in your accounts .cshrc file.

After this takes effect, other programs which invoke editors (for example, when composing a mail message in mutt) will use your preferred editor rather than the default vi.

computing/department/unix/text.txt · Last modified: 2007/06/11 10:36 by rubin