Main index

Introducing UNIX and Linux


Getting started

Overview
Using UNIX
      Usernames
      Logging in
Logging out
Commands
      Typing in commands
      Commands and options
Communication with other users
      Email
      Other communication facilities
Files
      The editor Vi
            Vi commands (command mode)
            Vi commands (colon mode)
      Other editors
Input and output
      Scripts
      Here-documents
      Pipes
      Making copies of input and output
      Pagers
Emergencies
Getting help
Summary
Exercises

Other editors

Another text editor that is in common use is Emacs (Emacs is not POSIX), and is invoked with the command emacs. The Emacs and Vi editors differ greatly in style, and being competent in using one will not necessarily help you when you use the other. If your system administrator recommends another editor in place of Vi you may wish to use that editor instead, and you should refer to the relevant system documentation. The principal advantage of Vi is that, being a 'standard' editor, you can rely on it being available on all UNIX systems. In common with many UNIX utilities, Vi is somewhat terse, and some people simply don't like it. Advantages of Emacs are that you can 'customise' its commands, and that it includes many powerful facilities not available in Vi. However, these benefits are offset by the complexity of Emacs for the novice user. Several other editors should be mentioned. The 'simplest' editor is ed (edit), which looks to the user similar to ex in colon-mode. It is used where full-screen editing may be problematic, for instance if you are accessing the UNIX system via a slow communications link such as a telephone line with a 56k modem. If you can use ex, then learning ed should present no major problems. Like ex, ed is a standard editor that you can expect to find on all UNIX systems. The commands available to ed are similar (though not all are identical) to those used by ex, but ed cannot be used as a full-screen editor. The machine can also edit files as well as the user; this can be done using Sed, which we discuss later on. Simple text editing can be done with graphical editors, such as NEdit or KEdit (neither of which is POSIX). These are point and click applications, which allow you for instance to cut and paste. They are fine, but complex editing may require many mouse movements. Also, unlike the Microsoft Windows environment, there is no standard graphical editor, but they are simple to use and require no instruction here. There is also an open-source version of Vi called Vim, which supports a graphical interface.


Copyright © 2002 Mike Joy, Stephen Jarvis and Michael Luck