Text editing applications
There used to be programming courses where the final class assignment was to write a text editing program. Some of the graduates must have gone on to program in Linux, because there are more Linux text editors available than almost any other type of program.
In this series I have focused specifically on free general-purpose text editing programs; specific web page editors and source code editors, and fully-featured word processors like Abiword, have been omitted. This still leaves a wide field. All the editors described below were installed from the Add / Remove Applications menu option and trialled on a laptop running Ubuntu 8.10 with the GNOME interface. Obvious features such as word wrap and cut and paste have been taken for granted - unless they are missing.
Most Linux text editors are intended for use by programmers, and I have commented on features such as source code syntax highlighting where they exist, but my emphasis here is on ordinary text editing, and I haven’t attempted to evaluate the applications’ performance as programming environments. Applications are listed in order from most to least complex, but I have put Gedit and Kate first, as the default editors for most GNOME and KDE environments respectively.
Gedit is described as the ‘official text editor of the GNOME desktop environment’. It appears in the Applications menu under ‘Accessories’ simply as ‘Text Editor’, and is supplied by default with most GNOME-based distros. Gedit opens up in a standard-looking window with a relatively simple Toolbar, but it has some hidden depths. Its features include:
- Page setup and print preview options
- Spell checking options, both while typing and for a completed document
- An optional side panel which displays the names of currently open files
- A pick list of recently-opened files
- Remembering the directory in which files were last opened or saved
- ‘Highlight modes’ for writing source code in which keywords in a specified programming language are shown in different colors
- Auto indent – also for source code – where a single Tab press takes you to the margin of the line above and Shift-Tab moves the cursor back out to the previous tab stop
- An option to display line numbers
- An option to highlight the current line
- An ‘incremental search’ option where Gedit searches through the file as the user types the search term
- A timed autosave option.
In addition to all this, Gedit also supports the use of plug-ins. These can be installed via the Edit / Preferences menu. Plug-ins available by default include a Sort command and a ‘Change case’ command. A ‘Snippets’ option allows frequently-used strings of text to be saved and called up quickly via an abbreviation or a specified keypress. Additional plug-ins can be downloaded from the web - live.gnome.org/Gedit/Plugins is a good place to start.
Gedit also has a fairly comprehensive help system. With all these features, in the area of text editors it is clearly the one to beat.
Like most applications whose names start with K.., Kate is designed for the KDE interface, but it ran without difficulty on my Ubuntu GNOME installation. Kate opens with startup tips and calls each set of windows a ‘Session’. A left panel shows the user’s choice of open files – as in Gedit – or the PC’s file system, making it quick and easy to locate and open new documents. It will open any file as a binary, and retains a list of recently opened files. A file can be exported to HTML, and Kate will add the necessary tags to make it a properly formed webpage.
Other features of Kate include:
- Block selection mode – makes it easy to select the first column of a table, for instance
- Inclusion of a mini-Terminal command line mode
- A wide range of ‘Modes’ corresponding to different programming languages and environments These can also be applied to highlighting keywords and indenting lines appropriately
- An outline approach to structured source code that allows self-contained sections to be ‘rolled up’ out of sight and expanded again
- Spell checking
- Case manipulation
- Customizable toolbars and color scheme
- Customizable keyboard shortcuts
- A plug-in system which can be added to via Python scripts
- A comprehensive help system
- A ‘find in files’ option that will search for text through multiple text files on disk
Kate shows a little more of its programming background than Gedit, but for functionality there is very little to choose between them. Either will do an excellent job.
TEA text editor
Tea is almost TOO customizable - right down to the width of its dialog boxes. The interface is a little clunky by modern standards, but a huge range of features are built in:
- Automatic indent
- Auto backups
- A log file which records every action
- A choice of colors for text, backgrounds and highlights
- Customizable keyboard shortcuts
- An option to highlight found text instead of moving to it
- Automatic insertion of HTML markup codes
- A readability measure
- Conversion of numbers from Arabic to Roman, etc.
- Filtering to remove unwanted lines of text
- Snippets of text and autoreplace
- And – last but not least – conversion of text to and from Morse code
All this makes for a long learning curve. The quirky online manual helps, but not really enough. All I can really say is that if you need even one quarter of the things Tea can do then I would hate to have your job.
Like SciTE below, jEdit installs in the Programming menu. It can split the screen into multiple smaller panes showing different parts of the same file. It supports
- Help tips
- Block selection
- Line numbering
- Incremental search
- Syntax highlighting
- Collapsing blocks in source code
- Macro recording and replaying
There is also a Plug-in manager, and although no plug-ins are installed by default, an enormous number are available for download from plugins.jedit.org.
SciTE has nailed its programming credentials to the mast by installing under the Programming menu rather than under Accessories like the other text editor applications. Apart from a ‘Build’ option on the Toolbar, however, there is little to mark SciTE out as a specialized programmer’s tool. It supports incremental search, changing case, and – unlike any other program so far – the display of white space and Enter characters on the screen. Like Mozilla Firefox, it has a text-based configuration file which can be edited within the program to give complete control over all the options.
SciTE can expand abbreviations, and supports color highlighting of keywords in a variety of programming languages. Multiple files can be opened in tabbed windows (called ‘buffers’). Like Kate, SciTE has a ‘find in files’ option. Add the funky modern icons in the Toolbar, and we have an attractive and powerful program. And hard-core programmers can test Python and other code directly from the editing window.
Medit has similarities to Kate, including the Open documents / File list panel, although this is at the right of the screen rather than the left. It also includes a Python console like SciTE. Other options include
- Exporting to PDF
- Customisable keyboard shortcuts
- Syntax highlighting
- A built-in Terminal pane
- Line numbering
- Find in files
There is no Help system but for a midrange editor Medit looks relatively easy to learn and use. It has a modern professional look.
GVim and Scribes
GVim Text Editor
GVim is a wolf in sheep’s clothing. Designed as a windowed implementation of the old command-line editor vi, GVim uses the same keystrokes as vi, but has also incorporated these into a menu and toolbar system. There is a good deal of power here, but users unfamiliar with vi (like me) are going to have to spend a lot of time learning to harness it. To make matters worse, the help information comes up in the text window itself.
If you want to convert files to hex or run Vim scripts then this may be for you, but I couldn’t even get it to write a line of text. GVim is strictly for hard-core power users who hanker after the old days.
Scribes Text Editor – not to be confused with the popular page layout program Scribus – has eschewed the use of a menu system altogether, and requires everything to be done through the Toolbar or via keyboard shortcuts. These are all listed in the Help system – if you can be bothered to learn them. Scribes is obviously aimed at programmers, with support for language-based templates and color coding of keywords, and behind the simple facade there are some powerful features like spell checking, bookmarks, and customizable color settings for different types of keywords in a wide variety of different languages. But Scribes is only for people who are willing to persevere in learning and remembering all those hidden keystrokes.
TextEdit, MousePad and LeafPad
TextEdit is an odd little application that uses a vertical toolbar-type menu sitting outside the text editing window. It supports RTF format, which allows it to include non-text features like kerning and color. Each new document comes up in full page view in a separate window which can be minimized to a small square icon at the bottom of the screen. The Choosing Help brought up no response.
The TextEdit About box assigns copyright only for 1995-96, which would make this one of the oldest programs still available for Linux. TextEdit is quirky and interesting, but not powerful enough to provide any real competition for newer programs.
MousePad is about as simple as a text editor can get. Line numbers, word wrap and a choice of font are the only settings. It can also jump to a specified line number. There’s no help system - who needs help when it’s as easy as this?
LeafPad seems to be MousePad with the addition of a Print Preview option. They share a common origin, as both are credited to code by Tarot Osuji.
Which is for you? Why not start with something simple like LeafPad and work your way up when you run out of options? Apart from GVim and Scribes, all these applications are all user friendly enough to make testing them easy. And if you don’t find that killer feature which you’re looking for – well, you can always write your own!