BSD 4_3 release
[unix-history] / usr / man / man1 / ex.1
index a921af6..d600385 100644 (file)
@@ -1,7 +1,13 @@
-.TH EX 1 4/4/79
-.UC
+.\" Copyright (c) 1980 Regents of the University of California.
+.\" All rights reserved.  The Berkeley software License Agreement
+.\" specifies the terms and conditions for redistribution.
+.\"
+.\"    @(#)ex.1        6.4 (Berkeley) 6/5/86
+.\"
+.TH EX 1 "June 5, 1986"
+.UC 4
 .SH NAME
 .SH NAME
-ex \- text editor
+ex, edit \- text editor
 .SH SYNOPSIS
 .B ex
 [
 .SH SYNOPSIS
 .B ex
 [
@@ -14,11 +20,16 @@ tag
 ] [
 .B \-r
 ] [
 ] [
 .B \-r
 ] [
-\fB\+\fIcommand\fR
+\fB+\fIcommand\fR
 ] [
 .B \-l
 ]
 name ...
 ] [
 .B \-l
 ]
 name ...
+.br
+.B edit
+[
+ex options
+]
 .SH DESCRIPTION
 .I Ex
 is the root of a family of editors:
 .SH DESCRIPTION
 .I Ex
 is the root of a family of editors:
@@ -52,12 +63,13 @@ which is a command which focuses on the display editing portion of
 .SH DOCUMENTATION
 The document
 .I "Edit: A tutorial"
 .SH DOCUMENTATION
 The document
 .I "Edit: A tutorial"
-provides a comprehensive introduction to
+(USD:14) provides a comprehensive introduction to
 .I edit
 assuming no previous knowledge of computers or the \s-2UNIX\s0 system.
 .PP
 The
 .I edit
 assuming no previous knowledge of computers or the \s-2UNIX\s0 system.
 .PP
 The
-.I "Ex Reference Manual \- Version 3.1"
+.I "Ex Reference Manual \- Version 3.7"
+(USD:16)
 is a comprehensive and complete manual for the command mode features
 of
 .I ex,
 is a comprehensive and complete manual for the command mode features
 of
 .I ex,
@@ -71,155 +83,18 @@ the material in the introductory and advanced documents works also with
 .I ex.
 .PP
 .I "An Introduction to Display Editing with Vi"
 .I ex.
 .PP
 .I "An Introduction to Display Editing with Vi"
+(USD:15)
 introduces the display editor
 .I vi
 and provides reference material on
 .I vi.
 introduces the display editor
 .I vi
 and provides reference material on
 .I vi.
-The
+In addition, the
 .I "Vi Quick Reference"
 card summarizes the commands
 of
 .I vi
 in a useful, functional way, and is useful with the
 .I Introduction.
 .I "Vi Quick Reference"
 card summarizes the commands
 of
 .I vi
 in a useful, functional way, and is useful with the
 .I Introduction.
