Jump to content

Ex (text editor)

From Wikipedia, the free encyclopedia

Template:Short description Template:Refimprove Template:Lowercase {{#invoke:Infobox|infobox}}Template:Template other {{#invoke:Check for unknown parameters|check|unknown=Template:Main other|preview=Page using Template:Infobox software with unknown parameter "_VALUE_"|ignoreblank=y| AsOf | author | background | bodystyle | caption | collapsetext | collapsible | developer | discontinued | engine | engines | genre | included with | language | language count | language footnote | latest preview date | latest preview version | latest release date | latest release version | latest_preview_date | latest_preview_version | latest_release_date | latest_release_version | licence | license | logo | logo alt | logo caption | logo class | logo size | logo title | logo upright | logo_alt | logo_caption | logo_class | logo_size | logo_title | logo_upright | middleware | module | name | operating system | operating_system | other_names | platform | programming language | programming_language | qid | released | replaced_by | replaces | repo | screenshot | screenshot alt | screenshot class | screenshot size | screenshot title | screenshot upright | screenshot_alt | screenshot_class | screenshot_size | screenshot_upright | service_name | size | standard | title | ver layout | website }}Template:Main other{{#invoke:Check for conflicting parameters|check | template = Template:Infobox software | cat = Template:Main other | logo size; logo_size | logo class; logo_class | logo alt; logo_alt | logo title; logo_title | logo caption; logo_caption | screenshot size; screenshot_size | screenshot upright; screenshot_upright | screenshot class; screenshot_class | screenshot alt; screenshot_alt | screenshot title; screenshot title | latest release version; latest_release_version | latest release date; latest_release_date | latest preview version; latest_preview_version | latest preview date; latest_preview_date | latest release version; latest_release_version | latest release date; latest_release_date | latest preview version; latest_preview_version | latest preview date; latest_preview_date | programming language; programming_language | operating system; operating_system }} ex (short for extended)[1][2]Template:Better source is a line editor based on and intended as an improvement to ed, the original Unix editor. Today, it is standardized by POSIX.[3]

George Coulouris of Queen Mary College developed an improved version of ed called em in 1975 that took advantage of video terminals.[4] While visiting Berkeley, Coulouris presented em to Bill Joy, who modified it along with Charles Haley to be less demanding of the processor.[5][6] The editor became ex[7] and got included in the Berkeley Software Distribution.

Later, ex was enhanced to support full-screen editing via a new, visual mode. The vi text editor is, in fact, ex running in visual mode. The program can be started in either the visual or legacy mode (via command <syntaxhighlight lang="text" class="" style="" inline="1">vi</syntaxhighlight> vs. <syntaxhighlight lang="text" class="" style="" inline="1">ex</syntaxhighlight>) and the user can switch between modes at runtime. And, in visual mode, ex commands can be issued at the colon (:) prompt. Even though vi is just a mode of ex, the editor is more commonly called vi today instead of ex. In fact, some programs such as vim provide both vi and ex compatibility modes such that neither vi nor ex are the program per se.

The core ex commands which relate to search and replace are essential to vi. For instance, the ex command <syntaxhighlight lang="vim" class="" style="" inline="1">:%s/XXX/YYY/g</syntaxhighlight> replaces every instance of Template:Mono with Template:Mono, and works in vi too. The Template:Mono means every line in the file. The 'g' stands for global and means replace every instance on every line (if it was not specified, then only the first instance on each line would be replaced).

See also

References

Template:Reflist

Template:Sister project

Template:Unix commands

  1. ↑ {{#invoke:citation/CS1|citation |CitationClass=web }}
  2. ↑ {{#invoke:citation/CS1|citation |CitationClass=web }}
  3. ↑ Template:Man
  4. ↑ {{#invoke:citation/CS1|citation |CitationClass=web }}
  5. ↑ William N. Joy, Ex reference manual Template:Webarchive, November, 1977
  6. ↑ {{#invoke:citation/CS1|citation |CitationClass=web }}
  7. ↑ Template:Cite book