TSR – The Server Room Show – Episode 54 – 55 Text Editors

Text Editors Vs IDEs

Very simply put a text editor is a type of computer program which edits plain text.

An integrated development environment (IDE) is a software application that provides comprehensive facilities to computer programmers for software development. An IDE normally consists of at least a source code editor, build automation tools and a debugger. Some IDEs contain the necessary compiler, interpreter, or both; while others, do not.

The boundary between an IDE and other parts of the broader software development environment is not well-defined; sometimes a version control system or various tools to simplify the construction of a graphical user interface (GUI) are integrated. Many modern IDEs also have a class browser, an object browser, and a class hierarchy diagram for use in object-oriented software development.

Notable Text Editors (Some old and Some new)

ed / ex

The ed text editor
ed text editor

ed is a line editor for Unix and Unix-like operating systems. It was one of the first parts of the Unix operating system that was developed, in August 1969.It remains part of the POSIX and Open Group standards for Unix-based operating systems, alongside the more sophisticated full-screen editor vi.

The ed text editor was one of the first three key elements of the Unix operating system—assembler, editor, and shell—developed by Ken Thompson in August 1969 on a PDP-7 at AT&T Bell Labs. Many features of ed came from the qed text editor developed at Thompson’s alma mater University of California, Berkeley. Thompson was very familiar with qed, and had reimplemented it on the CTSS and Multics systems. Thompson’s versions of qed were notable as the first to implement regular expressions. Regular expressions are also implemented in ed, though their implementation is considerably less general than that in qed.

Dennis M. Ritchie produced what Doug McIlroy later described as the “definitive” ed and aspects of ed went on to influence ex, which in turn spawned vi.

ex, short for EXtended, is a line editor for Unix systems originally written by Bill Joy in 1976, beginning with an earlier program written by Charles Haley.

Ex is heavily based on the text editor ed.The first versions of ex were modifications of a text editor em (named editor for mortals as creator George Coulouris considered the cryptic commands of ed to be only suitable for “immortals” ) developed at Queen Mary’s College in England and shown it to various people at Berkeley in the summer of 1976 including Bill Joy who was very impressed with it. Em was a modified ed which had some added features which were useful on high-speed terminals.The earlier versions of ex also included features from the modified ed in use at UCLA and the ideas of Bill Joy and Charles Haley, who implemented most of the modifications to em which resulted in these early versions of ex.

The original Unix editor, distributed with the Bell Labs versions of the operating system in the 1970s, was the rather user-unfriendly ed. George Coulouris of Queen Mary College, London, which had installed Unix in 1973, developed an improved version called em in 1975 that could take advantage of video terminals. While visiting Berkeley, Coulouris presented his program to Bill Joy, who modified it to be less demanding on the processor; Joy’s version became ex and got included in the Berkeley Software Distribution.

ex was eventually given a full-screen visual interface (adding to its command line oriented operation), thereby becoming the vi text editor. In recent times, ex is implemented as a personality of the vi program; most variants of vi still have an “ex mode”, which is invoked using the command ex, or from within vi for one command by typing the : (colon) character. Although there is overlap between ex and vi functionality, some things can only be done with ex commands, so it remains useful when using vi.

Interesting fact:
The non-interactive Unix command grep was inspired by a common special use of qed and later ed, where the command g/re/p means globally search for the regular expression re and print the lines containing it. The Unix stream editor, sed implemented many of the scripting features of qed that were not supported by ed on Unix.

What is a Line editor

In computing, a line editor is a text editor in which each editing command applies to one or more complete lines of text designated by the user. Line editors predate screen-based text editors and originated in an era when a computer operator typically interacted with a teleprinter (essentially a printer with a keyboard), with no video display, and no ability to move a cursor interactively within a document. Line editors were also a feature of many home computers, avoiding the need for a more memory-intensive full-screen editor.

Line editors are limited to typewriter keyboard text-oriented input and output methods. Most edits are a line-at-a-time. Typing, editing, and document display do not occur simultaneously. Typically, typing does not enter text directly into the document. Instead, users modify the document text by entering these commands on a text-only terminal. Commands and text, and corresponding output from the editor, will scroll up from the bottom of the screen in the order that they are entered or printed to the screen. Although the commands typically indicate the line(s) they modify, displaying the edited text within the context of larger portions of the document requires a separate command.

