Top Qs
Timeline
Chat
Perspective
Ex (text editor)
Line-oriented text editor From Wikipedia, the free encyclopedia
Remove ads
ex (short for extended)[1][2][better source needed] is a line editor based on and intended as an improvement to ed, the original Unix editor. Today, it is standardized by POSIX.[3]
This article needs additional citations for verification. (December 2012) |
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 vi vs. ex) 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 :%s/XXX/YYY/g replaces every instance of XXX with YYY, and works in vi too. The % 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).
Remove ads
See also
References
External links
Wikiwand - on
Seamless Wikipedia browsing. On steroids.
Remove ads