-.SH FOR ED USERS
-If you have used
-.I ed
-you will find that
-.I ex
-has a number of new features useful on CRT terminals.
-Intelligent terminals and high speed terminals are very pleasant to  use
-with
-.I vi.
-Generally, the editor uses far more of the capabilities of terminals than
-.I ed
-does, and uses the terminal capability data base
-.IR termcap (5)
-and the type of the terminal you are using from the variable
-TERM in the environment to determine how to drive your terminal efficiently.
-The editor makes use of features such as insert and delete character and line
-in its
-.B visual
-command
-(which can be abbreviated \fBvi\fR)
-and which is the central mode of editing when using
-.IR vi (1).
-There is also an interline editing
-.B open
-(\fBo\fR)
-command which works on all terminals.
-.PP
-.I Ex
-contains a number of new features for easily viewing the text of the file.
-The
-.B z
-command gives easy access to windows of text.
-Hitting ^D causes the editor to scroll a half-window of text
-and is more useful for quickly stepping through a file than just hitting
-return.
-Of course, the screen oriented
-.B visual
-mode gives constant access to editing context.
-.PP
-.I Ex
-gives you more help when you make mistakes.
-The
-.B undo
-(\fBu\fR)
-command allows you to reverse any single change which goes astray.
-.I Ex
-gives you a lot of feedback, normally printing changed lines,
-and indicates when more than a few lines are affected by a command
-so that it is easy to detect when a command has affected more lines
-than it should have.
-.PP
-The editor also normally prevents overwriting existing files unless you 
-edited them so that you don't accidentally clobber
-with a
-.I write
-a file other than the one you are editing.
-If the system (or editor) crashes, or you accidentally hang up the phone,
-you can use the editor
-.B recover
-command to retrieve your work.
-This will get you back to within a few lines of where you left off.
-.PP
-.I Ex
-has several features for dealing with more than one file at a time.
-You can give it a list of files on the command line
-and use the
-.B next
-(\fBn\fR) command to deal with each in turn.
-The
-.B next
-command can also be given a list of file names, or a pattern
-as used by the shell to specify a new set of files to be dealt with.
-In general, filenames in the editor may be formed with full shell
-metasyntax.
-The metacharacter `%' is also available in forming filenames and is replaced
-by the name of the current file.
-For editing large groups of related files you can use
-.I ex's
-.B tag
-command to quickly locate functions and other important points in 
-any of the files.
-This is useful when working on a large program when you want to quickly
-find the definition of a particular function.
-The command
-.IR ctags (1)
-builds a
-.I tags
-file or a group of C programs.
-.PP
-For moving text between files and within a file the editor has a group
-of buffers, named
-.I a
-through
-.I z.
-You can place text in these
-named buffers and carry it over when you edit another file.
-.PP
-There is a command
-.B &
-in
-.I ex
-which repeats the last
-.B substitute
-command.
-In addition there is a
-confirmed substitute command.
-You give a range of substitutions to be done and the editor interactively
-asks whether each substitution is desired.
-.PP
-You can use the
-.B substitute
-command in
-.I ex
-to systematically convert the case of letters between upper and lower case.
-It is possible to ignore case
-of letters in searches and substitutions.
-.I Ex
-also allows regular expressions which match words to be constructed.
-This is convenient, for example, in searching for the word
-``edit'' if your document also contains the word ``editor.''
-.PP
-.I Ex
-has a set of
-.I options
-which you can set to tailor it to your liking.
-One option which is very useful is the
-.I autoindent
-option which allows the editor to automatically supply leading white
-space to align text.  You can then use the ^D key as a backtab
-and space and tab forward to align new code easily.
-.PP
-Miscellaneous new useful features include an intelligent
-.B join
-(\fBj\fR) command which supplies white space between joined lines
-automatically,
-commands < and > which shift groups of lines, and the ability to filter
-portions of the buffer through commands such as
-.I sort.
 .SH FILES
 .DT
 /usr/lib/ex?.?strings          error messages
 .SH FILES
 .DT
 /usr/lib/ex?.?strings          error messages
@@ -238,11 +113,13 @@ portions of the buffer through commands such as
 .br
 /usr/preserve                  preservation directory
 .SH SEE ALSO
 .br
 /usr/preserve                  preservation directory
 .SH SEE ALSO
-awk(1), ed(1), grep(1), sed(1), edit(1), grep(1), termcap(5), vi(1)
+awk(1), ed(1), grep(1), sed(1), grep(1), vi(1), termcap(5), environ(7)
 .SH AUTHOR
 .SH AUTHOR
-William Joy
+Originally written by William Joy
 .br
 .br
-Mark Horton added macros to \fIvisual\fR mode and is maintaining version 3
+Mark Horton has maintained the editor since version 2.7, adding macros,
+support for many unusual terminals,
+and other features such as word abbreviation mode.
 .SH BUGS
 The
 .I undo
 .SH BUGS
 The
 .I undo