Line editors keep a reference to the ‘current line’ to which the entered commands usually are applied. In contrast, modern screen based editors allow the user to interactively and directly navigate, select, and modify portions of the document. Generally line numbers or a search based context (especially when making changes within lines) are used to specify which part of the document is to be edited or displayed.

Early line editors included Colossal Typewriter, Expensive Typewriter and QED. All three pre-dated the advent of UNIX; the former two ran on DEC PDP-1’s, while the latter was a Unisys product. Numerous line editors are included with UNIX and Linux: ed is considered the standard UNIX editor, while ex extends it and has more features, and sed was written for pattern-based text editing as part of a shell script. GNU Readline is a line editor implemented as a library that is incorporated in many programs, such as Bash. For the first 10 years of the IBM PC, the only editor provided in DOS was the Edlin line editor.

How To Use VIM Split Screen – Linux Hint
Vim welcome screen

vi is a screen-oriented text editor originally created for the Unix operating system. The portable subset of the behavior of vi and programs based on it, and the ex editor language supported within these programs, is described by (and thus standardized by) the Single Unix Specification and POSIX.

The original code for vi was written by Bill Joy in 1976, as the visual mode for a line editor called ex that Joy had written with Chuck Haley. Bill Joy’s ex 1.1 was released as part of the first Berkeley Software Distribution (BSD) Unix release in March 1978. It was not until version 2.0 of ex, released as part of Second BSD in May 1979 that the editor was installed under the name “vi” (which took users straight into ex’s visual mode) and the name by which it is known today. Some current implementations of vi can trace their source code ancestry to Bill Joy; others are completely new, largely compatible reimplementations.

The name “vi” is derived from the shortest unambiguous abbreviation for the ex command visual, which switches the ex line editor to visual mode.

In addition to various non–free software variants of vi distributed with proprietary implementations of Unix, vi was open sourced with Open Solaris, and several free and open source software vi clones exist.

Many of the ideas in ex’s visual mode (a.k.a. vi) were taken from other software that existed at the time. According to Bill Joy inspiration for vi’s visual mode came from the Bravo editor, which was a bimodal editor. In an interview about vi’s origins, Joy said:

A lot of the ideas for the screen editing mode were stolen from a Bravo manual I surreptitiously looked at and copied. Dot is really the double-escape from Bravo, the redo command. Most of the stuff was stolen. There were some things stolen from ed—we got a manual page for the Toronto version of ed, which I think Rob Pike had something to do with. We took some of the regular expression extensions out of that

Interview with Bill Joy by Jim Joice

Joy used a Lear Siegler ADM-3A terminal. On this terminal, the Escape key was at the location now occupied by the Tab key on the widely used IBM PC keyboard (on the left side of the alphabetic part of the keyboard, one row above the middle row). This made it a convenient choice for switching vi modes. Also, the keys h,j,k,l served double duty as cursor movement keys and were inscribed with arrows, which is why vi uses them in that way. The ADM-3A had no other cursor keys. Joy explained that the terse, single character commands and the ability to type ahead of the display were a result of the slow 300 baud modem he used when developing the software and that he wanted to be productive when the screen was painting slower than he could think.

ADM-3A terminal keyboard layout

Bill Joy explains in the previously mentioned interview done by Jim Joyce that He nearly fully implemented multiwindows mode for vi. Here is a quote regarding that from the interview:

What actually happened was that I was in the process of adding multiwindows to vi when we installed our VAX, which would have been in December of ’78. We didn’t have any backups and the tape drive broke. I continued to work even without being able to do backups. And then the source code got scrunched and I didn’t have a complete listing. I had almost rewritten all of the display code for windows, and that was when I gave up. After that, I went back to the previous version and just documented the code, finished the manual and closed it off. If that scrunch had not happened, vi would have multiple windows, and I might have put in some programmability—but I don’t know.

Interview with Bill Joy by Jim Joice

Over the years since its creation, vi became the de facto standard Unix editor and a hacker favorite outside of MIT until the rise of Emacs after about 1984.

Emacs in Linux console

