eellvviiss -- Command

Clone of Berkeley-standard screen editor
eellvviiss [ _o_p_t_i_o_n_s ] [ +_c_m_d ] [ _f_i_l_e_1 ... _f_i_l_e_2_7 ]

eellvviiss is a clone of vvii and eexx, the standard UNIX screen editors.

eellvviiss  is a  modal editor  whose  command structure  resembles the  eedd line
editor.   _M_o_d_a_l  means  that  a  keystroke  assumes  a  different  meaning,
depending upon  the mode that  the editor is  in.  eellvviiss uses  three modes:
_v_i_s_u_a_l-_c_o_m_m_a_n_d _m_o_d_e, _c_o_l_o_n-_c_o_m_m_a_n_d _m_o_d_e, and _i_n_p_u_t _m_o_d_e.

The following sections summarize the commands associated with each mode:

_V_i_s_u_a_l-_C_o_m_m_a_n_d _M_o_d_e
Visual-command mode  closely resembles text-input  mode.  One quick  way to
tell the modes  apart is to press the <eesscc>  key.  If eellvviiss beeps, then you
are in  visual-command mode.  If it  does not beep, then  you were in input
mode, but pressing <eesscc> switched you to visual-command mode.

Most visual-mode commands are one  keystroke long.  The commands are in two
groups: movement  commands and edit  commands.  The former  group moves the
cursor through the file being edited, and the latter group alters text.

The following sections summarize the command set for eellvviiss's visual-command
mode.

_V_i_s_u_a_l-_M_o_d_e _M_o_v_e_m_e_n_t _C_o_m_m_a_n_d_s
The  following  summarizes  the  visual  mode's movement  commands.   _c_o_u_n_t
indicates that  the command can be optionally prefaced  by an argument that
tells  eellvviiss how  often to  execute the command.   _m_o_v_e indicates  that the
command can be  followed by a movement command, after  which the command is
executed on  the text  that lies  between the point  where the  command was
first  typed and  the point  to  which the  cursor was  moved.  Typing  the
command a second  time executes the command for the  entire line upon which
the cursor is  positioned.  _k_e_y means that the command  must be followed by
an argument.

<ccttrrll-BB>     Move up by one screenful.
[_c_o_u_n_t] <ccttrrll-DD>
             Scroll down _c_o_u_n_t lines (default, one-half screenful).
[_c_o_u_n_t] <ccttrrll-EE>
             Scroll up _c_o_u_n_t lines.
<ccttrrll-FF>     Move down by one screenful.
<ccttrrll-GG>     Show file status and the current line.
[_c_o_u_n_t] <ccttrrll-HH>
             Move one character to the left.
[_c_o_u_n_t] <ccttrrll-JJ>
             Move down _c_o_u_n_t lines.
<ccttrrll-LL>     Redraw the screen.
[_c_o_u_n_t] <ccttrrll-MM>
             Move to the beginning of the next line.
[_c_o_u_n_t] <ccttrrll-NN>
             Move down _c_o_u_n_t lines (default, one).
[_c_o_u_n_t] <ccttrrll-PP>
             Move up _c_o_u_n_t lines (default, one).
<ccttrrll-RR>     Redraw the screen.
[_c_o_u_n_t] <ccttrrll-UU>
             Scroll up _c_o_u_n_t lines (default, one-half screenful).
[_c_o_u_n_t] <ccttrrll-XX>
             Move the cursor to column _c_o_u_n_t on the current line.
[_c_o_u_n_t] <ccttrrll-YY>
             Scroll down _c_o_u_n_t lines.
<ccttrrll-]>     If the cursor is on a tag name, go to that tag.
<ccttrrll-^>     Switch to the previous file.
[_c_o_u_n_t] <ssppaaccee>
             Move right _c_o_u_n_t spaces (default, one).
<qquuoottaattiioonn mmaarrkk> _k_e_y
             Select which cut buffer to use next.
$            Move to the end of the current line.
%            Move to the matching (){}[] character.
[_c_o_u_n_t] %    Move _c_o_u_n_t percentage into the file.  For example, the command
             5500% moves the cursor to the middle of the file.
' _k_e_y        Move to a marked line.
[count] (    Move backward _c_o_u_n_t sentences (default, one).
[_c_o_u_n_t] )    Move forward _c_o_u_n_t sentences (default, one).
*            Go to the next error in the error list.
[_c_o_u_n_t] +    Move to the beginning of the next line.
[_c_o_u_n_t] ,    Repeat the previous ff  or tt command, but  move in the opposite
             direction.
[_c_o_u_n_t] -    Move to the beginning of the preceding line.
[_c_o_u_n_t] .    Repeat the previous _e_d_i_t command.
/ _t_e_x_t       Search forward for _t_e_x_t, which can be a regular expression.
00            If not part  of a count,  move to the first  character of this
             line.
:            Switch to colon-command mode to execute one command.
[_c_o_u_n_t] ;    Repeat the previous ff or tt command.
? _t_e_x_t       Search backwards for _t_e_x_t, which can be a regular expression.
@ _k_e_y        Execute the contents of a cut-buffer as vvii commands.
[_c_o_u_n_t] BB    Move backwards _c_o_u_n_t words (default, one).
[_c_o_u_n_t] EE    Move forwards _c_o_u_n_t words (default, one).
[_c_o_u_n_t] FF _k_e_y
             Move left to  the _c_o_u_n_t'th  occurrence of the  given character
             (default, first).
