This commit was manufactured by cvs2svn to create tag 'FreeBSD-release/1.0'.
[unix-history] / usr.bin / elvis / elvis.1
CommitLineData
15637ed4
RG
1.TH ELVIS 1
2.SH NAME
3elvis, ex, vi, view, input - The editor
4.SH SYNOPSIS
5\fBelvis\fP [\fIflags\fP] [\fB+\fP\fIcmd\fP] [\fIfiles\fP...]
6.SH DESCRIPTION
7\fIElvis\fP is a text editor which emulates \fIvi\fP/\fIex\fP.
8.PP
9On systems which pass the program name as an argument, such as Unix and Minix,
10you may also install \fIelvis\fP under the names "ex", "vi", "view", and "input".
11These extra names would normally be links to elvis;
12see the "ln" shell command.
13.PP
14When \fIelvis\fP is invoked as "vi",
15it behaves exactly as though it was invoked as "elvis".
16However, if you invoke \fIelvis\fP as "view",
17then the readonly option is set as though you had given it the "-R" flag.
18If you invoke \fIelvis\fP as "ex",
19then \fIelvis\fP will start up in the colon command mode
20instead of the visual command mode,
21as though you had given it the "-e" flag.
22If you invoke \fIelvis\fP as "input" or "edit",
23then \fIelvis\fP will start up in input mode,
24as though the "-i" flag was given.
25.SH OPTIONS
26.IP \fB-r\fP
27To the real vi, this flag means that a previous edit should be recovered.
28\fIElvis\fP, though, has a separate program, called \fIelvrec(1)\fP, for recovering
29files.
30When you invoke \fIelvis\fP with -r, \fIelvis\fP will tell you to run \fIelvrec\fP.
31.IP \fB-R\fP
32This sets the "readonly" option,
33so you won't accidentally overwrite a file.
34.IP "\fB-t\fP \fItag\fP"
35This causes \fIelvis\fP to start editing at the given tag.
36.IP "\fB-m\fP [\fIfile\fP]"
37\fIElvis\fP will search through \fIfile\fP for something that looks like
38an error message from a compiler.
39It will then begin editing the source file that caused the error,
40with the cursor sitting on the line where the error was detected.
41If you don't explicitly name a \fIfile\fP, then "errlist" is assumed.
42.IP \fB-e\fP
43\fIElvis\fP will start up in colon command mode.
44.IP \fB-v\fP
45\fIElvis\fP will start up in visual command mode.
46.IP \fB-i\fP
47\fIElvis\fP will start up in input mode.
48.IP "\fB-w\fR \fIwinsize\fR"
49Sets the "window" option's value to \fIwinsize\fR.
50.IP "\fB+\fP\fIcommand\fP or \fB-c\fP \fIcommand\fP"
51If you use the +\fIcommand\fP parameter,
52then after the first file is loaded
53\fIcommand\fP is executed as an EX command.
54A typical example would be "elvis +237 foo",
55which would cause \fIelvis\fP to start editing foo and
56then move directly to line 237.
57The "-c \fIcommand\fP" variant was added for UNIX SysV compatibility.
58.SH FILES
59.IP /tmp/elv*
60During editing,
61\fIelvis\fP stores text in a temporary file.
62For UNIX, this file will usually be stored in the /tmp directory,
63and the first three characters will be "elv".
64For other systems, the temporary files may be stored someplace else;
65see the version-specific section of the documentation.
66.IP tags
67This is the database used by the \fI:tags\fP command and the \fB-t\fP option.
68It is usually created by the \fIctags(1)\fP program.
69.IP ".exrc or elvis.rc"
70On UNIX-like systems, a file called ".exrc" in your home directory
71is executed as a series of \fIex\fR commands.
72A file by the same name may be executed in the current directory, too.
73On non-UNIX systems, ".exrc" is usually an invalid file name;
74there, the initialization file is called "elvis.rc" instead.
78ed81a3 75.SH ENVIRONMENT
76.IP TERM
77This is the name of your terminal's entry in the termcap or terminfo
78database.
79The list of legal values varies from one system to another.
80.IP TERMCAP
81Optional.
82If your system uses termcap, and the TERMCAP variable is unset, then
83\*E will read your terminal's definition from \fB/etc/termcap\fR.
84If TERMCAP is set to the full pathname of a file (starting with a '/')
85then \*E will look in the named file instead of \fB/etc/termcap\fR.
86If TERMCAP is set to a value which doesn't start with a '/',
87then its value is assumed to be the full termcap entry for your terminal.
88.IP TERMINFO
89Optional.
90If your system uses terminfo, and the TERMINFO variable is unset, then
91\*E will read your terminal's definition from the database in the
92\fB/usr/lib/terminfo\fR database.
93If TERMINFO is set, then its value is used as the database name to use
94instead of \fB/usr/lib/terminfo\fR.
95.IP "LINES, COLUMNS"
96Optional.
97These variables, if set, will override the screen size values given in
98the termcap/terminfo for your terminal.
99On windowing systems such as X, \*E has other ways of determining the
100screen size, so you should probably leave these variables unset.
101.IP EXINIT
102Optional.
103This variable can hold EX commands which will be executed before any .exrc
104files.
105.IP SHELL
106Optional.
107The SHELL variable sets the default value for the "shell" option,
108which determines which shell program is used to perform wildcard
109expansion in file names, and also which is used to execute filters
110or external programs.
111The default value on UNIX systems is "/bin/sh".
112.IP
113Note: Under MS-DOS, this variable is called COMSPEC instead of SHELL.
114.IP HOME
115This variable should be set to the name of your home directory.
116\*E looks for its initialization file there;
117if HOME is unset then the initialization file will not be executed.
118.IP TAGPATH
119Optional.
120This variable is used by the "ref" program, which is invoked by the shift-K,
121control-], and :tag commands.
122See "ref" for more information.
123.IP "TMP, TEMP"
124These optional environment variables are only used in non-UNIX versions
125of \*E.
126They allow you to supply a directory name to be used for storing temporary files.
15637ed4
RG
127.SH "SEE ALSO"
128ctags(1), ref(1), virec(1)
129.PP
130\fIElvis - A Clone of Vi/Ex\fP, the complete \fIelvis\fP documentation.
131.SH BUGS
132There is no LISP support.
133Certain other features are missing, too.
134.PP
135Auto-indent mode is not quite compatible with the real vi.
136Among other things, 0^D and ^^D don't do what you might expect.
137.PP
138Long lines are displayed differently.
139The real vi wraps long lines onto multiple rows of the screen,
140but \fIelvis\fP scrolls sideways.
141.SH AUTHOR
142.nf
143Steve Kirkendall
144kirkenda@cs.pdx.edu
145.fi
146.PP
147Many other people have worked to port \fIelvis\fP to various operating systems.
148To see who deserves credit, run the \fI:version\fP command from within \fIelvis\fP,
149or look in the system-specific section of the complete documentation.