Emacs or EMACS (Editor MACroS) is a family of text editors that are characterized by their extensibility. The manual for the most widely used variant, GNU Emacs, describes it as “the extensible, customizable, self-documenting, real-time display editor”. Development of the first Emacs began in the mid-1970s, and work on its direct descendant, GNU Emacs, continues actively as of 2020.

The original EMACS was written in 1976 by David A. Moon and Guy L. Steele Jr. as a set of Editor MACroS for the TECO editor. It was inspired by the ideas of the TECO-macro editors TECMAC and TMACS.

Emacs development began during the 1970s at the MIT AI Lab, whose PDP-6 and PDP-10 computers used the Incompatible Timesharing System (ITS) operating system that featured a default line editor known as Tape Editor and Corrector (TECO). Unlike most modern text editors, TECO used separate modes in which the user would either add text, edit existing text, or display the document. One could not place characters directly into a document by typing them into TECO, but would instead enter a character (‘i’) in the TECO command language telling it to switch to input mode, enter the required characters, during which time the edited text was not displayed on the screen, and finally enter a character (<esc>) to switch the editor back to command mode. (A similar technique was used to allow overtyping.) This behavior is similar to that of the program ed.

E had another feature that TECO lacked: random-access editing. TECO was a page-sequential editor that was designed for editing paper tape on the PDP-1 and typically allowed editing on only one page at a time, in the order of the pages in the file. Instead of adopting E’s approach of structuring the file for page-random access on disk, Stallman modified TECO to handle large buffers more efficiently and changed its file-management method to read, edit, and write the entire file as a single buffer. Almost all modern editors use this approach.

Richard Stallman visited the Stanford AI Lab in 1972 or 1974 and saw the lab’s E editor, written by Fred Wright. He was impressed by the editor’s intuitive WYSIWYG (What You See Is What You Get) behavior, which has since become the default behavior of most modern text editors. He returned to MIT where Carl Mikkelsen, a hacker at the AI Lab, had added to TECO a combined display/editing mode called Control-R that allowed the screen display to be updated each time the user entered a keystroke. Stallman reimplemented this mode to run efficiently and then added a macro feature to the TECO display-editing mode that allowed the user to redefine any keystroke to run a TECO program.

The new version of TECO quickly became popular at the AI Lab and soon accumulated a large collection of custom macros whose names often ended in MAC or MACS, which stood for macro. Two years later, Guy Steele took on the project of unifying the diverse macros into a single set. Steele and Stallman’s finished implementation included facilities for extending and documenting the new macro set. The resulting system was called EMACS, which stood for Editing MACroS or, alternatively, E with MACroS. Stallman picked the name Emacs “because <E> was not in use as an abbreviation on ITS at the time.” An apocryphal hacker koan alleges that the program was named after Emack & Bolio’s, a popular Cambridge ice cream store. The first operational EMACS system existed in late 1976.

In the following years, programmers wrote a variety of Emacs-like editors for other computer systems.

James Gosling, who would later invent NeWS and the Java programming language, wrote Gosling Emacs in 1981. The first Emacs-like editor to run on Unix, Gosling Emacs was written in C and used Mocklisp, a language with Lisp-like syntax, as an extension language.

The most popular, and most ported, version of Emacs is GNU Emacs, which was created by Richard Stallman for the GNU Project.

In 1976, Stallman wrote the first Emacs (“Editor MACroS”), and in 1984, began work on GNU Emacs, to produce a free software alternative to the proprietary Gosling Emacs. GNU Emacs was initially based on Gosling Emacs, but Stallman’s replacement of its Mocklisp interpreter with a true Lisp interpreter required that nearly all of its code be rewritten. This became the first program released by the nascent GNU Project. GNU Emacs is written in C and provides Emacs Lisp, also implemented in C, as an extension language. Version 13, the first public release, was made on March 20, 1985. The first widely distributed version of GNU Emacs was version 15.34, released later in 1985. Early versions of GNU Emacs were numbered as “1.x.x,” with the initial digit denoting the version of the C core. The “1” was dropped after version 1.12 as it was thought that the major number would never change, and thus the major version skipped from “1” to “13”. A new third version number was added to represent changes made by user sites.In the current numbering scheme, a number with two components signifies a release version, with development versions having three components.