[_c_o_u_n_t] GG    Move to to line _c_o_u_n_t (default, last).
[_c_o_u_n_t] HH    Move to the top of the screen.
[_c_o_u_n_t] LL    Move to the bottom of the screen.
MM            Move to the middle of the screen.
NN            Repeat the last search, but in the opposite direction.
PP            Paste text before the cursor.
QQ            Shift to colon-command mode.
[_c_o_u_n_t] TT _k_e_y
             Move left _a_l_m_o_s_t to the given character.
UU            Undo all recent changes to the current line.
VV [_m_o_v_e...][_c_o_m_m_a_n_d]
             Like vv,  described below,  except it  applies to  whole lines.
             For  example,  the command  VVjjjj>  first  highlights  and  then
             indents three lines.  It is equivalent to >22jj or 33>>.
[_c_o_u_n_t] WW    Move forward _c_o_u_n_t words (default, one).
[_c_o_u_n_t] YY    Copy (or ``yank'')   _c_o_u_n_t lines  into a cut  buffer (default,
             one).
ZZ ZZ          Save the file and exit.
[ [          Move back one section.
] ]          Move forward one section.
^            Move to the beginning of the current line, but after indent.
` _k_e_y        Move to the _k_e_y character.
[_c_o_u_n_t] bb    Move back _c_o_u_n_t words.
[_c_o_u_n_t] ee    Move forward to the end of the _c_o_u_n_t'th word.
[_c_o_u_n_t] ff _c  Move rightward to the _c_o_u_n_t'th occurrence of character _c.
[_c_o_u_n_t] hh    Move left _c_o_u_n_t characters (default, one).
[_c_o_u_n_t] jj    Move down _c_o_u_n_t characters (default, one).
[_c_o_u_n_t] kk    Move up _c_o_u_n_t characters (default, one).
[_c_o_u_n_t] ll    Move right _c_o_u_n_t characters (default, one).
mm _k_e_y        Mark a line or character.
nn            Repeat the previous search.
pp            Paste text after the cursor.
[_c_o_u_n_t] tt _k_e_y
             Move rightward _a_l_m_o_s_t to the _c_o_u_n_t'th  occurrence of the given
             character (default, one).
uu            Undo the previous edit command.
vv [_m_o_v_e ...][_c_o_m_m_a_n_d]
             Highlight text as the  cursor is moved, then  apply _c_o_m_m_a_n_d to
             the highlighted text.  For example, vvwwwwwwdd is approximately the
             same as  33ddww.  To cancel  the selection  without altering  the
             text, press vv a second time.
[_c_o_u_n_t] ww    Move forward _c_o_u_n_t words (default, one).
yy _m_o_v_e       Copy (or ``yank'') text into a cut buffer.
zz _k_e_y        Scroll the screen, repositioning the  current line as follows:
             + indicates  top of  the screen,  --  indicates the  bottom, .
             indicates the middle.
[_c_o_u_n_t] {    Move back _c_o_u_n_t paragraphs (default, one).
[_c_o_u_n_t] |    Move to the _c_o_u_n_t'th column on the screen (leftmost, one).
[_c_o_u_n_t] }    Move forward _c_o_u_n_t paragraphs (default, one).

_V_i_s_u_a_l-_M_o_d_e _E_d_i_t _C_o_m_m_a_n_d_s
The following describes the visual mode's editing commands.

! [_m_o_v_e]     Run the selected text through an external filter program.
!!           Replace the  current  line  with  the  output of  an  external
             command.
[_c_o_u_n_t] #    Increment a number by _c_o_u_n_t (default, one).
[_c_o_u_n_t] &    Repeat the previous :ss// command _c_o_u_n_t times (default, once).
< _m_o_v_e       Shift the enclosed text left.
=[_m_o_v_e]      Filter the affected  text.  The  default filter is  ffmmtt, which
             performs simple paragraph formatting and word wrap.  To change
             the filter used by =, use the command :sseett eepp=_f_i_l_t_e_r__n_a_m_e.
> _m_o_v_e       Shift the enclosed text right.
[_c_o_u_n_t] AA _i_n_p_u_t
             Append input to end of the line.
CC _i_n_p_u_t      Change text from the cursor through the end of the line.
DD            Delete text from the cursor through the end of the line.
[_c_o_u_n_t] II _i_n_p_u_t
             Insert text at the beginning of the line (after indentations).
[_c_o_u_n_t] JJ    Join lines the current with the following line.
KK            Look up the word under the cursor.  The default lookup program
             is rreeff.  You can  change KK  so as to  get C  language run-time
             library help for  the word under  the cursor by  executing the
             command:

                 set kp="help -f/usr/lib/helpfile -i/usr/lib/helpindex -d@"

             You can place this line into file $HHOOMMEE/.eexxrrcc.
[_c_o_u_n_t] OO _i_n_p_u_t
             Open a new line above the current line.
RR _i_n_p_u_t      Overtype.
[_c_o_u_n_t] SS _i_n_p_u_t
             Change lines, like cccc.
[_c_o_u_n_t] XX    Delete _c_o_u_n_t characters from the left  of the cursor (default,
             one).
[_c_o_u_n_t] aa _i_n_p_u_t
             Insert text after the cursor.
cc _m_o_v_e       Change text.
dd _m_o_v_e       Delete text.
[_c_o_u_n_t] ii _i_n_p_u_t
             Insert text at the cursor.
[_c_o_u_n_t] oo _i_n_p_u_t
             Open a new line below the current line.
[_c_o_u_n_t] rr _k_e_y
             Replace _c_o_u_n_t characters with text you type (default, one).
[_c_o_u_n_t] ss _i_n_p_u_t
             Replace _c_o_u_n_t characters with text you type (default, one).
[_c_o_u_n_t] xx    Delete the character at which the cursor is positioned.
\            Pop up a menu of the most common operations.
[_c_o_u_n_t] ~    Toggle a character between upper case and lower case.

_C_o_l_o_n-_M_o_d_e _C_o_m_m_a_n_d_s
The following summarizes the set of colon-mode commands.  It is no accident
that these  commands closely  resemble those for  the eedd line  editor: they
come, in  fact, from  eexx, the  editor upon which  both vvii (the  UNIX visual
editor) and  eedd derive.  For  that reason, colon-command  mode is sometimes
called eexx mode.

_l_i_n_e indicates  whether the command can  be executed on one  or more lines.
_l_i_n_e  can be  a regular  expression.   Some commands  can be  used with  an
optional exclamation  point; if done  so, the editor assumes  you know what
you are  doing and  suppresses the warnings  and prompts it  would normally
issue for these commands.

Most commands can be invoked simply  by typing the first one or two letters
of their names.
aabbbbrr [_w_o_r_d _f_u_l_l__f_o_r_m]
             Define _w_o_r_d as an abbreviation for _f_u_l_l__f_o_r_m.
[_l_i_n_e] aappppeenndd
             Insert text after the current line.
aarrggss [_f_i_l_e_1 ... _f_i_l_e_N]
             With no  arguments, print  the files  list on  eellvviiss's command
             line.  With  one or  more arguments,  change  the name  of the
             current file.
cccc [_f_i_l_e_s]   Invoke the  C  compiler to  compile _f_i_l_e_s,  and redirects  all
             error messages  into file eerrrrlliisstt.  After the  compiler exits,
             scan the  contents of  eerrrrlliisstt for error  messages; if  one is
             found, jump to the line and  file indicated on the error line,
             and display the error message on the status line.
ccdd [_d_i_r_e_c_t_o_r_y]
             Switch  the current  working  directory.   With  no  argument,
             switch to the $HHOOMMEE directory.
[_l_i_n_e][,_l_i_n_e] cchhaannggee [``_x]
             Replace the range of lines with the contents of cut-buffer _x.
cchhddiirr [_d_i_r_e_c_t_o_r_y]
             Same as the ccdd command.
ccoolloorr [_w_h_e_n] [[_t_y_p_e] _c_o_l_o_r] [_o_n _c_o_l_o_r]
             The command ccoolloorr  works only  if you have  an ANSI-compatible
             color terminal.   The  _w_h_e_n clause  defines the  type of  text
             whose color  is  being  manipulated:  normal, standout,  bold,
             underlined, italic,  and popup.  The  default is  normal.  The
             first letter of  each may be  used as an  abbreviation.  _c_o_l_o_r
             can be one  of the following:  black, blue, green,  cyan, red,
             magenta, brown,  white,  yellow, and  gray  (or grey).   Valid
             color _t_y_p_es can  be one of  the following: light  (bright) and
             blinking.

             The first ccoolloorr  command _m_u_s_t specify both  the foreground and
             background colors; the background color thereafter defaults to
             the  background  color  of  normal  text.   For  example,  the
             commands

                 color light cyan on blue
                 color b bright white

             set the normal text to light cyan in the foreground and a blue
             background; and then set the foreground color for bold text to
             bright white.

             Not all valid  ccoolloorr commands work  as expected on  the system
             console, due  to  limitations in  the current  release of  the
             aannssiippcc device driver.
[_l_i_n_e][,_l_i_n_e] ccooppyy _t_a_r_g_e_t_l_i_n_e
             Copy the range of lines to after the _t_a_r_g_e_t_l_i_n_e.
[_l_i_n_e][,_l_i_n_e] ddeelleettee [``_x]
             Move the range of lines into cut buffer _x.
ddiiggrraapphh[!] [_X_X [_Y]]
             Set _X_X  as a  digraph for  _Y. With  no arguments,  display all
             currently defined digraphs.   With one argument,  undefine the
             argument as a digraph.
eeddiitt[!] [_f_i_l_e]
             Edit a file not named on the eellvviiss command line.
eerrrrlliisstt[!] [_e_r_r_l_i_s_t]
             Find the  next  error message  in file  eerrrrlliisstt, as  generated
             through eellvviiss's cccc or mmaakkee commands.
ffiillee [_f_i_l_e]  With an argument, change  the output file to  _f_i_l_e. Without an
             argument, print information about the current output file.
[_l_i_n_e][,_l_i_n_e] gglloobbaall /_r_e_g_e_x_p/ _c_o_m_m_a_n_d
             Search the  range  of lines  for  all lines  that contain  the
             regular expression _r_e_g_e_x_p, and execute _c_o_m_m_a_n_d upon each.
[_l_i_n_e] iinnsseerrtt
             Insert text before the current line.
[_l_i_n_e][,_l_i_n_e] jjooiinn
             Concatenate the range of lines into one line.
[_l_i_n_e][,_l_i_n_e] lliisstt
             Display the  requested  range of  lines,  making all  embedded
             control characters explicit.
mmaakkee [_t_a_r_g_e_t]
             Same as the cccc command, except that mmaakkee is executed.
mmaapp[!] _k_e_y _m_a_p_p_e_d__t_o
             Remap _k_e_y  to _m_a_p_p_e_d__t_o. Normally,  remapping applies  just to
             visual-command mode; `!'  tells eellvviiss  to remap the  key under
             all modes.  With no arguments, show all current key mappings.
