The ex
editor is often touted as an enhancement and simplification of ed
. I would like to know what specific enhancements and simplifications it offers. GNU ed
, for example, offers extended regular expressions. So, besides these, what advantages come with ex
? I am thinking specifically of the original ex
editor by Bill Joy, not later incarnations in Vim.
1 Answer
As a very rough first approximation we can say that ed
doesn't show what has been modified (until asked to print
) and ex could (additionally) work as a full screen editor. Using a very old description from the the posix spec:
The ed utility is a line-oriented text editor that uses two modes: command mode and input mode. In command mode the input characters shall be interpreted as commands, and in input mode they shall be interpreted as text.
The ex utility is a line-oriented text editor. There are two other modes of the editor-open and visual-in which screen-oriented editing is available.
Both programs have been extended, modified and improved over the years and now the list of differences is much longer and impossible to fully list on a short answer of this site.
That full-screen
capability has lead to the development of vi
(a visual editor), and then to vim
(visual improved).
ex
you're looking at (I mean, Vim inex
mode is pretty much a totally different editor compared to what the POSIX standard prescribes forex
, and the difference between that anded
are simply too numerous to list). Also, "advantages" is a matter of opinion.ex
man page from 2BSD in 1979.