GNU Emacs was later ported to the Unix operating system. It offered more features than Gosling Emacs, in particular a full-featured Lisp as its extension language, and soon replaced Gosling Emacs as the de facto Unix Emacs editor.

Emacs has over 10,000 built-in commands and its user interface allows the user to combine these commands into macros to automate work. Implementations of Emacs typically feature a dialect of the Lisp programming language that provides a deep extension capability, allowing users and developers to write new commands and applications for the editor. Extensions have been written to manage email, files, outlines, and RSS feeds as well as clones of ELIZA, Pong, Conway’s Life, Snake and Tetris.

Emacs is, along with vi, one of the two main contenders in the traditional editor wars of Unix culture. Emacs is among the oldest free and open source projects still under development.

GNU nano
GNU nano: Screenshots
nano screenshot

GNU nano is a text editor for Unix-like computing systems or operating environments using a command line interface. It emulates the Pico text editor, part of the Pine email client, and also provides additional functionality. Unlike Pico, nano is licensed under the GNU General Public License (GPL). Released as free software by Chris Allegretta in 1999, nano became part of the GNU Project in 2001.

GNU nano was first created in 1999 with the name TIP (a recursive acronym for TIP Isn’t Pico), by Chris Allegretta. His motivation was to create a free software replacement for Pico, which was not distributed under a free software license. The name was changed to nano on 10 January 2000 to avoid a naming conflict with the existing Unix utility tip. The name comes from the system of SI prefixes, in which nano is 1000 times larger than pico. In February 2001, nano became a part of the GNU Project.

GNU nano implements several features that Pico lacks, including syntax highlighting, line numbers, regular expression search and replace, line-by-line scrolling, multiple buffers, indenting groups of lines, rebindable key support and the undoing and redoing of edit changes.

GNU nano, like Pico, is keyboard-oriented, controlled with control keys. For example, Ctrl+O saves the current file; Ctrl+W goes to the search menu. GNU nano puts a two-line “shortcut bar” at the bottom of the screen, listing many of the commands available in the current context. For a complete list, Ctrl+G gets the help screen.

Unlike Pico, nano uses meta keys to toggle its behavior. For example, Meta+S toggles smooth scrolling mode on and off. Almost all features that can be selected from the command line can be dynamically toggled. On keyboards without the meta key it is often mapped to the escape key, Esc, such that in order to simulate, say, Meta+S one has to press the Esc key, then release it, and then press the S key.

GNU nano can also use pointer devices, such as a mouse, to activate functions that are on the shortcut bar, as well as position the cursor.

Atom with an open project on Windows 10
Atom text editor

Atom is a free and open-source text and source code editor for macOS, Linux, and Microsoft Windows with support for plug-ins written in Javascript, and embedded Git Control, developed by GitHub. Atom is a desktop application built using web technologies. Most of the extending packages have free software licenses and are community-built and maintained. Atom is based on Electron (formerly known as Atom Shell) a framework that enables cross-platform desktop applications using Chromium and Node.js. It is written in CoffeeScript and Less.

Like most other configurable text editors, Atom enables users to install third-party packages and themes to customize the features and looks of the editor. Packages can be installed, managed and published via Atom’s package manager apm. Syntactic highlighting support for other languages than the default, can be installed through the packages, as well as the auto-complete function.

Atom’s default packages can apply syntax highlighting for the following programming languages and file formats:

Atom’s syntax highlighting for the following programming languages and file formats
Sublime Text
Sublime text v3

Sublime Text is a shareware cross-platform source code editor with a Python application programming interface (API). It natively supports many programming languages and markup languages, and functions can be added by users with plugins, typically community-built and maintained under free-software licenses.


Column selection and multi-select editing

This feature allows users to select entire columns at once or place more than one cursor in text, which allows for simultaneous editing. All cursors then behave as if each of them was the only one in the text. Commands like move by character, move by line, text selection, move by words, move by subwords (CamelCase, hyphen or underscore delimited), move to beginning/end of line, etc., affect all cursors independently, allowing one to edit slightly complex repetitive structures quickly without the need to use macros or regex.