[_l_i_n_e] mmaarrkk _x
             Set a mark on _l_i_n_e, and name it _x.
mmkkeexxrrcc       Save current  configuration into file  ./.eexxrrcc, which  will be
             read next time you invoke eellvviiss.
[_l_i_n_e][,_l_i_n_e] mmoovvee _t_a_r_g_e_t_l_i_n_e
             Move the range of lines to after _t_a_r_g_e_t_l_i_n_e.
nneexxtt[!] [_f_i_l_e_s]
             Switch to the next file on the eellvviiss command line.
NNeexxtt[!]      Switch to the preceeding file on the eellvviiss command line.
[_l_i_n_e][,_l_i_n_e] nnuummbbeerr
             Display the range of lines, with line numbers.
pprreevviioouuss[!]  Switch to the preceeding file on the eellvviiss command line.
[_l_i_n_e][,_l_i_n_e] pprriinntt
             Display the specified range of lines.
[_l_i_n_e] ppuutt [``_x]
             Copy text from cut buffer _x after the current line.
qquuiitt[!]      Quit eellvviiss, and return to the shell.
[_l_i_n_e] rreeaadd _f_i_l_e
             Read the contents of _f_i_l_e and insert them after lliinnee (default,
             the last line).
rreewwiinndd[!]    Switch to the first file on the eellvviiss command line.
sseett [_o_p_t_i_o_n_s]
             Set an eellvviiss option.  For details, see the section on OOppttiioonnss,
             below
