Section 2.3. Editors Galore


2.3. Editors Galore

There are many editors available to a programmer on a Linux system. Some are text-based editors, typically antedating GUI interfaces. Many have graphical interfaces, with mouse-based cut and paste and the like. We will mention several here and encourage you to find the one with which you are comfortable.

The list of choices for editors is quite long. One of the beauties of the Open Source approach is that personal choices like favorite editors aren't squashed by arbitrary decisions: If you want, you can write an editor; others can adopt it.

Test drive a few; try them on for size. Remember that there can be a learning curve to climb. Don't necessarily settle for the easiest to learnit may not be able to handle all that you'll need it to do, which may cost you more in the long run.

Speaking of editors that aren't easy to learn, we can't discuss editors without a mention of Emacs. To quote the GNU Emacs project home page: [4]

[4] This is from http://www.gnu.org/software/emacs/emacs.html#Whatis.

Emacs is the extensible, customizable, self-documenting real-time display editor. If this seems to be a bit of a mouthful, an easier explanation is Emacs is a text editor and more. At its core is an interpreter for Emacs Lisp ("elisp," for short), a dialect of the Lisp programming language with extensions to support text editing. Some of the features of GNU Emacs include:

  • Content sensitive major modes for a wide variety of file types, from plain text to source code to HTML files.

  • Complete online documentation, including a tutorial for new users.

  • Highly extensible through the Emacs Lisp language.

  • Support for many languages and their scripts, including all the European "Latin" scripts, Russian, Greek, Japanese, Chinese, Korean, Thai, Vietnamese, Lao, Ethiopian, and some Indian scripts. (Sorry, Mayan hieroglyphs are not supported.)

  • A large number of extensions which add other functionality. The GNU Emacs distribution includes many extensions; many others are available separatelyeven a Web browser.

There is another variant of Emacs called XEmacs. It came from the same code base but split over differences both technical and philosophical. [5] Now if you thought that vi had a lot of obscure key sequences, you ain't seen nothin' yet. With its Lisp interpreter Emacs is incredibly extensible and powerful, but has a huge learning curvewhich is why we aren't going to cover Emacs or XEmacs at all in this book.

[5] If you want to read more about those differences, and how they came about, see http://www.xemacs.org/About/XEmacsVsGNUemacs.html.

Our favorite editor is still viin part, we're sure, because we already know it so well. But like any skilled craftsman, even though you may have a favorite hammer or saw that you use on most of your work, you will still have several others ready in your toolkit, and use specialized ones for certain tasks.

2.3.1. Editing Your Pipes (sed, the Stream EDitor)

One important kind of editor available on Linux is the stream editor, or sed. It allows you to perform editing on the data that comes in on standard in and writes its result to standard out. Similar to the syntax from ex mode in vi (and based on the simple ed editor), it can be very useful for making changes to large numbers of files in one go.

You can learn much more about sed from its manpage or from the book UNIX AWK and SED Programmer's Interactive Workbook by Peter Patsis.

2.3.2. Simple Graphical Editors

Linux comes with a wide range of open source software, not all of which is installed on every installation. You may need to use your Linux installation disks to add these programs to your system. Whether it's RedHat's package manager or SuSE's YaST2 or Debian's apt-get, most Linux admin interfaces make it easy to add these extra packages. Of course you can also resort to the Web for finding and downloading additional open source software.

Here's a quick listing of some of the many editors that you might find to your liking. The description of each is largely "in its own words," based on the text that the authors supply with their software.

  • jedit is a cross-platform programmer's text editor written in Java. The Java-based portability seems appealing. This is a very powerful editor and a popular choice.

  • pico is a small easy to use editor.

  • mbedit is a multiplatform editor.

  • NEdit is a GUI style text editor for workstations with X Window and Motif. NEdit provides all of the standard menu, dialog, editing, mouse support, as well as macro extension language, syntax highlighting, and a lot of other nice features (and extensions for programmers).

  • xcoral comes up fast; seems well done. Half of the YaST developers swear by it, not only because of the built-in C/C++/Java browser. This editor provides support for C, C++, Java, Perl, Ada, and Fortran programs, as well as LATEX and HTML documents. With the help of the built-in SMall ANSI C Interpreter (SMAC), xcoral can be configured and extended in almost arbitrary ways. Examples can be found in the directory /usr/lib/xcoral (or wherever xcoral is installed on your system). Further information about xcoral and SMAC is available in the detailed online help system (also available in HTML and PostScript format).

  • axe features multiple windows, multiple buffers, configurable menus and buttons, access to external filters, keyboard macros, comprehensive online help, and more.

  • eddi is an X editor based on the TiX shell, with syntax highlighting and several other useful features.

  • the: If you're an IBMer from the heyday of mainframes, perhaps you've used xedit from VM/CMS. If so, you might want to check out the, whose name is the acronym of "The Hessling Editor."

  • JED is an extremely powerful but small Emacs-like editor for programmers that is extensible in a C-like macro language and is able to perform color syntax highlighting. Among the many features: Emacs, WordStar, EDT emulation; C, Fortran, TEX, text editing modes; full undo; Emacs compatible info reader, and lots more. It claims to be 8-bit clean, so you can even edit binary files.

  • Glimmer is the editor formerly known as CodeCommander. It is a full featured code editor with many advanced features, including full scripting integration with either Python or Guile.

  • joe (Joe's own editor) is a freeware ASCII editor for UNIX. joe is similar to most IBM PC text editors. The keyboard shortcuts are similar to WordStar and Turbo C. When joe has several files opened at the same time, each file is displayed in its own window. Additionally, joe supports shell windows whereby the output of the executed commands is saved in a buffer, automatic filename completion (via Tab), help windows, undo/redo, search and replace using regular expressions.

  • gEdit is a small but powerful text editor designed expressly for GNOME. It supports a split-screen mode and plug-ins that make it even more powerful. Developers can develop their own plug-ins if they desire.

  • fte is an editor "with many features and simple usage for X11 and console."

  • e3 is a very tiny editor (only .07MB) that offers many different modes such as vi, Emacs, and WordStar. The default mode is WordStar.

  • asedit is a simple ASCII text editor for X11/Motif. Mouse support, dialog boxes, hypertext online help, undo/redo. Named for its author, Andrzej Stochniol.



    Java Application Development with Linux
    Java Application Development on Linux
    ISBN: 013143697X
    EAN: 2147483647
    Year: 2004
    Pages: 292

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net