Auto completion

Sublime Text will offer to complete entries as the user is typing depending on the language being used. It also auto-completes variables created by the user.

Syntax highlight and high contrast display

The dark background on Sublime Text is intended to reduce eyestrain and increase the amount of contrast with the text. Syntax highlighting also makes syntaxes of the language easier to read.

In-editor code building

This feature allows users to run code for certain languages from within the editor, which eliminates the need to switch out to the command line and back again. This function can also be set to build the code automatically every time the file is saved.


This feature allows users to save blocks of frequently used code and assign keywords to them. The user can then type the keyword and press tab to paste the block of code whenever they require it.

Goto anything

This feature is a tool that allows users to switch between open, recent or project files and also navigate to symbols within them.

Other features

Sublime Text has a number of features in addition to these including:

  • Auto-save, which attempts to prevent users from losing their work
  • Customizable key assignments, a navigational tool which allows users to assign hotkeys to their choice of options in both the menus and the toolbar
  • Find as you type, begins to look for the text being entered as the user types without requiring a separate dialog box
  • Spell check function corrects as you type
  • Macros
  • Repeat the last action
  • A wide selection of editing commands, including indenting and unindenting, paragraph reformatting and line joining

Package manager

Package Control is a third-party package manager for Sublime Text which allows the user to find, install, upgrade and remove plug-ins, usually without restarting Sublime Text. The package manager keeps installed packages up-to-date with an auto-upgrade feature and downloads packages from GitHub, BitBucket and a custom JSON-encoded channel/repository system. It also handles updating packages cloned from GitHub and BitBucket via Git and Hg, as well as providing commands for enabling and disabling packages. The package manager also includes a command to bundle any package directory into a .sublime-package file.

Notable third-party packages include:

  • SublimeCodeIntel – Features include Jump to Symbol Definition, Function Call Tool-Tips.
  • Sublime Goto Documentation – Opens relevant documentation for the highlighted function
  • Bracket Highlighter – Enhances the basic highlights Sublime Text provides for bracket pairs
  • Sublime dpaste – Sends selected text to the dpaste.com service
  • SublimeLinter – Code linting (validation) for JavaScript, Perl, PHP, Python, Ruby, and others
  • Side Bar Enhancements – Enhancements to the Sublime Text 2 sidebar with new options for deleting, opening, moving, creating, editing, and finding files
  • ColorSublime – Expands the number of Themes available from the standard 22 to over 250 community-submitted color schemes
  • WordPress – Adds autocompletion and Snippets for the blogging platform WordPress
  • Git – Integrates Git functionality into Sublime Tex

( a user friendly text editor written for the Midnight Commander)
MCEdit running in Linux terminal

MCEdit is part of the Midnight Commander package a very popular multiplatform Norton Commander clone which runs also under Linux.

mcedit’s features include syntax highlighting for many languages, macros, code snippets, simple integration with external tools, automatic indentation, mouse support, a clipboard and the ability to work in both ASCII and hex modes.

Typical screen layout of XEDIT
see detailed explanation of it here: https://en.wikipedia.org/wiki/XEDIT

XEDIT is a visual editor for VM/CMS (( a family of IBM virtual machine operating systems used on IBM mainframes System/370, System/390, zSeries, System z and compatible systems, including the Hercules emulator for personal computers. ))using block mode IBM 3270 terminals. (Line-mode terminals are also supported.)

It is not a Unix or Linux text editor but as You will see it influenced editors created to other platforms such as Dos and Unix/Linux.

XEDIT is much more line-oriented than modern PC and Unix editors. For example, XEDIT supports automatic line numbers, and many of the commands operate on blocks of lines. A pair of features allows selective line and column editing. The ALL command, for example, hides all lines not matching the described pattern, and the COL (Column) command allows hiding those columns not specified. Hence changing, for example, the word NO as it appears only in columns 24 thru 28, to YES, and only on lines with the word FLEXIBLE, is doable.