sshheellll        Invoke a shell.
ssoouurrccee _f_i_l_e  Read a set of colon-mode commands from _f_i_l_e, and execute them.
[_l_i_n_e][,_l_i_n_e] ssuubbssttiittuuttee /_r_e_g_e_x_p/_r_e_p_l_a_c_e_m_e_n_t/[_p][_g][_c]
             For the range of  lines, replace the first  instance of _r_e_g_e_x_p
             with _r_e_p_l_a_c_e_m_e_n_t. _p  tells eellvviiss to  print the _l_a_s_t  line upon
             which a substitution was performed.  _g  means perform a global
             substitution, i.e.,  replace all instances  of _r_e_g_e_x_p  on each
             line with _r_e_p_l_a_c_e_m_e_n_t.  _c tells eellvviiss to  ask for confirmation
             before performing each substitution.
ttaagg[!] _t_a_g_n_a_m_e
             Find _t_a_g_n_a_m_e in file ttaaggss, which records information about all
             tags.  If found, jump to the  file and line upon which the tag
             is set.
[_l_i_n_e][,_l_i_n_e] ttoo _t_a_r_g_e_t_l_i_n_e
             Copy the range of lines to after the _t_a_r_g_e_t_l_i_n_e.
uunnaabbbbrr _w_o_r_d  Unabbreviate _w_o_r_d.
uunnddoo         Undo the last editing command.
uunnmmaapp[!] _k_e_y
             Unmap _k_e_y.
vveerrssiioonn      Display the current version of eellvviiss.
[_l_i_n_e][,_l_i_n_e] vvgglloobbaall /_r_e_g_e_x_p/ _c_o_m_m_a_n_d
             Search the range  of lines for  all lines that  do not contain
             the regular expression _r_e_g_e_x_p, and execute _c_o_m_m_a_n_d upon each.
vviissuuaall       Enter visual-command mode.
wwqq           Save the changed file, and exit.
[_l_i_n_e][,_l_i_n_e] wwrriittee[!] [[>>]_f_i_l_e]
             Write the file being  edited into _f_i_l_e. With  the >> argument,
             append the edited text onto the end of _f_i_l_e.
xxiitt[!]       Same as the wwqq  command, described above, except  that it does
             not write files that have not changed.
[_l_i_n_e][,_l_i_n_e] yyaannkk [``_x]
             Copy the range of lines into cut buffer _x.
[_l_i_n_e][,_l_i_n_e] ! _c_o_m_m_a_n_d
             Execute _c_o_m_m_a_n_d under a subshell, then return.
[_l_i_n_e][,_l_i_n_e] <
             Shift the range of lines left by one tabwidth.
[_l_i_n_e][,_l_i_n_e] =
             With no  range of  lines specified,  print  the number  of the
             current line.  With line arguments, print the endpoints of the
             lines in question,  and the number  of lines that  lie between
             them.  (Remember, _l_i_n_e can be a  regular expression as well as
             a number.)
[_l_i_n_e][,_l_i_n_e] >
             Shift the range of lines right by one tabwidth.
[_l_i_n_e][,_l_i_n_e] &
             Repeat the last substitution command.
@ xx          Read the  contents  of cut-buffer  _x  as a  set of  colon-mode
             commands, and  execute  them.   With  no  arguments, list  all
             current settings.

