To VI or Not to VI, That Is the Question
This, of course, is a Tipsheet about editors. The question has often come up about which editor to choose. The transition from UA1VM to Unix has sent Xedit users in search of an editor that they will feel comfortable with. It is not that Xedit was an easy editor to use, but everyone had grown comfortable with it. With the coming of the Unix system, users now have a number of choices on which editor to use. Here are some of the choices and a few pros and cons on their use.
Pico
Pico is a very simple editor to learn to use. It puts all its help on the screen (it uses control-char to get things done) and doesn't have a huge number of choices on what to do. It is the editor that comes with Pine by default so many people are using it. Due to its nature (it was not written to do a great many editing tasks) it is not a very powerful editor. So if you have lots of moving of text and deletions and such, it doesn't make a good choice.
Command: pico filename
Pro: simple to use, easy to learn
Con: not very powerful
Documentation: contains its own help files
Emacs
Emacs is a full-screen editor with many features packed in. There is even a version that will run under X-windows, called "xemacs." It uses control sequences to get things done, sometimes using multiple characters. For instance, to kill the editing job and get out of Emacs if control-x control-c. It interacts with many Unix features, so for instance, you can read mail and you use the Unix shell. It is highly customizable, in fact, so much so, that two users who have customized their own setup may not be able to recognize and use each other's setup. Having many features makes it very powerful to use, but hard to learn as a beginner.
Command: emacs filename
Pro: very powerful, customizable
Con: hard for a beginner to learn
Documentation: contains its own help file
VI
This is the old Unix standard (pronounced vee-aye). This editor is the top level to the other Unix editor, "ex" and can use a lot of "ex" commands to get things done. Some commands can be done from the basic keyboard with one-character commands, but there are control-char commands, too. The escape key is used, quite heavily. It gets you back into editing mode when you are done inserting text in the insert mode. The commands are all quite short and some are cryptic, rather reminiscent of those aspects of Unix. There are so many editing features of vi that most vi users are always learning new ways to edit from other vi users. Users can add their own customization, as in Emacs. In spite of this, it is possible to get going with editing knowing only a limited set of commands. That makes it easier for a beginner to get started with.
Command: vi filename
Pro: very powerful, customizable
Con: cryptic commands, using advanced features takes experience
Documentation: do a "man vi" or read any Unix book
TEXTEDIT
This is an X-Windows based editor that comes with the SUN version of Unix. It is mouse-based as well as giving you arrow-cursor control. Users of PC windows editors will probably feel very comfortable with this editor. It is fairly powerful and very easy to use. It is not very customizable, though (perhaps, not at all). To use this editor on the PC, one will need to have an X-Windows emulator running.
Command: textedit filename
Pro: easy to user, powerful
Con: requires X-windows emulator
Documentation: do "man textedit" but really not needed
THE
Here is Bama's dirty little secret. There is an Xedit clone on the system. It is called "the" and works almost the same as the real Xedit on the IBM system. It will require some customization to make it recognizable to Xedit users, but that is easily accomplished. More information will be made available through the news on Bama and on the Web (bama.ua.edu/~unixinfo).
Command: the filename
Pro: recognizable to IBM users, powerful
Con: not exactly Xedit
Documentation: press "F1", written stuff we have is not very
useful
There are more editors out there, especially of the "X-Windows" variety. These can be added as user-demand requires.
© 1999, The University of Alabama. The information included here is for the University of Alabama central computing facility as it was configured on the document date. It may or may not apply to other Unix systems.