Another feature is a command line which allows the user to type arbitrary editor commands. Because IBM 3270 terminals do not transmit data to the computer until certain special keys are pressed [such as ↵ Enter, a program function key (PFK), or a program access key (PAK),[5] XEDIT is less interactive than many PC and Unix editors. For example, continuous spell-checking as the user types is problematic.

When PCs and Unix computers began to supplant IBM 3270 terminals, some users wanted text editors that resembled the XEDIT they were accustomed to. To fill this need, several developers provided similar programs:

KEDIT by Mansfield Software Group, Inc., was the first XEDIT clone. Although originally released in 1983, the first major release was version 3.53 for DOS, released in 1985. By 1990, KEDIT 4.0 had a version supporting OS/2, and included the ALL command.

The last version for DOS and OS/2 was KEDIT 5.0p4. KeditW (for Windows) is at version 1.6.1 dated December 2012.

KEDIT 1.6 supports syntax highlighting for various languages including C#, COBOL, FORTRAN, HTML, Java, Pascal, and xBase defined in the .kld file format.

KEDIT supports a built-in Rexx-subset called KEXX. Mansfield Software created the first non-IBM implementation of Rexx (Personal Rexx) in 1985.

In December 2012 Mansfield Software released 1.6.1 to provide compatibility with Windows 8 and extended support to at least June 2015. These 32bit versions work also in the 64bit versions of Windows 7 and Vista, but do not directly support Unicode.

SEDIT (first released in 1989) is another implementation on both Windows and Unix, which supports a variant of Rexx language called S/REXX (announced in 1994).

The Hessling Editor
The Hessling Editor (THE) running a twin session

The Hessling Editor (THE) is an open source text editor first released in August 1992. For more than ten years it has been written and maintained by Mark Hessling, who along with being the original author of THE is also a maintainer of Regina, an open source REXX interpreter that has been ported to most Unix platforms.

At the 1993 REXX conference in La Jolla, California, Hessling discussed why he created a new text editor.

Here is a quote from the 1993 REXX conference from Hessling about the history of The Hessling Editor

Work began on THE in 1990 after my then workplace purchased a Sun workstation. This then meant that I was using DOS, VMS and Unix. This meant using 3 different editors. Having used XEDIT for a considerable period of time prior to 1990, I was keen to continue using an editor with the same capability and power. After receiving a copy of LED (Lewis Editor) from Pierre Lewis in Canada, I found that the only way to be able to use the same XEDIT- like editor on a variety of operating systems, was to write my own. Pierre assured me that writing an editor was wonderful for one’s character. The original intention of THE was to provide me with an editor I was happy with and had all the features of XEDIT and KEDIT that I used frequently. Once I had achieved this goal, I decided to make THE available to anyone who also had a need for a multi-platform XEDIT- like editor. THE 1.0 was released to the public in August 199 1. Since then, I then began to add features that I still found lacking and that other users requested. This work resulted in THE 1.1 which is publically released at this Symposium.

Proceedings of the REXX Symposium for Developers and Users , May 18-20, 1993, La Jolla, California


  • Provision of both a GUI interface along with a command line interface, and the ability to edit a text file using either one or both
  • Availability of folding which can be controlled in various sophisticated ways (keyword based, indent based, etc.)
  • The use of REXX as macro language

Folding is controlled by the “all” command. It permits one to display and work on only those lines in a file that contain a given pattern. For example, the command: all /string/ will display only the lines that include “string”; any global changes one makes on this slice (for example replace string command) will be reflected in the file. (In most cases this is a more convenient way to make global changes in the file.) In order to restore visibility of all lines one needs to enter: all (without a target string).

Similar to XEDIT, THE uses IBMs REXX as its macro language, which makes THE highly configurable and versatile. This provides the ability to create powerful extensions to the editor and/or customize it to specialized needs. For example, one can create edit commands that would allows one to manipulate columns of text (e.g. copy/move or insert/delete a column of text within a file). With REXX, one can also integrate OS commands or external functions into an edit session. Since version 3.0, THE also has user-configurable syntax highlighting.

While THE and XEDIT are not GUI editors, THE has its own syntax highlighting language definition .tld file format comparable with KEDIT’s .kld format.

Interesting fact:
two of my favourite multi OS terminal emulator (Win,Mac,Linux) SecureCRT and ZOC Terminal both supports REXX scripting

























Author: viktormadarasz

IT OnSite Analyst for a big multinational company