_O_p_t_i_o_n_s
As noted above, the command  sseett can set eellvviiss's internal options.  Options
come  in three  flavors: _b_o_o_l_e_a_n,  which turn  on or off  a feature  of the
editor; _s_t_r_i_n_g which define the string associated with a particular action;
(e.g.,  the  name of  a  command  or feature);  and  _n_u_m_e_r_i_c,  which set  a
dimension  for the  editor (e.g.,  the  number of  rows or  columns on  the
terminal screen).  To turn off a  boolean option, prefix it with the string
``no''.

The  following lists  the  options that  sseett recognizes.   Assume that  the
boolean options are on, unless the entry says otherwise:

aauuttooiinnddeenntt (boolean)
               Auto-indent during input?  Default is nnoo.
aauuttoopprriinntt (boolean)
               When in eexx mode, print the current line.
aauuttoottaabb (boolean)
               Can auto-indent use tabs?
aauuttoowwrriittee (boolean)
               Is auto-write on when switching files?  Default is nnoo.
bbeeaauuttiiffyy (boolean)
               Should  the editor  strip  control characters  from a  file?
               Default is nnoo.
cchhaarraattttrr (boolean)
               Interpret \fX sequences?  Default is nnoo.
cccc (string)    Name of the C compiler.  Default is cccc -cc.
ccoolluummnnss (numeric)
               Width of the screen.  Default is 80.
ddiiggrraapphh (boolean)
               Recognize digraphs?  Default is nnoo.
ddiirreeccttoorryy (string)
               Where are temporary files kept?  Default is /uussrr/ttmmpp.
eeddccoommppaattiibbllee (boolean)
               Remember ``:s//'' options?  Default is nnoo.
eeqquuaallpprrgg (boolean)
               Program to run for the `=' operator.  Default is ffmmtt.
eerrrroorrbbeellllss (boolean)
               Beep when an error occurs.
eexxrrcc (boolean) Read the ./.eexxrrcc file?  Default is nnoo.
eexxrreeffrreesshh (boolean)
               Write lines individually when in eexx mode.
ffllaasshh (boolean)
               Use visible alternative to bell.
fflliippccaassee (string)
               Non-ASCII chars flipped by the tilde character `~'.  Default
               is the NULL string.
hhiiddeeffoorrmmaatt (boolean)
               Hide text formatter commands.
iiggnnoorreeccaassee (boolean)
               Make searches case sensitive.  While in iiggnnoorreeccaassee mode, the
               searching mechanism  does not distinguish  between an upper-
               case letter and  its lower-case form.  In nnooiiggnnoorreeccaassee mode,
               upper case  and lower case  are treated as  being different.
               Default is nnoo.
iinnppuuttmmooddee (boolean)
               Start vvii in insert mode?  Default is nnoo.
kkeeyyttiimmee (numeric)
               Timeout for mapped key entry.  Default is two.
kkeeyywwoorrddpprrgg (string)
               Path name of program invoked by sshhiifftt-KK.  Default is rreeff.
lliinneess (numeric)
               Number of lines on the screen.  Default is 25.
lliisstt (boolean) Display lines in lliisstt mode?  Default is nnoo.
mmaaggiicc (boolean)
               Enable the use of regular expressions in a search.  While in
               mmaaggiicc mode,  all meta-characters behave  as described above.
               In nnoommaaggiicc mode, only ^ and $ retain their special meaning.
mmaakkee (string)  Name of the ``make'' program.  Default is mmaakkee.
mmeessgg (boolean) Allow messages from other users?
mmooddeelliinneess (boolean)
               Are mode lines processed?  Default is nnoo.
mmoorree (boolean) Pause between messages?
nneeaarrssccrroollll (numeric)
               This  governs  when  to scroll  versus  when  to redraw  the
               screen.   If you  move the  cursor more  than the  number of
               lines  set  by   this  option,  eellvviiss  redraws  the  screen;
               otherwise, it scrolls the screen.  The default is 15 lines.
nnoovviiccee (boolean)
               Set options for ease of use?  Default is nnoo.
nnuummbbeerr (boolean)
               Turn on line numbering.
ppaarraaggrraapphhss (string)
               Names   of  nnrrooffff   ``paragraph''   commands.   Default   is
               PPPPppppIIPPLLPPQQPP.
pprroommpptt (boolean)
               Show `:' prompt in eexx mode.
rreeaaddoonnllyy (boolean)
               Prevent overwriting of original file.  Default is nnoo.
rreemmaapp (boolean)
               Allow key maps to call other key maps.
rreeppoorrtt (numeric)
               Report  when a  given number of  changes occur.   Default is
               five.
rruulleerr (boolean)
               Display line and column numbers.  Default is nnoo.
ssccrroollll (numeric)
               Set the number of lines the screen scrolls with the <ccttrrll-DD>
               and <ccttrrll-UU> commands.  Default is 12.
sseeccttiioonnss (string)
               Names of nnrrooffff ``section'' commands.  Default is NNHHSSHHSSSSSSEEssee.
sshheellll (string) Path name of the shell.  Default is /bbiinn/sshh.
sshhoowwmmaattcchh (boolean)
               Show  all   matching  parentheses,  brackets,   and  braces.
               Default is nnoo.
sshhoowwmmooddee (boolean)
               Say when editor is in input mode.  Default is nnoo.
sshhiiffttwwiiddtthh (numeric)
               Set  number of  characters the  < and  > commands  shift the
               screen.  Default is eight.
ssiiddeessccrroollll (numeric)
               Set number of columns the editor scrolls.  Default is eight.
ssyynncc (boolean) Call ssyynncc() often?  Default is nnoo.
ttaabbssttoopp (numeric)
               Number of columns set by a tab character.  Default is eight.
ttaagglleennggtthh (numeric)
               Number of significant  characters in a tag name.  Default is
               zero.
ttaaggss (string)  Name the list of ``tags'' files that eellvviiss can read.
ttaaggssttaacckk (boolean)
               Enable the tagstack.  Default is nnoo.
tteerrmm (string)  Name of  the current  terminal's tteerrmmccaapp entry.   Default is
               $TTEERRMM.
tteerrssee (boolean)
               Give shorter error messages?  Default is nnoo.
ttiimmeeoouutt (boolean)
               Distinguish <eesscc> from an arrow key?
wwaarrnn (boolean) Warn if a file has been modified?
wwiinnddooww (numeric)
               Number of lines to redraw after long move.  Default is 24.
wwrraappmmaarrggiinn (numeric)
               Left margin  to use when wrapping long  lines in input mode.
               Default is zero.
wwrraappssccaann (boolean)
               Searches wrap from end to beginning of the file.
wwrriitteeaannyy (boolean)
               Let the write command :ww clobber a file.  Default is nnoo.

_I_n_p_u_t-_M_o_d_e _C_o_m_m_a_n_d_s
Most keystrokes  are interpreted as  being text and  inserted directly into
the  text; however,  some  keystrokes are  still  interpreted as  commands.
Thus, you  can perform an entire session of  simple editing directly within
input mode without switching to either of the command modes.

The following summarizes the  commands that can be executed directly within
input mode:

<ccttrrll-AA>     Insert a copy of the last input text.
<ccttrrll-CC>     Send the signal SSIIGGIINNTT to interrupt a command.
<ccttrrll-DD>     Delete one indent character.
<ccttrrll-HH>     Erase the character before the cursor.
<ccttrrll-LL>     Redraw the screen.
<ccttrrll-MM>     Insert a newline.
<ccttrrll-PP>     Insert the contents of the cut buffer.
<ccttrrll-RR>     Redraw the screen, like <ccttrrll-LL>.
<ccttrrll-TT>     Insert an indent character.
<ccttrrll-UU>     Move to  the beginning  of the  line.  When  you are  typing a
             command line or  search pattern  on the bottom  line, <ccttrrll-UU>
             backspaces over all characters typed so far.
<ccttrrll-VV>     Insert the following keystroke, even if special.
<ccttrrll-WW>     Backspace to the beginning of the current word.
<ccttrrll-ZZ><ccttrrll-ZZ>
             Write the file and exit eellvviiss.
<eesscc>        Shift from input mode to visual-command mode.
<ddeell>        Delete the current character.

When eellvviiss is  in input mode, you can use  the keystroke <ccttrrll-OO> to invoke
_s_o_m_e visual  commands without exiting  from input mode.   For example, when
you are in input mode, typing <ccttrrll-OO>JJ moves down a line but leaves you in
input mode.

_C_o_m_m_a_n_d-_l_i_n_e _O_p_t_i_o_n_s
eellvviiss lets you  name up to 27 files on  the command line, thus allowing you
to edit  up to 27  files simultaneously.  The ``next  file'' and ``previous
file'' commands described above allow you to shift from one file to another
during the same editing session; in this way, for example, you can cut text
from one file and paste it into another.

eellvviiss recognizes the following command-line options:

-rr   Recover a  previous edit.   Because eellvviiss  uses the program  vviirreecc for
     file recovery,  invoking it with  this option simply  prints a message
     that tells you to run vviirreecc.
-RR   Invoke eellvviiss  in ``read-only'' mode.   This is equivalent  to invoking
     eellvviiss via the link vviieeww.
-tt _t_a_g
     Begin editing at _t_a_g.
-mm [ _f_i_l_e ]
     Invoke  eellvviiss in  error-handling mode.  It  searches through  _f_i_l_e for
     something  that looks  like  an error  message from  a compiler,  then
     positions the cursor at that point for editing.
-ee   Begin in colon-command mode.
-vv   Begin in visual-command mode.
-ii   Begin in input mode.
-ww _w_i_n_s_i_z_e
     Set the value of option wwiinnddooww, which sets the size of the screen with
     which eellvviiss works, to _w_i_n_s_i_z_e. wwiinnddooww is described below.
+_c_o_m_m_a_n_d
     Execute _c_o_m_m_a_n_d immediately upon beginning editing.  For example

         elvis +237 foo
     causes eellvviiss  to move directly to line  237 immediately upon beginning
     to edit file ffoooo.

_R_e_g_u_l_a_r _E_x_p_r_e_s_s_i_o_n_s
eellvviiss uses regular  expressions for searching and substitutions.  A regular
expression is a text string in which some characters have special meanings.
This is much more powerful than simple text matching.

eellvviiss's rreeggeexxpp  package treats the following  one- or two-character strings
(called meta-characters) in special ways:
\( \)
     Delimit subexpressions.   When the regular expression  matches a chunk
     of  text, eellvviiss  remembers  which portion  of that  chunk matched  the
     subexpression.  The command

         :s/regexp/newtext/

     command makes use of this feature.
^    Match  the beginning  of a  line.   For example,  to find  ffoooo at  the
     beginning of a line, use the regular expression /^ffoooo/. Note that ^ is
     a  metacharacter only  if  it occurs  at  the beginning  of a  regular
     expression; anywhere else, it is treated as a normal character.
$    Match the end of a line.  It is a metacharacter only when it occurs at
     the end of a regular expression;  elsewhere, it is treated as a normal
     character.   For example,  the expression /$$/  searches for  a dollar
     sign at the end of a line.
\<   Match a  zero-length string at the  beginning of a word.   A word is a
     string  of  one or  more  letters  and digits;  it  can  begin at  the
     beginning of a line or after one or more non-alphanumeric characters.
\>   Matches a zero-length string at the  end of a word.  A word can end at
     the end of the line or before one or more non-alphanumeric characters.
     For example, /\<eenndd>/ finds any  instance of the word eenndd, but ignores
     any instances of ``end'' inside another word, such as ``calendar''.
.    Match any single character.
[_c_h_a_r_a_c_t_e_r-_l_i_s_t]
     Match  any  single  character  from  the  _c_h_a_r_a_c_t_e_r-_l_i_s_t.  Inside  the
     _c_h_a_r_a_c_t_e_r-_l_i_s_t, you  can denote  a span  of characters by  writing the
     first  and  last  characters, with  a  hyphen  between  them.  If  the
     character-list is  preceded by a  ^, then the  list is inverted  -- it
     matches all  characters not mentioned in the  list.  For example, /[aa-
     zzAA-ZZ]/ matches  any letter, and  /[^ ]/ matches anything  other than a
     blank.
\{_n\}
     Repeat the  preceding expression _n  times.  This operator  can only be
     placed after something  that matches a single character.  For example,
     /^-\{8800\}$/ matches a  line of eighty hyphens, and /\<[aa-zzAA-ZZ]\{44\}\>/
     matches any four-letter word.
\{_n,_m\}
     Repeat  the  preceding single-character  expression  between  _n and  _m
     times, inclusive.  If the _m is omitted (but the comma is present) then
     it is taken to  be infinity.  For example, /"[^"]\{33,55\}"/ matches any
     pair  of  quotation  marks that  enclose  three,  four,  or five  non-
     quotation characters.
*    Repeat the  preceding single-character expression zero  or more times.
     For example, /.*/ matches a whole line.
/+   Repeat the  preceding single-character  expression one or  more times.
     It is  equivalent to \{11,\}. For example, /.\+/  matches a whole line,
     but only  if the line  contains at least  one character.  It  does not
     match empty lines.
/?   The preceding single-character expression is optional -- that is, that
     it can  occur zero  or one  times.  It is  equivalent to  \{00,11\}. For
     example, /nnoo[- ]?oonnee/ matches nnoo oonnee, nnoo-oonnee, and nnoooonnee.

Anything else  is treated as a  normal character that must  exactly match a
character from  the scanned text.  The special strings  may all be preceded
by a backslash to force them to be treated normally.

_S_u_b_s_t_i_t_u_t_i_o_n_s
The  command :ss  has at  least two  arguments: a  regular expression  and a
substitution  string.  The  text  that matches  the  regular expression  is
replaced by text that is derived from the substitution string.

Most  characters  in  the substitution  string  are  copied  into the  text
literally but a few have special meaning:

&    Insert a copy of the original text.
~    Insert a copy of the previous replacement text.
\11   Insert a  copy of that portion  of the original text  that matched the
     first set of parentheses.
\22-\99
     Do the same for the second and all subsequent pairs of parentheses.
\UU   Convert all characters of any later & or \# to upper case.
\LL   Convert all characters of any later & or \# to lower case.
\EE   End the effect of \UU or \LL.
\uu   Convert the first character of the next & or # to upper case.
\ll   Convert the first character of the next & or \# to lower case.

These may be preceded by a backslash to force them to be treated normally.

If nnoommaaggiicc  mode is in effect,  then & and ~ will  be treated normally, and
you must write them as \& and \~ for them to have special meaning.

_E_x_a_m_p_l_e_s
The first example changes every occurrence of ``utilize'' to ``use'':

    :%s/utilize/use/g

The next example  deletes all white space that occurs  at the end of a line
anywhere in  the file.  (The brackets  contain a single space  and a single
tab character):

    :%s/[   ]+$//
The next example converts the current line to upper case:

    :s/.*/U&/

The next example underlines each letter in the current line, by changing it
into an uunnddeerrssccoorree bbaacckkssppaaccee  lleetttteerr sequence.  (The <ccttrrll-HH> is entered as
<ccttrrll-VV><bbaacckkssppaaccee>):

    :s/[a-zA-Z]/_^H&/g

The  last example  locates the  last colon  in a line,  and swaps  the text
before  the  colon with  the  text  after the  colon.   The  first pair  of
parentheses  delimits  the stuff  before  the colon,  and  the second  pair
delimits the stuff after.  In the substitution text, \11 and \22 are given in
reverse order to perform the swap:

    :s/\(.*\):\(.*\)/\2:\1/

_E_n_v_i_r_o_n_m_e_n_t
eellvviiss reads the following environmental variables:

TTEERRMM This names your terminal's entry in the tteerrmmccaapp or tteerrmmiinnffoo data base.

TTEERRMMCCAAPP
     Optional.  If  your system uses  tteerrmmccaapp, and the  TTEERRMMCCAAPP variable is
     not   set,  then   eellvviiss   reads  your   terminal's  definition   from
     /eettcc/tteerrmmccaapp.  If TTEERRMMCCAAPP  is set  to  the full  path name  of a  file
     (beginning with a `/'),  it reads your terminal's description from the
     named file instead of from /eettcc/tteerrmmccaapp.  If TTEERRMMCCAAPP is set to a value
     that does not  begin with a `/', then eellvviiss  assumes that its value is
     the full tteerrmmccaapp entry for your terminal.

TTEERRMMIINNFFOO
     Optional.  eellvviiss  treats this exactly like  the environmental variable
     TTEERRMMCCAAPP, except for the tteerrmmiinnffoo data base.

LLIINNEESS
CCOOLLUUMMNNSS
     Optional.  These  variables, if  set, override the  screen-size values
     given  in the  tteerrmmccaapp  or tteerrmmiinnffoo  description of  your terminal  On
     windowing systems  such as  X, eellvviiss has  other ways to  determine the
     screen size, so you should probably leave these variables unset.

EEXXIINNIITT
     Optional.   This variable  can hold  eexx  commands that  eellvviiss executes
     before it reads any .eexxrrcc files.

SSHHEELLLL
     Optional.  This variable sets  the default value for the sshheellll option,
     which determines  which shell program  eellvviiss uses to  perform wildcard
     expansion in file names,  and to execute filters or external programs.
     The default value is /bbiinn/sshh.

HHOOMMEE This variable should be set to the name of your home directory.  eellvviiss
     looks for  its initialization  file there.  If  HHOOMMEE is not  set, then
     eellvviiss does not execute the initialization file.

TTAAGGPPAATTHH
     Optional.  This  variable is  used by the  program rreeff. See  "ref" for
     more information.

_C_h_a_n_g_e_s _f_r_o_m _V_e_r_s_i_o_n _1._6
COHERENT 4.2  includes version 1.7  of eellvviiss. The  following summarizes the
changes from version 1.6:

-> eellvviiss  returns one  if the  file was  not updated, zero  if it  was, and
   another  value  if an  error  occurred.   This is  the  opposite of  the
   behavior of version 1.6.

-> eellvviiss again supports tteerrmmccaapp strings kkss and kkee.

-> In autoindent  mode, if you  insert a newline  in front of  white space,
   eellvviiss deletes  that whitespace before  it inserts the  automatic indent.
   This makes eellvviiss' autoindent act more like that of orthodox vvii.

-> eellvviiss now behaves  rationally when it confronts a file  too large for it
   to handle.   If you try to  load a file that is  too large, it complains
   and exits.  (Earlier versions would  crash.) If the text grows too large
   during  editing, eellvviiss  warns you.   If you  ignore the  warnings, eellvviiss
   eventually preserves the text and exits NB: _T_h_i_s _i_s _n_o_t _1_0_0% _r_e_l_i_a_b_l_e!

-> The program eellvvpprrssvv now refuses to preserve a zero-length file.

-> eellvviiss version  1.7 now  supports tag  stacks.  (This was  implemented by
   user Periklis Beligrano.) This permits eellvviiss to save on a stack the file
   and position  of every tag  that you look  up.  To return  to a previous
   position, type <ccttrrll-TT> or :ppoopp.

-> When you enter an eexx command, <eesscc> now acts like <rreettuurrnn>.

-> Release 1.7  improves the behavior of  the commands (, ),  {, and }: the
   parentheses stop at paragraph  boundaries and the braces stop at section
   boundaries.

-> Under release 1.7, the commands  tt and TT behave more like under orthodox
   vvii: If you give the command tthh when the cursor is already adjacent to an
   hh, then the cursor does not move.  Earlier versions of eellvviiss skipped the
   adjacent hh and looked for one after that.

_F_i_l_e_s
/ttmmpp/eellvv* -- Temporary files
ttaaggss -- Data base used by the ttaaggss command
$HHOOMMEE/.eexxrrcc -- File that sets personal defaults
$HHOOMMEE/eellvviiss.rrcc -- Same as .eexxrrcc

_S_e_e _A_l_s_o
ccoommmmaannddss, eedd, eexx, ffmmtt, mmee, vvii, vviieeww

_N_o_t_e_s
Full documentation  for eellvviiss is  included with this  release in compressed
file /uussrr/ssrrcc/aalliieenn/EEllvviiss.ddoocc.ZZ.

eellvviiss is copyright  (c) 1990 by Steve Kirkendall, and  was written by Steve
Kirkendall  (kirkenda@cs.pdx.edu or  uunet!tektronix!psueea!eecs!kirkenda),
assisted by numerous  volunteers.  It is freely redistributable, subject to
the restrictions noted in included documentation.  Source code for eellvviiss is
available through  the Mark Williams  bulletin board, USENET,  and numerous
other outlets.

eellvviiss is distributed as a service  to COHERENT customers, as is.  It is not
supported by Mark Williams Company.  _C_a_v_e_a_t _u_t_i_l_i_t_o_r.
