







                   EExx//VVii RReeffeerreennccee MMaannuuaall

                        _K_e_i_t_h _B_o_s_t_i_c

                 Computer Science Division
 Department of Electrical Engineering and Computer Science
             University of California, Berkeley
                Berkeley, California  94720

                      August 16, 1994



                          _A_b_s_t_r_a_c_t




     This document is the reference guide for the 4.4BSD
implementations of nneexx/nnvvii, which are  reimplementations
of the historic Berkeley eexx/vvii editors.





                      _A_c_k_n_o_w_l_e_d_g_e_m_e_n_t_s




     Bruce  Englar  encouraged  the early development of
the historic eexx/vvii editor.  Peter Kessler  helped  bring
sanity  to  version  2's command layout.  Bill Joy wrote
versions 1 and 2.0 through 2.7, and created  the  frame-
work  that users see in the present editor.  Mark Horton
added macros and other features and made eexx/vvii work on a
large number of terminals and Unix systems.

     NNvvii is originally derived from software contributed
to the University of California, Berkeley by Steve Kirk-
endall, the author of the vvii clone eellvviiss.

     IEEE  Standard  Portable Operating System Interface
for Computer Environments (POSIX) 1003.2  style  Regular
Expression support was done by Henry Spencer.

     The  curses  library  was  originally  done  by Ken
Arnold.  Scrolling and reworking for  nnvvii  was  done  by
Elan Amir.















     The  Institute  of Electrical and Electronics Engi-
neers has given us permission  to  reprint  portions  of
their  documentation.   Portions  of  this  document are
reprinted and reproduced from IEEE Std 1003.2-1992, IEEE
Standard Portable Operating System Interface for Comput-
er Environments (POSIX), copyright 1992 by the Institute
of Electrical and Electronics Engineers, Inc.

     The  financial support of UUNET Communications Ser-
vices is gratefully acknowledged.





















































NNvvii//NNeexx RReeffeerreennccee                                   UUSSDD::1133--33


11..  DDeessccrriippttiioonn

     VVii is a screen oriented text editor.   EExx  is  a  line-
oriented text editor.  EExx and vvii are different interfaces to
the same program, and it is  possible  to  switch  back  and
forth  during  an  edit  session.  VViieeww is the equivalent of
using the --RR (read-only) option of vvii.

     This reference manual is  the  one  provided  with  the
nneexx/nnvvii  versions  of  the  eexx/vvii text editors.  NNeexx/nnvvii are
intended as  bug-for-bug  compatible  replacements  for  the
original  Fourth Berkeley Software Distribution (4BSD) eexx/vvii
programs.  This reference manual is accompanied by a  tradi-
tional-style  manual  page.   That manual page describes the
functionality found in eexx/vvii in far  less  detail  than  the
description  here.   In  addition,  it  describes the system
interface to  eexx/vvii,  e.g.  command  line  options,  session
recovery,  signals,  environmental  variables,  and  similar
things.

     This reference is intended for users  already  familiar
with eexx/vvii.  Anyone else should almost certainly read a good
tutorial on the editor first.  If you are in  an  unfamiliar
environment,  and you absolutely have to get work done imme-
diately, see the section entitled "FFaasstt SSttaarrttuupp" in the man-
ual page.  It is probably enough to get you started.

     There  are a few features in nneexx/nnvvii that are not found
in historic versions of eexx/vvii.  Some of the more interesting
of those features are briefly described in the section enti-
tled "AAddddiittiioonnaall FFeeaattuurreess" near the end  of  this  document.
For  the rest of this document, nneexx/nnvvii is used only when it
is necessary to distinguish it from the historic implementa-
tions of eexx/vvii.

     Future  versions  of this software will be periodically
made available by anonymous ftp, and can be  retrieved  from
ffttpp..ccss..bbeerrkkeelleeyy..eedduu, in the directory uuccbb//44bbssdd.

22..  SSttaarrttuupp IInnffoorrmmaattiioonn

     EExx/vvii  interprets  one  of  two  possible environmental
variables and reads up to three of five possible files  dur-
ing  startup.   The variables and files are expected to con-
tain eexx commands, not vvii commands.  In  addition,  they  are
interpreted _b_e_f_o_r_e the file to be edited is read, and there-
fore many eexx commands may not be used.  Generally, any  com-
mand that requires output to the screen or that needs a file
upon which to operate, will cause an error if included in  a
startup file or environmental variable.

     Because  the  eexx  command set supported by nneexx/nnvvii is a
superset of the command set  supported  by  most  historical










UUSSDD::1133--44                                   NNvvii//NNeexx RReeffeerreennccee


implementations  of  eexx,  nneexx/nnvvii  can use the startup files
created for the historical implementations, but the converse
may not be true.

     If  the  --ss (the historic - option) is specified, or if
standard input is redirected from a file, all  environmental
variables and startup files are ignored.

     Otherwise,  startup  files  and environmental variables
are handled in the following order:

 (1)   The file //eettcc//vvii..eexxrrcc is read, as long as it is owned
       by root or the effective user ID of the user.

 (2)   The  environmental  variable NNEEXXIINNIITT (or the variable
       EEXXIINNIITT, if NNEEXXIINNIITT is not set) is interpreted.

 (3)   If neither NNEEXXIINNIITT or EEXXIINNIITT was set,  and  the  HHOOMMEE
       environmental  variable is set, the file $$HHOOMMEE//..nneexxrrcc
       (or the file $$HHOOMMEE//..eexxrrcc, if  $$HHOOMMEE//..nneexxrrcc  does  not
       exist)  is  read, as long as the effective user ID of
       the user is root or is the same as the owner  of  the
       file.

 (4)   If the eexxrrcc option was turned on by one of the previ-
       ous startup information sources, the file ..nneexxrrcc  (or
       the file ..eexxrrcc, if ..nneexxrrcc does not exist) is read, as
       long as the effective user ID of the user is the same
       as the owner of the file.

     No  startup  file  is  read if it is writable by anyone
other than its owner.

     It is not an error for any of the startup environmental
variables or files not to exist.

     Once  all  environmental variables are interpreted, and
all startup files are read, the first file to be  edited  is
read  in  (or  a temporary file is created).  Then, any com-
mands specified using the --cc option  are  executed,  in  the
context of that file.

33..  RReeccoovveerryy

     There  is  no  recovery  program  for nneexx/nnvvii, nor does
nneexx/nnvvii run setuid.  Recovery files are created readable and
writable  by  the  owner  only.   Users may recover any file
which they can read, and the superuser may recover any  edit
session.

     Edit  sessions  are  backed  by  files in the directory
named    by    the    rreeccddiirr    option    (the     directory
//vvaarr//ttmmpp//vvii..rreeccoovveerr  by default), and are named "vvii..XXXXXXXXXXXX",










NNvvii//NNeexx RReeffeerreennccee                                   UUSSDD::1133--55


where "XXXXXXXXXXXX" is a number related to the process ID.   When
a  file is first modified, a second recovery file containing
an email message for the  user  is  created,  and  is  named
"rreeccoovveerr..XXXXXXXXXXXX",  where, again, "XXXXXXXXXXXX" is associated with
the process ID.  Both files are removed at the end of a nor-
mal  edit  session,  but  will remain if the edit session is
abnormally terminated or the user runs the eexx pprreesseerrvvee  com-
mand.

     The  rreeccddiirr  option  may be set in either the user's or
system's startup information, changing the  recovery  direc-
tory.  (Note, however, that if a memory based file system is
used as the backup directory, each system reboot will delete
all  of  the  recovery  files!   The same caution applies to
directories such as //ttmmpp which are cleared of their contents
by  a  system  reboot,  or  //uussrr//ttmmpp  which  is periodically
cleared of old files on many systems.)

     The recovery directory should be owned by root,  or  at
least  by a pseudo-user.  In addition, if directory "sticky-
bit" semantics are available, the directory should have  the
sticky-bit  set  so  that files may only be removed by their
owners.  The recovery directory must  be  read,  write,  and
executable by any user, i.e. mode 1777.

     If  the  recovery  directory does not exist, eexx/vvii will
attempt to create it.   This  can  result  in  the  recovery
directory  being  owned  by  a normal user, which means that
that user will be able to remove other user's  recovery  and
backup files.  This is annoying, but is not a security issue
as the user cannot otherwise access or modify the files.

     The recovery file has all of the necessary  information
in  it  to  enable the user to recover the edit session.  In
addition, it has all of  the  necessary  email  headers  for
_s_e_n_d_m_a_i_l(8).   When the system is rebooted, all of the files
in //vvaarr//ttmmpp//vvii..rreeccoovveerr named "rreeccoovveerr..XXXXXXXXXXXX" should be sent
to  their  owners, by email, using the --tt option of sseennddmmaaiill
(or  a  similar  mechanism  in  other  mailers).   If  eexx/vvii
receives  a hangup (SIGHUP) signal, or the user executes the
eexx pprreesseerrvvee command,  eexx/vvii  will  automatically  email  the
recovery information to the user.

     If your system does not have the sseennddmmaaiill utility (or a
mailer program which supports its interface) the source file
nnvvii//ccoommmmoonn//rreeccoovveerr..cc  will  have  to be modified to use your
local mail delivery programs.  Note, if nneexx/nnvvii  is  changed
to  use another mailer, it is important to remember that the
owner of the file given to the mailer is the  nneexx/nnvvii  user,
so nothing in the file should be trusted as it may have been
modified in an effort to compromise the system.












UUSSDD::1133--66                                   NNvvii//NNeexx RReeffeerreennccee


     Finally, the owner execute bit is set on  backup  files
when  they  are created, and unset when they are first modi-
fied, e.g. backup files that have no associated email recov-
ery  file  will  have  this bit set.  (There is also a small
window where empty files can be created  and  not  yet  have
this  bit set.  This is due to the method in which the files
are created.)  Such files should be deleted when the  system
reboots.

     A  simple  way to do this cleanup is to insert the fol-
lowing Bourne shell script into your //eettcc//rrcc..llooccaall (or other
startup)  file.   The  script  should work with the historic
Bourne shell, a POSIX 1003.2 shell or the  Korn  shell.   (A
copy      of      this     script     is     included     as
nnvvii//iinnssttaallll//rreeccoovveerr..ssccrriipptt in the nneexx/nnvvii distribution.)
















































NNvvii//NNeexx RReeffeerreennccee                                   UUSSDD::1133--77


    ##    @@((##))rreeccoovveerr..ssccrriipptt  88..77 ((BBeerrkkeelleeyy)) 88//1166//9944
    ##
    ## SSccrriipptt ttoo rreeccoovveerr nnvvii eeddiitt sseessssiioonnss..
    ##
    RREECCDDIIRR==//vvaarr//ttmmpp//vvii..rreeccoovveerr
    SSEENNDDMMAAIILL==//uussrr//lliibb//sseennddmmaaiill
    eecchhoo ''RReeccoovveerriinngg nnvvii eeddiittoorr sseessssiioonnss..''

    ## CChheecckk eeddiittoorr bbaacckkuupp ffiilleess..
    vviibbaacckkuupp==``eecchhoo $$RREECCDDIIRR//vvii..**``
    iiff [[ ""$$vviibbaacckkuupp"" !!== ""$$RREECCDDIIRR//vvii..**"" ]];; tthheenn
         ffoorr ii iinn $$vviibbaacckkuupp;; ddoo
              ## OOnnllyy tteesstt ffiilleess tthhaatt aarree rreeaaddaabbllee..
              iiff tteesstt !! --rr $$ii;; tthheenn
                   ccoonnttiinnuuee
              ffii

              ## UUnnmmooddiiffiieedd nnvvii eeddiittoorr bbaacckkuupp ffiilleess eeiitthheerr hhaavvee tthhee
              ## eexxeeccuuttee bbiitt sseett oorr aarree zzeerroo lleennggtthh..  DDeelleettee tthheemm..
              iiff tteesstt --xx $$ii --oo !! --ss $$ii;; tthheenn
                   rrmm $$ii
              ffii
         ddoonnee
    ffii

    ## IItt iiss ppoossssiibbllee ttoo ggeett iinnccoommpplleettee rreeccoovveerryy ffiilleess,, iiff tthhee eeddiittoorr ccrraasshheess
    ## aatt tthhee rriigghhtt ttiimmee..
    vviirreeccoovveerryy==``eecchhoo $$RREECCDDIIRR//rreeccoovveerr..**``
    iiff [[ ""$$vviirreeccoovveerryy"" !!== ""$$RREECCDDIIRR//rreeccoovveerr..**"" ]];; tthheenn
         ffoorr ii iinn $$vviirreeccoovveerryy;; ddoo
              ## OOnnllyy tteesstt ffiilleess tthhaatt aarree rreeaaddaabbllee..
              iiff tteesstt !! --rr $$ii;; tthheenn
                   ccoonnttiinnuuee
              ffii

              ## DDeelleettee aannyy rreeccoovveerryy ffiilleess tthhaatt aarree zzeerroo lleennggtthh,, ccoorrrruupptteedd,,
              ## oorr tthhaatt hhaavvee nnoo ccoorrrreessppoonnddiinngg bbaacckkuupp ffiillee..  EEllssee sseenndd mmaaiill
              ## ttoo tthhee uusseerr..
              rreeccffiillee==``aawwkk ''//^^XX--vvii--rreeccoovveerr--ppaatthh:://{{pprriinntt $$22}}'' << $$ii``
              iiff tteesstt --nn ""$$rreeccffiillee"" --aa --ss ""$$rreeccffiillee"";; tthheenn
                   $$SSEENNDDMMAAIILL --tt << $$ii
              eellssee
                   rrmm $$ii
              ffii
         ddoonnee
    ffii



     If you are not using the default value for  the  rreeccddiirr
option, be sure to substitute the value you're using for the
RREECCDDIIRR value in the recovery script.











UUSSDD::1133--88                                   NNvvii//NNeexx RReeffeerreennccee


     If the path of your system's sseennddmmaaiill program (or what-
ever  mailer you're using) is not //uussrr//lliibb//sseennddmmaaiill, be sure
to substitute the correct pathname for the SSEENNDDMMAAIILL value in
the recovery script.  Consult the manual page for details on
recovering preserved or aborted editing sessions.

44..  SSiizziinngg tthhee SSccrreeeenn

     The size of the screen can be set in a number of  ways.
EExx/vvii  takes  the  following steps until values are obtained
for both the number of rows and number  of  columns  in  the
screen.

 (1)   If  the  environmental  variable  LLIINNEESS exists, it is
       used to specify the number of rows in the screen.

 (2)   If the environmental variable CCOOLLUUMMNNSS exists,  it  is
       used  to specify the number of columns in the screen.

 (3)   The TIOCGWINSZ _i_o_c_t_l(2) is attempted on the  standard
       error file descriptor.

 (4)   The  termcap  entry  (or  terminfo  entry on System V
       machines) is checked for the "li"  entry  (rows)  and
       the "co" entry (columns).

 (5)   The  number  of  rows is set to 24, and the number of
       columns is set to 80.

     If a window change size signal (SIGWINCH) is  received,
the  new  window  size  is  retrieved  using  the TIOCGWINSZ
_i_o_c_t_l(2) call, and all other information is ignored.

55..  CChhaarraacctteerr DDiissppllaayy

     In both eexx and vvii printable characters  as  defined  by
_i_s_p_r_i_n_t(3) are displayed using the local character set.

     Non-printable  characters, for which _i_s_c_n_t_r_l(3) returns
true, and which are less than octal \076, are  displayed  as
the  string "^^<<cchhaarraacctteerr>>", where <<cchhaarraacctteerr>> is the charac-
ter that is the original character's value offset  from  the
"@@"  character.   For  example,  the octal character \001 is
displayed as "^^AA".  If _i_s_c_n_t_r_l(3) returns true for the octal
character  \177,  it  is  displayed as the string "^^??".  All
other characters are displayed as either hexadecimal values,
in  the form "00xx<<hhiigghh--hhaallffbbyyttee>> ...... 00xx<<llooww--hhaallffbbyyttee>>", or as
octal  values,  in  the  form  "\\<<hhiigghh--oonnee--oorr--ttwwoo--bbiittss>>  ......
\\<<llooww--tthhrreeee--bbiittss>>".   The  display  of unknown characters is
based on the value of the ooccttaall option.

     In vvii command mode, the cursor is always positioned  on
the  last  column  of characters which take up more than one










NNvvii//NNeexx RReeffeerreennccee                                   UUSSDD::1133--99


column on the screen.  In vvii text input mode, the cursor  is
positioned  on  the first column of characters which take up
more than one column on the screen.

66..  MMuullttiippllee SSccrreeeennss

     NNvvii supports multiple screens by  dividing  the  window
into regions.  It also supports stacks of screens by permit-
ting the user to change the set of  screens  that  are  cur-
rently displayed.

     The  command  sspplliitt divides the current screen into two
regions of approximately equal size.  If a list of files are
specified  as  arguments  to  the sspplliitt command, the list of
files to be edited is initialized as if the nneexxtt command had
been  used.   If no files are specified, the new screen will
begin by editing the same file as the previous screen.

     When more than one screen is editing a file, changes in
any  screen  are  reflected in all other screens editing the
same file.  Exiting any screen without  saving  any  changes
(or  explicitly discarding them) is permitted until the last
screen editing the file is exited.

     The  rreessiizzee  command  permits  resizing  of  individual
screens.  Screens may be grown, shrunk or set to an absolute
number of rows.

     The ^^WW command is used to switch between screens.  Each
^^WW  moves  to the next lower screen in the window, or to the
first screen in the window if there are no lower screens.

     The bbgg command "backgrounds" the current  screen.   The
screen  disappears from the window, and the rows it occupied
are taken over by a neighboring screen.  It is an  error  to
attempt to background the only screen in the window.

     The  ddiissppllaayy  ssccrreeeennss command displays the names of the
files associated with the current  backgrounded  screens  in
the window.

     The ffgg [[ffiillee]] command "foregrounds" the first screen in
the list of backgrounded screens that is associated with its
argument.   If  no  file  argument  is  specified, the first
screen on the list is foregrounded.  Foregrounding  consists
of backgrounding the current screen, and replacing its space
in the window with the foregrounded screen.

     If the last screen in the window is exited,  and  there
are  backgrounded  screens,  the first screen on the list of
backgrounded screens takes over the window.












UUSSDD::1133--1100                                  NNvvii//NNeexx RReeffeerreennccee


77..  RReegguullaarr EExxpprreessssiioonnss aanndd RReeppllaacceemmeenntt SSttrriinnggss

     Regular expressions are used in line addresses, as  the
first  part  of  the eexx ssuubbssttiittuuttee, gglloobbaall, and vvgglloobbaall com-
mands, and in search patterns.

     The regular expressions  supported  by  eexx/vvii  are,  by
default,  the Basic Regular Expressions (BRE's) described in
the IEEE POSIX Standard 1003.2.  The eexxtteennddeedd option  causes
all  regular  expressions  to be interpreted as the Extended
Regular Expressions (ERE's) described by the same  standard.
(See  _r_e___f_o_r_m_a_t(7)  for more information.)  Generally speak-
ing, BRE's are the Regular Expressions found  in  _e_d(1)  and
_g_r_e_p(1),  and  ERE's  are  the  Regular Expressions found in
_e_g_r_e_p(1).

     The following is not intended to provide a  description
of Regular Expressions.  The information here only describes
strings and characters which have special  meanings  in  the
eexx/vvii  version of RE's, or options which change the meanings
of characters that normally have special meanings in RE's.

 (1)   An empty RE (e.g.  "////" or "????"  is equivalent to the
       last RE used.

 (2)   The construct "\\<<" matches the beginning of a word.

 (3)   The construct "\\>>" matches the end of a word.

 (4)   The character "~~" matches the replacement part of the
       last ssuubbssttiittuuttee command.

     When the mmaaggiicc option is _n_o_t set, the  only  characters
with  special  meanings are a "^^" character at the beginning
of an RE, a "$$" character at the  end  of  an  RE,  and  the
escaping  character  "\\".   The characters "..", "**", "[[" and
"~~" are treated as ordinary characters unless preceded by  a
"\\";  when preceded by a "\\" they regain their special mean-
ing.

     Replacement strings are the second part of a ssuubbssttiittuuttee
command.

     The  character  "&&" (or "\\&&" if the mmaaggiicc option is _n_o_t
set) in the replacement string stands for the  text  matched
by  the  RE  that  is being replaced.  The character "~~" (or
"\\~~" if the mmaaggiicc option is _n_o_t set) stands for the replace-
ment  part  of  the previous ssuubbssttiittuuttee command.  It is only
valid after a ssuubbssttiittuuttee command has been performed.

     The string "\\##", where "##" is an integer value  from  1
to  9,  stands for the text matched by the portion of the RE
enclosed in the "##"'th  set  of  escaped  parentheses,  e.g.










NNvvii//NNeexx RReeffeerreennccee                                  UUSSDD::1133--1111


"\\(("  and  "\\))".   For example, "ss//aabbcc\\((..**\\))ddeeff//\\11//" deletes
the strings "aabbcc" and "ddeeff" from the matched pattern.

     The strings "\\ll", "\\uu", "\\LL" and "\\UU" can  be  used  to
modify  the case of elements in the replacement string.  The
string "\\ll" causes the next character  to  be  converted  to
lowercase;  the  string "\\uu" behaves similarly, but converts
to uppercase (e.g.  ss//aabbcc//\\UU&&// replaces the string aabbcc  with
AABBCC).   The  strings "\\LL" causes characters up to the end of
the string or the next occurrence of  the  strings  "\\ee"  or
"\\EE"  to  be converted to lowercase; the string "\\UU" behaves
similarly, but converts to uppercase.

     If the entire replacement pattern is "%%", then the last
replacement pattern is used again.

     In  vvii,  inserting  a  <<ccoonnttrrooll--MM>> into the replacement
string will cause the matched line  to  be  split  into  two
lines at that point.  (The <<ccoonnttrrooll--MM>> will be discarded.)

88..  GGeenneerraall EEddiittoorr DDeessccrriippttiioonn

     When  eexx or vvii are executed, the text of a file is read
(or a temporary file  is  created),  and  then  all  editing
changes  happen  within the context of the copy of the file.
_N_o _c_h_a_n_g_e_s _a_f_f_e_c_t _t_h_e _a_c_t_u_a_l _f_i_l_e _u_n_t_i_l _t_h_e _f_i_l_e _i_s  _w_r_i_t_t_e_n
_o_u_t,  either  using a write command or another command which
is affected by the aauuttoowwrriittee option.

     All files are locked (using the  _f_l_o_c_k(2)  or  _f_c_n_t_l(2)
interfaces)  during the edit session, to avoid inadvertently
making modifications to multiple copies of the file.   If  a
lock  cannot  be obtained for a file because it is locked by
another process, the edit session is read-only  (as  if  the
rreeaaddoonnllyy  option  or  the --RR flag had been specified).  If a
lock cannot be obtained for other reasons, the edit  session
will  continue,  but  the  file  status information (see the
<<ccoonnttrrooll--GG>> command) will reflect this fact.

     Both eexx and vvii are modeful editors, i.e. they have  two
modes,  "command" mode and "text input" mode.  The former is
intended to permit you  to  enter  commands  which  modifies
already existing text.  The latter is intended to permit you
to enter new text.  When eexx first starts running, it  is  in
command  mode, and usually displays a prompt (see the pprroommpptt
option for more information).  The prompt is a single  colon
("::")  character.   There  are three commands that switch eexx
into text input mode: aappppeenndd, cchhaannggee and  iinnsseerrtt.   Once  in
input  mode, entering a line containing only a single period
("..")  terminates text input mode  and  returns  to  command
mode, where the prompt is redisplayed.












UUSSDD::1133--1122                                  NNvvii//NNeexx RReeffeerreennccee


     When  vvii first starts running, it is in command mode as
well.  There are eleven commands that switch  vvii  into  text
input  mode:  AA,  aa,  CC, cc, II, ii, OO, oo, RR, SS and ss.  Once in
input mode, entering an <<eessccaappee>> character  terminates  text
input mode and returns to command mode.

     The  following  words have special meanings in both the
eexx and vvii command descriptions:

<<iinntteerrrruupptt>>
     The interrupt character is used to interrupt  the  cur-
     rent operation.  Normally <<ccoonnttrrooll--CC>>, whatever charac-
     ter is set for the current terminal is used.

<<lliitteerraall nneexxtt>>
     The literal next character is used to escape the subse-
     quent character from any special meaning.  This charac-
     ter is always <<ccoonnttrrooll--VV>>.  If the terminal is not  set
     up  to  do  XON/XOFF  flow control, then <<ccoonnttrrooll--QQ>> is
     used to mean literal next as well.

ccuurrrreenntt ppaatthhnnaammee
     The pathname of the file currently being edited by  vi.
     When the percent character ("%%") appears in a file name
     entered as part  of  an  eexx  command  argument,  it  is
     replaced  by  the current pathname.  (The "%%" character
     can be escaped by preceding it with a backslash.)

aalltteerrnnaattee ppaatthhnnaammee
     The name of the last file name mentioned in an eexx  com-
     mand,  or,  the  previous  current pathname if the last
     file mentioned becomes the current file.  When the hash
     mark  character ("##") appears in a file name entered as
     part of an eexx command argument, it is replaced  by  the
     alternate  pathname.  (The "##" character can be escaped
     by preceding it with a backslash.)

bbuuffffeerr
     One of a number of named areas  for  saving  copies  of
     text.  Commands that change or delete text can save the
     changed or deleted text into  a  specific  buffer,  for
     later use, if the command allows it (i.e. the eexx cchhaannggee
     command  cannot  save  the  changed  text  in  a  named
     buffer).   Buffers  are  named with a single character,
     preceded by a double quote, e.g.   ""<<cchhaarraacctteerr>>.   His-
     toric  implementations  of eexx/vvii limited <<cchhaarraacctteerr>> to
     the alphanumeric characters; nneexx/nnvvii permits the use of
     any character.

     Buffers  named  by uppercase characters are the same as
     buffers named by lowercase characters, e.g. the  buffer
     named  by  the English character "AA" is the same as the
     buffer named by the character "aa", with  the  exception










NNvvii//NNeexx RReeffeerreennccee                                  UUSSDD::1133--1133


     that, if the buffer contents are being changed (as with
     a text deletion or vvii  cchhaannggee  command),  the  text  is
     _a_p_p_e_n_d_e_d  to  the buffer, instead of replacing the cur-
     rent contents.

     The  buffers  named  by  the  numeric  characters   (in
     English,  "11"  through "99"), are special, in that if at
     least one line is changed or deleted in the file, (or a
     command changes or deletes a region that crosses a line
     boundary) a copy of the text is placed into the numeric
     buffer  "11",  regardless of the user specifying another
     buffer in which to save it.  Before this copy is  done,
     the  previous  contents  of  buffer  "11" are moved into
     buffer "22", "22" into buffer "33", and so on.   The  con-
     tents  of buffer "99" are discarded.  In vvii, text may be
     explicitly stored into the numeric  buffers.   In  this
     case, the buffer rotation described above occurs before
     the replacement of the buffer's contents.  (Text cannot
     be  explicitly  stored  into  the numeric buffers in eexx
     because of ambiguities that this would cause in the  eexx
     command syntax.)

     When  a vvii command synopsis shows both a [[bbuuffffeerr]] and a
     [[ccoouunntt]], they may be presented in any order.

     Finally, all buffers are either "line"  or  "character"
     oriented.   All  eexx  commands  which  store  text  into
     buffers are line  oriented.   Some  vvii  commands  which
     store text into buffers are line oriented, and some are
     character oriented; the description for each applicable
     vvii command notes whether text copied into buffers using
     the command is line or character  oriented.   In  addi-
     tion,  the vvii command ddiissppllaayy bbuuffffeerrss displays the cur-
     rent orientation for each buffer.  Generally, the  only
     importance  attached to this orientation is that if the
     buffer is subsequently inserted  into  the  text,  line
     oriented buffers create new lines for each of the lines
     they contain, and character oriented buffers create new
     lines for any lines _o_t_h_e_r than the first and last lines
     they contain.  The first and last  lines  are  inserted
     into  the text at the current cursor position, becoming
     part of the current line.  If there is  more  than  one
     line  in  the  buffer, however, the current line itself
     will be split.

uunnnnaammeedd bbuuffffeerr
     The unnamed buffer is a text storage area which is used
     by  commands that take a buffer as an argument, when no
     buffer is specified by the user.  There is  no  way  to
     explicitly reference this buffer.













UUSSDD::1133--1144                    NNvvii//NNeexx RReeffeerreennccee ((VVii CCoommmmaannddss))


99..  VVii DDeessccrriippttiioonn

     VVii  takes  up  the  entire screen to display the edited
file, except for the bottom line of the screen.  The  bottom
line  of the screen is used to enter eexx commands, and for vvii
error and informational messages.  If no  other  information
is being displayed, the default display can show the current
cursor row and cursor column, an indication of  whether  the
file  has been modified, and the current mode of the editor.
See the rruulleerr,  sshhoowwddiirrttyy  and  sshhoowwmmooddee  options  for  more
information.

     Empty  lines  do not have any special representation on
the screen, but lines on the  screen  that  would  logically
come  after  the  end  of the file are displayed as a single
tilde ("~~") character.  To differentiate between empty lines
and  lines consisting of only whitespace characters, use the
lliisstt option.  Historically, implementations of vvii have  also
displayed  some  lines  as single asterisk ("@@") characters.
These were lines that were  not  correctly  displayed,  i.e.
lines  on the screen that did not correspond to lines in the
file, or lines that did not fit on the current screen.   NNvvii
never displays lines in this fashion.

     VVii  is  a  modeful editor, i.e. it has two modes, "com-
mand" mode and "text input" mode.  When vvii first starts,  it
is  in command mode.  There are several commands that change
vvii into text input mode.  The <<eessccaappee>> character is used  to
resolve  the  text  input  into the file, and exit back into
command mode.  In vvii command  mode,  the  cursor  is  always
positioned  on  the  last column of characters which take up
more than one column on the screen.  In vvii text insert mode,
the  cursor  is positioned on the first column of characters
which take up more than one column on the screen.

     Generally, if the cursor line and cursor column are not
on  the  screen,  then the screen is scrolled (if the target
cursor is close) or repainted (if the target cursor  is  far
away) so that the cursor is on the screen.  If the screen is
scrolled, it is moved a minimal amount, and the cursor  line
will  usually appear at the top or bottom of the screen.  In
the screen is repainted, the cursor line will appear in  the
center  of  the  screen,  unless  the cursor is sufficiently
close to the beginning or end of the file that this  is  not
possible.  If the lleeffttrriigghhtt option is set, the screen may be
scrolled or repainted in a horizontal direction as  well  as
in a vertical one.

     A  major difference between the historical vvii presenta-
tion and nnvvii is in the scrolling and screen  oriented  posi-
tion  commands, <<ccoonnttrrooll--BB>>, <<ccoonnttrrooll--DD>>, <<ccoonnttrrooll--EE>>, <<ccoonn--
ttrrooll--FF>>, <<ccoonnttrrooll--UU>>, <<ccoonnttrrooll--YY>>, HH, LL and MM.  In  histori-
cal  implementations of vvii, these commands acted on physical










NNvvii//NNeexx RReeffeerreennccee ((VVii CCoommmmaannddss))                    UUSSDD::1133--1155


(as opposed to logical, or screen) lines.   For  lines  that
were  sufficiently  long  in  relation  to  the  size of the
screen, this meant that single line  scroll  commands  might
repaint  the  entire screen, scrolling or screen positioning
command might not change the screen or move  the  cursor  at
all,  and  some  lines  simply  could not be displayed, even
though vvii would edit the file that contained them.  In  nnvvii,
these  commands  act on logical, i.e. screen lines.  You are
unlikely to notice any difference  unless  you  are  editing
files with lines significantly longer than a screen width.

     VVii  keeps track of the currently "most attractive" cur-
sor position.  Each command description (for  commands  that
can  change  the  current cursor position), specifies if the
cursor is set to a specific location in the line, or  if  it
is moved to the "most attractive cursor position".  The lat-
ter means that the cursor is moved to  the  cursor  position
that  is vertically as close as possible to the current cur-
sor position.  If the current line is shorter than the  cur-
sor  position  vvii  would select, the cursor is positioned on
the last character in the line.  (If the line is empty,  the
cursor is positioned on the first column of the line.)  If a
command moves the cursor to the most attractive position, it
does not alter the current cursor position, and a subsequent
movement will again attempt to move the cursor to that posi-
tion.  Therefore, although a movement to a line shorter than
the currently most attractive position will cause the cursor
to  move to the end of that line, a subsequent movement to a
longer line will cause the cursor to move back to  the  most
attractive position.

     In  addition,  the $$ command makes the end of each line
the most attractive cursor position rather than  a  specific
column.

     Each  vvii command described below notes where the cursor
ends up after it is executed.  This position is described in
terms of characters on the line, i.e.  "the previous charac-
ter", or, "the last character in  the  line".   This  is  to
avoid  needing  to  continually refer to on what part of the
character the cursor rests.

     The following words have special meaning  for  vvii  com-
mands.

pprreevviioouuss ccoonntteexxtt
     The  position  of  the  cursor before the command which
     caused the last absolute movement was  executed.   Each
     vvii  command  described in the next section that is con-
     sidered an absolute movement is so noted.  In addition,
     specifying  _a_n_y  address to an eexx command is considered
     an absolute movement.











UUSSDD::1133--1166                    NNvvii//NNeexx RReeffeerreennccee ((VVii CCoommmmaannddss))


mmoottiioonn
     A second vvii command can be used as an optional trailing
     argument  to the vvii !!, <<, >>, cc, dd, yy, and (depending on
     the ttiillddeeoopp option) ~~ commands.  This command indicates
     the  end  of  the region of text that's affected by the
     command.  The motion command may be either the  command
     character  repeated (in which case it means the current
     line) or a cursor  movement  command.   In  the  latter
     case,  the  region  affected by the command is from the
     starting or stopping cursor position which comes  first
     in  the  file,  to  immediately  before the starting or
     stopping cursor position which comes later in the file.
     Commands  that operate on lines instead of using begin-
     ning and ending cursor positions operate on all of  the
     lines  that  are wholly or partially in the region.  In
     addition, some  other  commands  become  line  oriented
     depending on where in the text they are used.  The com-
     mand descriptions below note these special cases.

     The following commands may all be used as motion compo-
     nents for vvii commands:


     <<ccoonnttrrooll--AA>>    <<ccoonnttrrooll--HH>>   <<ccoonnttrrooll--JJ>>   <<ccoonnttrrooll--MM>>
     <<ccoonnttrrooll--NN>>    <<ccoonnttrrooll--PP>>       <<ssppaaccee>>             $$
               %%   ''<<cchhaarraacctteerr>>             ((             ))
               ++              ,,             --             //
               00              ;;             ??             BB
               EE              FF             GG             HH
               LL              MM             NN             TT
               WW             [[[[            ]]]]             ^^
               __   ``<<cchhaarraacctteerr>>             bb             ee
               ff              hh             jj             kk
               ll              nn             tt             ww
               {{              ||             }}


     The  optional count prefix available for some of the vvii
     commands that take motion commands, or the count prefix
     available  for  the vvii commands that are used as motion
     components, may be included and  is  _a_l_w_a_y_s  considered
     part of the motion argument.  For example, the commands
     "cc22ww" and "22ccww" are equivalent, and the region affected
     by the cc command is two words of text.  In addition, if
     the optional count prefix is specified for both the  vvii
     command  and its motion component, the effect is multi-
     plicative and is considered part of  the  motion  argu-
     ment.   For  example, the commands "44ccww" and "22cc22ww" are
     equivalent, and the region affected by the cc command is
     four words of text.













NNvvii//NNeexx RReeffeerreennccee ((VVii CCoommmmaannddss))                    UUSSDD::1133--1177


ccoouunntt
     A  positive number used as an optional argument to most
     commands, either to give a size or a position (for dis-
     play  or  movement commands), or as a repeat count (for
     commands that modify  text).   The  count  argument  is
     always  optional  and  defaults  to  1 unless otherwise
     noted in the command description.

     When a vvii command synopsis shows both  a  [[bbuuffffeerr]]  and
     [[ccoouunntt]], they may be presented in any order.

bbiiggwwoorrdd
     A  set  of  non-whitespace characters preceded and fol-
     lowed by whitespace characters or the beginning or  end
     of the file or line.

     Groups of empty lines (or lines containing only whites-
     pace characters) are treated as a single bigword.

wwoorrdd
     Generally, in languages where it is applicable, vvii rec-
     ognizes  two kinds of words.  First, a sequence of let-
     ters, digits and underscores, delimited  at  both  ends
     by:  characters  other  than letters, digits, or under-
     scores; the beginning or end of a line;  the  beginning
     or  end  of the file.  Second, a sequence of characters
     other than letters, digits, underscores, or  whitespace
     characters, delimited at both ends by: a letter, digit,
     underscore, or whitespace character; the  beginning  or
     end of a line; the beginning or end of the file.

     Groups of empty lines (or lines containing only whites-
     pace characters) are treated as a single word.

ppaarraaggrraapphh
     An area of text that begins with either  the  beginning
     of  a  file,  an empty line, or a section boundary, and
     continues until either an empty line, section boundary,
     or the end of the file.

     Groups of empty lines (or lines containing only whites-
     pace characters) are treated as a single paragraph.

     Additional paragraph boundaries can  be  defined  using
     the ppaarraaggrraapphh option.

sseeccttiioonn
     An  area  of text that starts with the beginning of the
     file or a line whose first character is an  open  brace
     ("{{")  and  continues until the next section or the end
     of the file.

     Additional section boundaries can be defined using  the










UUSSDD::1133--1188                    NNvvii//NNeexx RReeffeerreennccee ((VVii CCoommmmaannddss))


     sseeccttiioonnss option.

sseenntteennccee
     An  area  of text that begins with either the beginning
     of the file or the first nonblank  character  following
     the  previous  sentence, paragraph, or section boundary
     and continues until the end of  the  file  or  a  or  a
     period ("..")  exclamation point ("!!")  or question mark
     ("??")  character, followed by either an end-of-line  or
     two  whitespace  characters.   Any  number  of  closing
     parentheses ("))"), brackets ("]]") or double-quote ("""")
     characters  can  appear between the period, exclamation
     point, or question mark and the  whitespace  characters
     or end-of-line.

     Groups of empty lines (or lines containing only whites-
     pace characters) are treated as a single sentence.

1100..  VVii CCoommmmaannddss

     The following section describes the commands  available
in  the command mode of the vvii editor.  In each entry below,
the tag line is a usage synopsis for the command  character.
In  addition,  the  final  line  and column the cursor rests
upon, and any options which affect the command are noted.

[[ccoouunntt]] <<ccoonnttrrooll--AA>>
     Search forward ccoouunntt times for the current  word.   The
     current word begins at the first non-whitespace charac-
     ter on  or  after  the  current  cursor  position,  and
     extends up to the next non-word character or the end of
     the line.  The search is literal, i.e. no characters in
     the  word  have any special meaning in terms of Regular
     Expressions.  It is an error if no matching pattern  is
     found  between the starting position and the end of the
     file.

     The <<ccoonnttrrooll--AA>> command is an absolute  movement.   The
     <<ccoonnttrrooll--AA>> command may be used as the motion component
     of other vvii commands, in which  case  any  text  copied
     into a buffer is character oriented.

     Line:    Set to the line where the word is found.
     Column:  Set to the first character of the word.
     Options: Affected by the eexxtteennddeedd, iiggnnoorreeccaassee and wwrraapp--
              ssccaann options.

[[ccoouunntt]] <<ccoonnttrrooll--BB>>
     Page backward ccoouunntt screens.  Two lines of overlap  are
     maintained  by  displaying  the window starting at line
     ((ttoopp__lliinnee -- ccoouunntt ** wwiinnddooww__ssiizzee)) ++ 22, where wwiinnddooww__ssiizzee
     is  the  value  of  the wwiinnddooww option.  (In the case of
     split screens, this size is corrected  to  the  current










NNvvii//NNeexx RReeffeerreennccee ((VVii CCoommmmaannddss))                    UUSSDD::1133--1199


     screen size.)  This is an error if the movement is past
     the beginning of the file.

     The <<ccoonnttrrooll--BB>> command is an absolute movement.

     Line:    Set to the last line of text displayed on  the
              screen.
     Column:  Set  to  the  first  nonblank character of the
              line.
     Options: None.

[[ccoouunntt]] <<ccoonnttrrooll--DD>>
     Scroll forward ccoouunntt lines.  If ccoouunntt is not specified,
     scroll  forward  the  number  of lines specified by the
     last <<ccoonnttrrooll--DD>> or <<ccoonnttrrooll--UU>> command.   If  this  is
     the  first  <<ccoonnttrrooll--DD>>  or <<ccoonnttrrooll--UU>> command, scroll
     forward half the number of lines in  the  screen.   (In
     the  case  of split screens, the default scrolling dis-
     tance is corrected to half the  current  screen  size.)
     This is an error if the movement is past the end of the
     file.

     The <<ccoonnttrrooll--DD>> command is an absolute movement.

     Line:    Set to the current line  plus  the  number  of
              lines scrolled.
     Column:  Set  to  the  first  nonblank character of the
              line.
     Options: None.

[[ccoouunntt]] <<ccoonnttrrooll--EE>>
     Scroll forward ccoouunntt lines, leaving the cursor  on  the
     current line and column, if possible.  This is an error
     if the movement is past the end of the file.

     Line:    Unchanged unless the current line scrolls  off
              the  screen,  in  which  case it is set to the
              first line on the screen.
     Column:  Unchanged unless the current line scrolls  off
              the  screen,  in  which  case it is set to the
              most attractive cursor position.
     Options: None.

[[ccoouunntt]] <<ccoonnttrrooll--FF>>
     Page forward ccoouunntt screens.  Two lines of  overlap  are
     maintained  by  displaying  the window starting at line
     ttoopp__lliinnee ++ ccoouunntt ** wwiinnddooww__ssiizzee -- 22,  where  wwiinnddooww__ssiizzee
     is  the  value  of  the wwiinnddooww option.  (In the case of
     split screens, this size is corrected  to  the  current
     screen size.)  This is an error if the movement is past
     the end of the file.

     The <<ccoonnttrrooll--FF>> command is an absolute movement.










UUSSDD::1133--2200                    NNvvii//NNeexx RReeffeerreennccee ((VVii CCoommmmaannddss))


     Line:    Set to the first line on the screen.
     Column:  Set to the first  nonblank  character  of  the
              current line.
     Options: None.

<<ccoonnttrrooll--GG>>
     Display the file information.  The information includes
     the current pathname, the current line, the  number  of
     total lines in the file, the current line as a percent-
     age of the total lines in the file,  if  the  file  has
     been  modified,  was  able  to be locked, if the file's
     name has been changed, and if the edit session is read-
     only.

     Line:    Unchanged.
     Column:  Unchanged.
     Options: None.

<<ccoonnttrrooll--HH>>
[[ccoouunntt]] hh
     Move  the  cursor  back ccoouunntt characters in the current
     line.  This is an error if the cursor is on  the  first
     character in the line.

     The  <<ccoonnttrrooll--HH>>  and  hh  commands  may  be used as the
     motion component of other vvii commands,  in  which  case
     any text copied into a buffer is character oriented.

     Line:    Unchanged.
     Column:  Set  to the ccuurrrreenntt -- ccoouunntt character, or, the
              first  character  in  the  line  if  ccoouunntt  is
              greater than or equal to the number of charac-
              ters in the line before the cursor.
     Options: None.

[[ccoouunntt]] <<ccoonnttrrooll--JJ>>
[[ccoouunntt]] <<ccoonnttrrooll--NN>>
[[ccoouunntt]] jj
     Move the cursor down ccoouunntt lines without  changing  the
     current  column.   This  is an error if the movement is
     past the end of the file.

     The <<ccoonnttrrooll--JJ>>, <<ccoonnttrrooll--NN>> and jj commands may be used
     as  the motion component of other vvii commands, in which
     case any text copied into a buffer is line oriented.

     Line:    Set to the current line plus ccoouunntt.
     Column:  The most attractive cursor position.
     Options: None.

<<ccoonnttrrooll--LL>>
<<ccoonnttrrooll--RR>>
     Repaint the screen.










NNvvii//NNeexx RReeffeerreennccee ((VVii CCoommmmaannddss))                    UUSSDD::1133--2211


     Line:    Unchanged.
     Column:  Unchanged.
     Options: None.

[[ccoouunntt]] <<ccoonnttrrooll--MM>>
[[ccoouunntt]] ++
     Move the cursor down ccoouunntt lines to the first  nonblank
     character  of that line.  This is an error if the move-
     ment is past the end of the file.

     The <<ccoonnttrrooll--MM>> and ++  commands  may  be  used  as  the
     motion  component  of  other vvii commands, in which case
     any text copied into a buffer is line oriented.

     Line:    Set to the current line plus ccoouunntt.
     Column:  Set to the first  nonblank  character  in  the
              line.
     Options: None.

[[ccoouunntt]] <<ccoonnttrrooll--PP>>
[[ccoouunntt]] kk
     Move  the  cursor  up ccoouunntt lines, without changing the
     current column.  This is an error if  the  movement  is
     past the beginning of the file.

     The  <<ccoonnttrrooll--PP>>  and  kk  commands  may  be used as the
     motion component of other vvii commands,  in  which  case
     any text copied into a buffer is line oriented.

     Line:    Set to the current line minus count.
     Column:  The most attractive cursor position.
     Options: None.

<<ccoonnttrrooll--TT>>
     Return to the most recent tag context.  The <<ccoonnttrrooll--TT>>
     command is an absolute movement.

     Line:    Set to the context of the  previous  tag  com-
              mand.
     Column:  Set  to  the  context of the previous tag com-
              mand.
     Options: None.

<<ccoonnttrrooll--UU>>
     Scroll backward ccoouunntt lines.  If ccoouunntt  is  not  speci-
     fied,  scroll backward the number of lines specified by
     the last <<ccoonnttrrooll--DD>> or <<ccoonnttrrooll--UU>> command.   If  this
     is the first <<ccoonnttrrooll--DD>> or <<ccoonnttrrooll--UU>> command, scroll
     backward half the number of lines in the  screen.   (In
     the  case  of split screens, the default scrolling dis-
     tance is corrected to half the  current  screen  size.)
     This  is an error if the movement is past the beginning
     of the file.










UUSSDD::1133--2222                    NNvvii//NNeexx RReeffeerreennccee ((VVii CCoommmmaannddss))


     The <<ccoonnttrrooll--UU>> command is an absolute movement.

     Line:    Set to  the  current  line  minus  the  amount
              scrolled.
     Column:  Set  to  the  first  nonblank character in the
              line.
     Options: None.

<<ccoonnttrrooll--WW>>
     Switch to the next lower screen in the window,  or,  to
     the  first  screen if there are no lower screens in the
     window.

     Line:    Set to the previous  cursor  position  in  the
              window.
     Column:  Set  to  the  previous  cursor position in the
              window.
     Options: None.

<<ccoonnttrrooll--YY>>
     Scroll backward ccoouunntt lines, leaving the  current  line
     and column as is, if possible.  This is an error if the
     movement is past the beginning of the file.

     Line:    Unchanged unless the current line scrolls  off
              the  screen,  in  which  case it is set to the
              last line of text displayed on the screen.
     Column:  Unchanged unless the current line scrolls  off
              the  screen,  in  which  case  it  is the most
              attractive cursor position.
     Options: None.

<<ccoonnttrrooll--ZZ>>
     Suspend the current editor session.  If  the  file  has
     been modified since it was last completely written, and
     the aauuttoowwrriittee option is set, the file is written before
     the  editor session is suspended.  If this write fails,
     the editor session is not suspended.

     Line:    Unchanged.
     Column:  Unchanged.
     Options: Affected by the aauuttoowwrriittee option.

<<eessccaappee>>
     Execute eexx commands or cancel partial commands.  If  an
     eexx  command  is being entered (e.g.  //, ??, :: or !!), the
     command is executed.  If a  partial  command  has  been
     entered, e.g.  or the command is cancelled.  Otherwise,
     it is an error.

     Line:    When an eexx command is being executed, the cur-
              rent  line  is  set as described for that com-
              mand.  Otherwise, unchanged.










NNvvii//NNeexx RReeffeerreennccee ((VVii CCoommmmaannddss))                    UUSSDD::1133--2233


     Column:  When an eexx command is being executed, the cur-
              rent  column is set as described for that com-
              mand.  Otherwise, unchanged.
     Options: None.

<<ccoonnttrrooll--]]>>
     Push a tag reference onto  the  tag  stack.   The  tags
     files  (see  the  ttaaggss option for more information) are
     searched for a tag matching the current word.  The cur-
     rent  word begins at the first non-whitespace character
     on or after the current cursor position, and extends up
     to  the next non-word character or the end of the line.
     If a matching tag is found, the current  file  is  dis-
     carded  and  the  file  containing the tag reference is
     edited.

     If the current file has been modified since it was last
     completely  written,  the command will fail.  The <<ccoonn--
     ttrrooll--]]>> command is an absolute movement.

     Line:    Set to the line containing  the  matching  tag
              string.
     Column:  Set to the start of the matching tag string.
     Options: Affected by the ttaaggss and ttaagglleennggtthh options.

<<ccoonnttrrooll--^^>>
     Switch to the most recently edited file.

     If  the  file  has been modified since it was last com-
     pletely written, and the aauuttoowwrriittee option is  set,  the
     file  is written out.  If this write fails, the command
     will fail.  Otherwise, if the  current  file  has  been
     modified since it was last completely written, the com-
     mand will fail.

     Line:    Set to the line the cursor  was  on  when  the
              file was last edited.
     Column:  Set  to  the column the cursor was on when the
              file was last edited.
     Options: Affected by the aauuttoowwrriittee option.

[[ccoouunntt]] <<ssppaaccee>>
[[ccoouunntt]] ll
     Move the cursor forward ccoouunntt characters without chang-
     ing  the  current line.  This is an error if the cursor
     is on the last character in the line.

     The <<ssppaaccee>> and ll commands may be used  as  the  motion
     component  of other vvii commands, in which case any text
     copied into a buffer is character oriented.   In  addi-
     tion,  these  commands may be used as the motion compo-
     nents of other commands when the cursor is on the  last
     character in the line, without error.










UUSSDD::1133--2244                    NNvvii//NNeexx RReeffeerreennccee ((VVii CCoommmmaannddss))


     Line:    Unchanged.
     Column:  Set  to  the  current  character plus the next
              ccoouunntt characters, or to the last character  on
              the  line  if ccoouunntt is greater than the number
              of characters in the line  after  the  current
              character.
     Options: None.

[[ccoouunntt]] !! mmoottiioonn sshheellll--aarrgguummeenntt((ss))
     Replace  text  with results from a shell command.  Pass
     the lines specified by the ccoouunntt and  mmoottiioonn  arguments
     as  standard  input  to  the program named by the sshheellll
     option, and replace those lines with the  output  (both
     standard error and standard output) of that command.

     After  the  motion is entered, vvii prompts for arguments
     to the shell command.

     Within those arguments,  "%%"  and  "##"  characters  are
     expanded   to  the  current  and  alternate  pathnames,
     respectively.  The "!!"  character is expanded with  the
     command  text  of  the  previous  !!   or  ::!!  commands.
     (Therefore, the command  !!!!   repeats  the  previous  !!
     command.)   The  special  meanings  of "%%", "##" and "!!"
     can be overridden by escaping them  with  a  backslash.
     If no !!  or ::!!  command has yet been executed, it is an
     error to use an unescaped "!!"  character.  The !!   com-
     mand  does  _n_o_t  do shell expansion on the strings pro-
     vided as arguments.  If any  of  the  above  expansions
     change  the  arguments the user entered, the command is
     redisplayed at the bottom of the screen.

     VVii then executes the program named by the sshheellll option,
     with  a  --cc  flag  followed by the arguments (which are
     bundled into a single argument).

     The !!  command is permitted in an empty file.

     If the file has been modified since it  was  last  com-
     pletely written, the !!  command will warn you.

     Line:    The first line of the replaced text.
     Column:  The first column of the replaced text.
     Options: Affected by the sshheellll option.

[[ccoouunntt]] ## ++||--||##
     Increment or decrement the current number.  The current
     number begins at the first non-number character  on  or
     before the current cursor position, or the beginning of
     the line, and extends up to the first non-number  char-
     acter  on  or  after the current cursor position or the
     end of the line.  If the trailing character is a ++, the
     number  is  incremented  by  ccoouunntt.   If  the  trailing










NNvvii//NNeexx RReeffeerreennccee ((VVii CCoommmmaannddss))                    UUSSDD::1133--2255


     character is a --, the number is decremented  by  ccoouunntt.
     If  the  trailing character is a ##, the previous incre-
     ment or decrement is repeated.

     The format of the  number  (decimal,  hexadecimal,  and
     octal,  and  leading  0's)  is  retained unless the new
     value cannot be represented in the previous format.

     Line:    Unchanged.
     Column:  Set to the first character in the cursor word.
     Options: None.

[[ccoouunntt]] $$
     Move  the  cursor  to  the  end of a line.  If ccoouunntt is
     specified, the cursor moves down ccoouunntt -- 11 lines.

     It is not an error to use the $$ command when the cursor
     is  on  the last character in the line or when the line
     is empty.

     The $$ command may be used as the  motion  component  of
     other vvii commands, in which case any text copied into a
     buffer is character oriented, unless the cursor is  at,
     or  before the first nonblank character in the line, in
     which case it is line oriented.  It is not an error  to
     use the $$ command as a motion component when the cursor
     is on the last character in the line, although it is an
     error when the line is empty.

     Line:    Set to the current line plus ccoouunntt minus 1.
     Column:  Set to the last character in the line.
     Options: None.

%%
     Move  to  the  matching character.  The cursor moves to
     the parenthesis or curly brace which _m_a_t_c_h_e_s the paren-
     thesis or curly brace found at the current cursor posi-
     tion or which is the closest one to the  right  of  the
     cursor  on  the  line.  It is an error to execute the %%
     command on a line without a parenthesis or curly brace.
     Historically,  any ccoouunntt specified to the %% command was
     ignored.

     The %% command is an absolute movement.  The  %%  command
     may  be  used  as the motion component of other vvii com-
     mands, in which case any text copied into a  buffer  is
     character  oriented,  unless  the starting point of the
     region is at or before the first nonblank character  on
     its  line, and the ending point is at or after the last
     nonblank character on its line, in  which  case  it  is
     line oriented.












UUSSDD::1133--2266                    NNvvii//NNeexx RReeffeerreennccee ((VVii CCoommmmaannddss))


     Line:    Set  to the line containing the matching char-
              acter.
     Column:  Set to the matching character.
     Options: None.

&&
     Repeat the previous substitution command on the current
     line.

     Historically,  any ccoouunntt specified to the && command was
     ignored.

     Line:    Unchanged.
     Column:  Unchanged if the cursor was on the last  char-
              acter in the line, otherwise, set to the first
              nonblank character in the line.
     Options: Affected  by   the   eeddccoommppaattiibbllee,   eexxtteennddeedd,
              iiggnnoorreeccaassee and mmaaggiicc options.

''<<cchhaarraacctteerr>>
``<<cchhaarraacctteerr>>
     Return  to  a  context marked by the character <<cchhaarraacc--
     tteerr>>.  If <<cchhaarraacctteerr>> is  the  "''"  or  "``"  character,
     return  to the previous context.  If <<cchhaarraacctteerr>> is any
     other character, return to the context marked  by  that
     character (see the mm command for more information).  If
     the command is the '' command, only the  line  value  is
     restored,  and  the  cursor is placed on the first non-
     blank character of that line.  If the command is the  ``
     command,  both the line and column values are restored.

     It is an error if the context no longer exists  because
     of  line  deletion.   (Contexts  follow  lines that are
     moved, or which are deleted and then restored.)

     The '' and `` commands are both absolute movements.  They
     may  be  used  as  a motion component for other vvii com-
     mands.  For the ''  command,  any  text  copied  into  a
     buffer  is  line oriented.  For the `` command, any text
     copied into a buffer is character oriented,  unless  it
     both  starts  and  stops  at the first character in the
     line, in which case it is line oriented.  In  addition,
     when  using  the  `` command as a motion component, com-
     mands which move backward  and  started  at  the  first
     character in the line, or move forward and ended at the
     first character in the line, are corrected to the  last
     character  of  the  starting  and ending lines, respec-
     tively.

     Line:    Set to the line from the context.
     Column:  Set to the first  nonblank  character  in  the
              line,  for  the '' command, and set to the con-
              text's column for the `` command.










NNvvii//NNeexx RReeffeerreennccee ((VVii CCoommmmaannddss))                    UUSSDD::1133--2277


     Options: None.

[[ccoouunntt]] ((
     Back up ccoouunntt sentences.

     The (( command is an absolute movement.  The  ((  command
     may  be  used  as the motion component of other vvii com-
     mands, in which case any text copied into a  buffer  is
     character  oriented,  unless  the starting and stopping
     points of the region are the  first  character  in  the
     line, in which case it is line oriented.  In the latter
     case, the stopping point of the region is  adjusted  to
     be  the  end of the line immediately before it, and not
     the original cursor position.

     Line:    Set to the line containing  the  beginning  of
              the sentence.
     Column:  Set  to  the  first  nonblank character of the
              sentence.
     Options: None.

[[ccoouunntt]] ))
     Move forward ccoouunntt sentences.

     The )) command is an absolute movement.  The  ))  command
     may  be  used  as the motion component of other vvii com-
     mands, in which case any text copied into a  buffer  is
     character  oriented,  unless  the starting point of the
     region is the first character in  the  line,  in  which
     case  it  is line oriented.  In the latter case, if the
     stopping point of the region is also the first  charac-
     ter  in  the  line, it is adjusted to be the end of the
     line immediately before it.

     Line:    Set to the line containing  the  beginning  of
              the sentence.
     Column:  Set  to  the  first  nonblank character of the
              sentence.
     Options: None.

[[ccoouunntt]] ,,
     Reverse find character ccoouunntt times.  Reverse  the  last
     FF,  ff,  TT  or tt command, searching the other way in the
     line, ccoouunntt times.

     The ,, command may be used as the  motion  component  of
     other vvii commands, in which case any text copied into a
     buffer is character oriented.

     Line:    Unchanged.
     Column:  Set to the searched-for character.
     Options: None.











UUSSDD::1133--2288                    NNvvii//NNeexx RReeffeerreennccee ((VVii CCoommmmaannddss))


[[ccoouunntt]] --
     Move to first nonblank  of  the  previous  line,  ccoouunntt
     times.

     This  is an error if the movement is past the beginning
     of the file.

     The -- command may be used as the  motion  component  of
     other vvii commands, in which case any text copied into a
     buffer is line oriented.

     Line:    Set to the current line minus ccoouunntt.
     Column:  Set to the first  nonblank  character  in  the
              line.
     Options: None.

[[ccoouunntt]] ..
     Repeat  the  last  vvii  command that modified text.  The
     repeated command may be a command and motion  component
     combination.   If  ccoouunntt is specified, it replaces _b_o_t_h
     the count specified for the repeated command,  and,  if
     applicable,  for  the  repeated  motion  component.  If
     ccoouunntt is not specified, the counts originally specified
     to the command being repeated are used again.

     As  a special case, if the ..  command is executed imme-
     diately after the uu command, the change log  is  rolled
     forward  or  backward, depending on the action of the uu
     command.

     Line:    Set as described for the repeated command.
     Column:  Set as described for the repeated command.
     Options: None.

//RREE<<ccaarrrriiaaggee--rreettuurrnn>>
//RREE// [[ooffffsseett]]<<ccaarrrriiaaggee--rreettuurrnn>>
??RREE<<ccaarrrriiaaggee--rreettuurrnn>>
??RREE?? [[ooffffsseett]]<<ccaarrrriiaaggee--rreettuurrnn>>
NN
nn
     Search forward or backward for  a  regular  expression.
     The commands beginning with a slash ("//") character are
     forward searches, the commands beginning with  a  ques-
     tion  mark  ("??")   are  backward searches.  VVii prompts
     with the leading character on  the  last  line  of  the
     screen for a string.  It then searches forward or back-
     ward in the file for the next occurrence of the string,
     which is interpreted as a Basic Regular Expression.

     The // and ??  commands are absolute movements.  They may
     be used as the motion components of other vvii  commands,
     in  which case any text copied into a buffer is charac-
     ter oriented, unless the search started  and  ended  on










NNvvii//NNeexx RReeffeerreennccee ((VVii CCoommmmaannddss))                    UUSSDD::1133--2299


     the  first  column  of a line, in which case it is line
     oriented.  In addition, forward searches ending at  the
     first character of a line, and backward searches begin-
     ning at the first character in the line, are  corrected
     to  begin  or end at the last character of the previous
     line.  (Note, forward and backward searches  can  occur
     for  both  // and ??  commands, if the wwrraappssccaann option is
     set.)

     If an offset from the matched line is specified (i.e. a
     trailing  "//" or "??"  character is followed by a signed
     offset), the buffer will always be line oriented  (e.g.
     "//ssttrriinngg//++00" will always guarantee a line orientation).

     The nn command repeats the previous search.

     The NN command repeats the previous search, but  in  the
     reverse direction.

     Missing RE's (e.g.  "////<<ccaarrrriiaaggee--rreettuurrnn>>", "//<<ccaarrrriiaaggee--
     rreettuurrnn>>",   "????<<ccaarrrriiaaggee--rreettuurrnn>>",   or    "??<<ccaarrrriiaaggee--
     rreettuurrnn>>"  search  for  the last search RE, in the indi-
     cated direction.

     Searches may be interrupted using the <<iinntteerrrruupptt>> char-
     acter.

     Line:    Set to the line in which the match occurred.
     Column:  Set  to  the  first  character  of the matched
              string.
     Options: Affected  by   the   eeddccoommppaattiibbllee,   eexxtteennddeedd,
              iiggnnoorreeccaassee, mmaaggiicc, and wwrraappssccaann options.

00
     Move to the first character in the current line.  It is
     not an error to use the 00 command when the cursor is on
     the first character in the line,

     The  00  command  may be used as the motion component of
     other vvii commands, in which case it is an error if  the
     cursor is on the first character in the line.

     Line:    Unchanged.
     Column:  Set to the first character in the line.
     Options: None.

::
     Execute an ex command.  VVii prompts for an eexx command on
     the last line of the screen, using a colon ("::")  char-
     acter.   The  command  is  terminated  by  a <<ccaarrrriiaaggee--
     rreettuurrnn>>, <<nneewwlliinnee>> or <<eessccaappee>> character; all of  these
     characters  may  be  escaped  by using a <<lliitteerraall nneexxtt>>
     character.  The command is then executed.










UUSSDD::1133--3300                    NNvvii//NNeexx RReeffeerreennccee ((VVii CCoommmmaannddss))


     If the eexx command writes to the screen, vvii will  prompt
     the user for a <<ccaarrrriiaaggee--rreettuurrnn>> before continuing when
     the eexx command finishes.  Large amounts of output  from
     the eexx command will be paged for the user, and the user
     prompted for a <<ccaarrrriiaaggee--rreettuurrnn>> or <<ssppaaccee>> key to con-
     tinue.   In  some cases, a quit (normally a "q" charac-
     ter) or <<iinntteerrrruupptt>> may be entered to interrupt the  eexx
     command.

     When  the eexx command finishes, and the user is prompted
     to resume visual mode, it is  also  possible  to  enter
     another "::" character followed by another eexx command.

     Line:    The  current  line is set as described for the
              eexx command.
     Column:  The current column is set as described for the
              eexx command.
     Options: None.

[[ccoouunntt]] ;;
     Repeat  the  last character find ccoouunntt times.  The last
     character find is one of the FF, ff, TT or tt commands.

     The ;; command may be used as the  motion  component  of
     other vvii commands, in which case any text copied into a
     buffer is character oriented.

     Line:    Unchanged.
     Column:  Set to the searched-for character.
     Options: None.

[[ccoouunntt]] << mmoottiioonn
[[ccoouunntt]] >> mmoottiioonn
     Shift lines left or right.  Shift the number  of  lines
     in  the region specified by the motion component, times
     ccoouunntt, left (for the << command) or  right  (for  the  >>
     command)  by  the  number  of  columns specified by the
     sshhiiffttwwiiddtthh  option.   Only  whitespace  characters  are
     deleted when shifting left; once the first character in
     the line contains a nonblank character, the sshhiifftt  will
     succeed, but the line will not be modified.

     Line:    Unchanged.
     Column:  Set  to  the  first  nonblank character in the
              line.
     Options: Affected by the sshhiiffttwwiiddtthh option.

@@ bbuuffffeerr
     Execute a named buffer.  Execute the named buffer as vvii
     commands.  The buffer may include eexx commands, too, but
     they must be expressed as a :: command.  If  the  buffer
     is  line  oriented,  <<nneewwlliinnee>> characters are logically
     appended to each line of the buffer.  If the buffer  is










NNvvii//NNeexx RReeffeerreennccee ((VVii CCoommmmaannddss))                    UUSSDD::1133--3311


     character  oriented, <<nneewwlliinnee>> characters are logically
     appended to all but the last line in the buffer.

     If the buffer name is "@@", or "**", then the last buffer
     executed shall be used.  It is an error to specify "@@@@"
     or "****" if there were no  buffer  previous  executions.
     The text of a macro may contain an @@ command, and it is
     possible to create infinite loops in this manner.  (The
     <<iinntteerrrruupptt>>  character  may  be  used  to interrupt the
     loop.)

     Line:    The current line is set as described  for  the
              command(s).
     Column:  The current column is set as described for the
              command(s).
     Options: None.

[[ccoouunntt]] AA
     Enter input mode, appending the text after the  end  of
     the  line.   If ccoouunntt is specified, the text is repeat-
     edly input ccoouunntt -- 11 more times  after  input  mode  is
     exited.

     Line:    Set  to  the  last  line upon which characters
              were entered.
     Column:  Set to the last character entered.
     Options: Affected by the aallttwweerraassee,  aauuttooiinnddeenntt,  bbeeaauu--
              ttiiffyy,   sshhoowwmmaattcchh,  ttttyywweerraassee  and  wwrraappmmaarrggiinn
              options.

[[ccoouunntt]] BB
     Move backward ccoouunntt bigwords.  Move the cursor backward
     to  the beginning of a bigword by repeating the follow-
     ing algorithm: if the current position is at the begin-
     ning of a bigword or the character at the current posi-
     tion cannot be part of a bigword,  move  to  the  first
     character of the preceding bigword.  Otherwise, move to
     the first character of the bigword at the current posi-
     tion.   If  no  preceding bigword exists on the current
     line, move to the first character of the  last  bigword
     on the first preceding line that contains a bigword.

     The  BB  command  may be used as the motion component of
     other vvii commands, in which case any text copied into a
     buffer is character oriented.

     Line:    Set  to the line containing the word selected.
     Column:  Set  to  the  first  character  of  the   word
              selected.
     Options: None.

[[bbuuffffeerr]] [[ccoouunntt]] CC
     Change  text  from  the current position to the end-of-










UUSSDD::1133--3322                    NNvvii//NNeexx RReeffeerreennccee ((VVii CCoommmmaannddss))


     line.  If ccoouunntt is specified, the input  text  replaces
     from  the  current  position  to  the end-of-line, plus
     ccoouunntt -- 11 subsequent lines.

     Line:    Set to the last  line  upon  which  characters
              were entered.
     Column:  Set to the last character entered.
     Options: Affected  by  the aallttwweerraassee, aauuttooiinnddeenntt, bbeeaauu--
              ttiiffyy,  sshhoowwmmaattcchh,  ttttyywweerraassee  and   wwrraappmmaarrggiinn
              options.

[[bbuuffffeerr]] DD
     Delete  text  from  the current position to the end-of-
     line.

     It is not an error to execute the DD command on an empty
     line.

     Line:    Unchanged.
     Column:  Set  to the character before the current char-
              acter, or, column 1 if the cursor was on  col-
              umn 1.
     Options: None.

[[ccoouunntt]] EE
     Move  forward  ccoouunntt  end-of-bigwords.  Move the cursor
     forward to the end of a bigword by repeating  the  fol-
     lowing algorithm: if the current position is the end of
     a bigword or the character at that position  cannot  be
     part  of  a  bigword, move to the last character of the
     following bigword.  Otherwise, move to the last charac-
     ter of the bigword at the current position.  If no suc-
     ceeding bigword exists on the current line, move to the
     last character of the first bigword on the next follow-
     ing line that contains a bigword.

     The EE command may be used as the  motion  component  of
     other vvii commands, in which case any text copied into a
     buffer is character oriented.

     Line:    Set to the line containing the word  selected.
     Column:  Set   to   the  last  character  of  the  word
              selected.
     Options: None.

[[ccoouunntt]] FF <<cchhaarraacctteerr>>
     Search ccoouunntt times backward through  the  current  line
     for <<cchhaarraacctteerr>>.

     The  FF  command  may be used as the motion component of
     other vvii commands, in which case any text copied into a
     buffer is character oriented.











NNvvii//NNeexx RReeffeerreennccee ((VVii CCoommmmaannddss))                    UUSSDD::1133--3333


     Line:    Unchanged.
     Column:  Set to the searched-for character.
     Options: None.

[[ccoouunntt]] GG
     Move  to  line  ccoouunntt,  or the last line of the file if
     ccoouunntt not specified.

     The GG command is an absolute movement.  The  GG  command
     may  be  used  as the motion component of other vvii com-
     mands, in which case any text copied into a  buffer  is
     line oriented.

     Line:    Set  to  ccoouunntt,  if  specified, otherwise, the
              last line.
     Column:  Set to the first  nonblank  character  in  the
              line.
     Options: None.

[[ccoouunntt]] HH
     Move  to  the screen line ccoouunntt -- 11 lines below the top
     of the screen.

     The HH command is an absolute movement.  The  HH  command
     may  be  used  as the motion component of other vvii com-
     mands, in which case any text copied into a  buffer  is
     line oriented.

     Line:    Set  to the line ccoouunntt -- 11 lines below the top
              of the screen.
     Column:  Set to the first  nonblank  character  of  the
              _s_c_r_e_e_n line.
     Options: None.

[[ccoouunntt]] II
     Enter  input  mode, inserting the text at the beginning
     of the line.  If ccoouunntt is specified, the text input  is
     repeatedly input ccoouunntt -- 11 more times.

     Line:    Set  to  the  last  line upon which characters
              were entered.
     Column:  Set to the last character entered.
     Options: None.

[[ccoouunntt]] JJ
     Join lines.  If ccoouunntt is  specified,  ccoouunntt  lines  are
     joined;  a  minimum  of  two  lines  are always joined,
     regardless of the value of ccoouunntt.

     If the current line ends with a  whitespace  character,
     all  whitespace is stripped from the next line.  Other-
     wise, if the next line starts with a  open  parenthesis
     ("((")  do nothing.  Otherwise, if the current line ends










UUSSDD::1133--3344                    NNvvii//NNeexx RReeffeerreennccee ((VVii CCoommmmaannddss))


     with a question mark ("??"), period ("..")   or  exclama-
     tion point ("!!"), insert two spaces.  Otherwise, insert
     a single space.

     It is not an error to join lines past the  end  of  the
     file, i.e. lines that do not exist.

     Line:    Unchanged.
     Column:  Set  to the character after the last character
              of the next-to-last joined line.
     Options: None.

[[ccoouunntt]] LL
     Move to the screen line ccoouunntt -- 11 lines above the  bot-
     tom of the screen.

     The  LL  command is an absolute movement.  The LL command
     may be used as the motion component of  other  vvii  com-
     mands,  in  which case any text copied into a buffer is
     line oriented.

     Line:    Set to the line ccoouunntt -- 11 lines above the bot-
              tom of the screen.
     Column:  Set  to  the  first  nonblank character of the
              _s_c_r_e_e_n line.
     Options: None.

 MM
     Move to the screen line in the middle of the screen.

     The MM command is an absolute movement.  The  MM  command
     may  be  used  as the motion component of other vvii com-
     mands, in which case any text copied into a  buffer  is
     line oriented.

     Historically,  any ccoouunntt specified to the MM command was
     ignored.

     Line:    Set to the line in the middle of the screen.
     Column:  Set to the first  nonblank  character  of  the
              _s_c_r_e_e_n line.
     Options: None.

[[ccoouunntt]] OO
     Enter  input  mode,  appending text in a new line above
     the current line.  If  ccoouunntt  is  specified,  the  text
     input is repeatedly input ccoouunntt -- 11 more times.

     Historically,  any ccoouunntt specified to the OO command was
     ignored.

     Line:    Set to the last  line  upon  which  characters
              were entered.










NNvvii//NNeexx RReeffeerreennccee ((VVii CCoommmmaannddss))                    UUSSDD::1133--3355


     Column:  Set to the last character entered.
     Options: Affected  by  the aallttwweerraassee, aauuttooiinnddeenntt, bbeeaauu--
              ttiiffyy,  sshhoowwmmaattcchh,  ttttyywweerraassee  and   wwrraappmmaarrggiinn
              options.

[[bbuuffffeerr]] PP
     Insert  text  from a buffer.  Text from the buffer (the
     unnamed buffer by default) is inserted before the  cur-
     rent  column or, if the buffer is line oriented, before
     the current line.

     Line:    Set to the lowest numbered line insert, if the
              buffer  is line oriented, otherwise unchanged.
     Column:  Set to the first  nonblank  character  of  the
              appended text, if the buffer is line oriented,
              otherwise, the last character of the  appended
              text.
     Options: None.

QQ
     Exit vvii (or visual) mode and switch to eexx mode.

     Line:    Unchanged.
     Column:  No longer relevant.
     Options: None.

[[ccoouunntt]] RR
     Enter  input mode, replacing the characters in the cur-
     rent line.  If ccoouunntt is specified, the  text  input  is
     repeatedly input ccoouunntt -- 11 more times.

     If  the  end  of  the  current line is reached, no more
     characters are  replaced  and  any  further  characters
     input are appended to the line.

     Line:    Set  to  the  last  line upon which characters
              were entered.
     Column:  Set to the last character entered.
     Options: Affected by the aallttwweerraassee,  aauuttooiinnddeenntt,  bbeeaauu--
              ttiiffyy,   sshhoowwmmaattcchh,  ttttyywweerraassee  and  wwrraappmmaarrggiinn
              options.

[[bbuuffffeerr]] [[ccoouunntt]] SS
     Substitute ccoouunntt lines.

     Line:    Set to the last  line  upon  which  characters
              were entered.
     Column:  Set to the last character entered.
     Options: Affected  by  the aallttwweerraassee, aauuttooiinnddeenntt, bbeeaauu--
              ttiiffyy,  sshhoowwmmaattcchh,  ttttyywweerraassee  and   wwrraappmmaarrggiinn
              options.












UUSSDD::1133--3366                    NNvvii//NNeexx RReeffeerreennccee ((VVii CCoommmmaannddss))


[[ccoouunntt]] TT <<cchhaarraacctteerr>>
     Search  backward, ccoouunntt times, through the current line
     for the character _a_f_t_e_r the specified <<cchhaarraacctteerr>>.

     The TT command may be used as the  motion  component  of
     other vvii commands, in which case any text copied into a
     buffer is character oriented.

     Line:    Unchanged.
     Column:  Set to the character  _a_f_t_e_r  the  searched-for
              character.
     Options: None.

UU
     Restore the current line to its state before the cursor
     last moved to it.

     Line:    Unchanged.
     Column:  The first character in the line.
     Options: None.

[[ccoouunntt]] WW
     Move forward ccoouunntt bigwords.  Move the  cursor  forward
     to  the beginning of a bigword by repeating the follow-
     ing algorithm: if the current position is within a big-
     word  or  the character at that position cannot be part
     of a bigword, move to the first character of  the  next
     bigword.   If  no subsequent bigword exists on the cur-
     rent line, move to the first  character  of  the  first
     bigword  on  the  first  following line that contains a
     bigword.

     The WW command may be used as the  motion  component  of
     other vvii commands, in which case any text copied into a
     buffer is character oriented.

     Line:    The line containing the word selected.
     Column:  The first character of the word selected.
     Options: None.

[[bbuuffffeerr]] [[ccoouunntt]] XX
     Delete ccoouunntt characters before the cursor.  If the num-
     ber  of  characters  to  be  deleted is greater than or
     equal to the number of characters to the  beginning  of
     the line, all of the characters before the current cur-
     sor  position,  to  the  beginning  of  the  line,  are
     deleted.

     Line:    Unchanged.
     Column:  Set  to  the current character minus ccoouunntt, or
              the first character if count is  greater  than
              the  number  of  characters in the line before
              the cursor.










NNvvii//NNeexx RReeffeerreennccee ((VVii CCoommmmaannddss))                    UUSSDD::1133--3377


     Options: None.

[[bbuuffffeerr]] [[ccoouunntt]] YY
     Copy (or "yank") ccoouunntt lines into the specified buffer.

     Line:    Unchanged.
     Column:  Unchanged.
     Options: None.

ZZZZ
     Write  the  file and exit vvii.  The file is only written
     if it has been modified since the last  complete  write
     of the file to any file.

     The  ZZZZ  command will exit the editor after writing the
     file, if there are no further files to edit.   Entering
     two  "quit"  commands  (i.e.  wwqq, qquuiitt, xxiitt or ZZZZ) in a
     row will override this check and the editor will  exit,
     ignoring any files that have not yet been edited.

     Line:    Unchanged.
     Column:  Unchanged.
     Options: None.

[[ccoouunntt]] [[[[
     Back up ccoouunntt section boundaries.

     The [[[[ command is an absolute movement.  The [[[[ command
     may be used as the motion component of  other  vvii  com-
     mands,  in  which case any text copied into a buffer is
     character oriented, unless  the  starting  position  is
     column 0, in which case it is line oriented.

     This  is an error if the movement is past the beginning
     of the file.

     Line:    Set to the previous line that is ccoouunntt section
              boundaries back, or the first line of the file
              if no more section boundaries exist  preceding
              the current line.
     Column:  Set  to  the  first  nonblank character in the
              line.
     Options: Affected by the sseeccttiioonnss option.

[[ccoouunntt]] ]]]]
     Move forward ccoouunntt section boundaries.

     The ]]]] command is an absolute movement.  The ]]]] command
     may  be  used  as the motion component of other vvii com-
     mands, in which case any text copied into a  buffer  is
     character  oriented,  unless  the  starting position is
     column 0, in which case it is line oriented.











UUSSDD::1133--3388                    NNvvii//NNeexx RReeffeerreennccee ((VVii CCoommmmaannddss))


     This is an error if the movement is past the end of the
     file.

     Line:    Set  to  the line that is ccoouunntt section bound-
              aries forward, or to the last line of the file
              if  no more section boundaries exist following
              the current line.
     Column:  Set to the first  nonblank  character  in  the
              line.
     Options: Affected by the sseeccttiioonnss option.

^^
     Move to first nonblank character on the current line.

     The  ^^  command  may be used as the motion component of
     other vvii commands, in which case any text copied into a
     buffer is character oriented.

     Line:    Unchanged.
     Column:  Set  to  the  first  nonblank character of the
              current line.
     Options: None.

[[ccoouunntt]] __
     Move down ccoouunntt -- 11 lines, to the first nonblank  char-
     acter.   The __ command may be used as the motion compo-
     nent of other vvii  commands,  in  which  case  any  text
     copied into a buffer is line oriented.

     It  is  not  an error to execute the __ command when the
     cursor is on the first character in the line.

     Line:    The current line plus ccoouunntt -- 11.
     Column:  The first nonblank character in the line.
     Options: None.

[[ccoouunntt]] aa
     Enter input mode, appending the text after the  cursor.
     If  ccoouunntt  is  specified,  the text input is repeatedly
     input ccoouunntt -- 11 more times.

     Line:    Set to the last  line  upon  which  characters
              were entered.
     Column:  Set to the last character entered.
     Options: Affected  by  the aallttwweerraassee, aauuttooiinnddeenntt, bbeeaauu--
              ttiiffyy,  sshhoowwmmaattcchh,  ttttyywweerraassee  and   wwrraappmmaarrggiinn
              options.

[[ccoouunntt]] bb
     Move backward ccoouunntt words.  Move the cursor backward to
     the beginning of a  word  by  repeating  the  following
     algorithm:  if the current position is at the beginning
     of a word, move to the first character of the preceding










NNvvii//NNeexx RReeffeerreennccee ((VVii CCoommmmaannddss))                    UUSSDD::1133--3399


     word.   Otherwise,  the  current  position moves to the
     first character of the word at  the  current  position.
     If  no  preceding word exists on the current line, move
     to the first character of the last word  on  the  first
     preceding line that contains a word.

     The  bb  command  may be used as the motion component of
     other vvii commands, in which case any text copied into a
     buffer is character oriented.

     Line:    Set  to the line containing the word selected.
     Column:  Set  to  the  first  character  of  the   word
              selected.
     Options: None.

[[bbuuffffeerr]] [[ccoouunntt]] cc mmoottiioonn
     Change a region of text.  If only part of a single line
     is affected, then the last character being  changed  is
     marked  with  a  "$$".  Otherwise, the region of text is
     deleted, and input mode is entered.

     If ccoouunntt is specified, it is applied to the mmoottiioonn.

     Line:    Set to the last  line  upon  which  characters
              were entered.
     Column:  Set to the last character entered.
     Options: Affected  by  the aallttwweerraassee, aauuttooiinnddeenntt, bbeeaauu--
              ttiiffyy,  sshhoowwmmaattcchh,  ttttyywweerraassee  and   wwrraappmmaarrggiinn
              options.

[[bbuuffffeerr]] [[ccoouunntt]] dd mmoottiioonn
     Delete  a region of text.  If ccoouunntt is specified, it is
     applied to the mmoottiioonn.

     Line:    Set to the line where the region starts.
     Column:  Set to the first character in the  line  after
              the  last character in the region.  If no such
              character exists, set to  the  last  character
              before the region.
     Options: None.

[[ccoouunntt]] ee
     Move  forward ccoouunntt end-of-words.  Move the cursor for-
     ward to the end of a word by  repeating  the  following
     algorithm:  if  the  current  position  is the end of a
     word, move to the last character of the following word.
     Otherwise,  move  to  the last character of the word at
     the current position.  If no succeeding word exists  on
     the  current  line,  move  to the last character of the
     first word on the next following line that  contains  a
     word.

     The  ee  command  may be used as the motion component of










UUSSDD::1133--4400                    NNvvii//NNeexx RReeffeerreennccee ((VVii CCoommmmaannddss))


     other vvii commands, in which case any text copied into a
     buffer is character oriented.

     Line:    Set  to the line containing the word selected.
     Column:  Set  to  the  last  character  of   the   word
              selected.
     Options: None.

[[ccoouunntt]] ff <<cchhaarraacctteerr>>
     Search  forward,  ccoouunntt  times, through the rest of the
     current line for <<cchhaarraacctteerr>>.

     The ff command may be used as the  motion  component  of
     other vvii commands, in which case any text copied into a
     buffer is character oriented.

     Line:    Unchanged.
     Column:  Set to the searched-for character.
     Options: None.

[[ccoouunntt]] ii
     Enter input mode, inserting the text before the cursor.
     If  ccoouunntt  is  specified,  the text input is repeatedly
     input ccoouunntt -- 11 more times.

     Line:    Set to the last  line  upon  which  characters
              were entered.
     Column:  Set to the last character entered.
     Options: Affected  by  the aallttwweerraassee, aauuttooiinnddeenntt, bbeeaauu--
              ttiiffyy,  sshhoowwmmaattcchh,  ttttyywweerraassee  and   wwrraappmmaarrggiinn
              options.

mm <<cchhaarraacctteerr>>
     Save  the current context (line and column) as <<cchhaarraacc--
     tteerr>>.  The exact position is referred to by  "``<<cchhaarraacc--
     tteerr>>".  The line is referred to by "''<<cchhaarraacctteerr>>".

     Historically,  <<cchhaarraacctteerr>> was restricted to lower-case
     letters only, nnvvii permits the use of any character.

     Line:    Unchanged.
     Column:  Unchanged.
     Options: None.

[[ccoouunntt]] oo
     Enter input mode, appending text in a  new  line  under
     the  current  line.   If  ccoouunntt  is specified, the text
     input is repeatedly input ccoouunntt -- 11 more times.

     Historically, any ccoouunntt specified to the oo command  was
     ignored.












NNvvii//NNeexx RReeffeerreennccee ((VVii CCoommmmaannddss))                    UUSSDD::1133--4411


     Line:    Set  to  the  last  line upon which characters
              were entered.
     Column:  Set to the last character entered.
     Options: Affected by the aallttwweerraassee,  aauuttooiinnddeenntt,  bbeeaauu--
              ttiiffyy,   sshhoowwmmaattcchh,  ttttyywweerraassee  and  wwrraappmmaarrggiinn
              options.

[[bbuuffffeerr]] pp
     Append text from a buffer.  Text from the  buffer  (the
     unnamed  buffer  by default) is appended after the cur-
     rent column or, if the buffer is line  oriented,  after
     the current line.

     Line:    Set  to the first line appended, if the buffer
              is line oriented, otherwise unchanged.
     Column:  Set to the first  nonblank  character  of  the
              appended  text if the buffer is line oriented,
              otherwise, the last character of the  appended
              text.
     Options: None.

[[ccoouunntt]] rr <<cchhaarraacctteerr>>
     Replace  characters.   The next ccoouunntt characters in the
     line are replaced with <<cchhaarraacctteerr>>.  Replacing  charac-
     ters with <<nneewwlliinnee>> characters results in creating new,
     empty lines into the file.

     If <<cchhaarraacctteerr>> is <<eessccaappee>>, the command is cancelled.

     Line:    Unchanged unless the replacement character  is
              a  <<nneewwlliinnee>>,  in  which case it is set to the
              current line plus ccoouunntt -- 11.
     Column:  Set to the last character replaced, unless the
              replacement character is a <<nneewwlliinnee>>, in which
              case the cursor is in column  1  of  the  last
              line inserted.
     Options: None.

[[bbuuffffeerr]] [[ccoouunntt]] ss
     Substitute  ccoouunntt characters in the current line start-
     ing with the current character.

     Line:    Set to the last  line  upon  which  characters
              were entered.
     Column:  Set to the last character entered.
     Options: Affected  by  the aallttwweerraassee, aauuttooiinnddeenntt, bbeeaauu--
              ttiiffyy,  sshhoowwmmaattcchh,  ttttyywweerraassee  and   wwrraappmmaarrggiinn
              options.

[[ccoouunntt]] tt <<cchhaarraacctteerr>>
     Search  forward,  ccoouunntt times, through the current line
     for the character immediately _b_e_f_o_r_e <<cchhaarraacctteerr>>.











UUSSDD::1133--4422                    NNvvii//NNeexx RReeffeerreennccee ((VVii CCoommmmaannddss))


     The tt command may be used as the  motion  component  of
     other vvii commands, in which case any text copied into a
     buffer is character oriented.

     Line:    Unchanged.
     Column:  Set to the character _b_e_f_o_r_e  the  searched-for
              character.
     Options: None.

uu
     Undo  the  last  change made to the file.  If repeated,
     the uu command alternates between these two states,  and
     is  its  own  inverse.   When used after an insert that
     inserted text on more than  one  line,  the  lines  are
     saved in the numeric buffers.

     The  ..  command, when used immediately after the uu com-
     mand, causes the change log to  be  rolled  forward  or
     backward, depending on the action of the uu command.

     Line:    Set to the position of the first line changed,
              if the reversal affects only one line or  rep-
              resents  an addition or change; otherwise, the
              line preceding the deleted text.
     Column:  Set to the cursor position before  the  change
              was made.
     Options: None.

[[ccoouunntt]] ww
     Move  forward  ccoouunntt words.  Move the cursor forward to
     the beginning of a  word  by  repeating  the  following
     algorithm:  if the current position is at the beginning
     of a word, move to the  first  character  of  the  next
     word.   If  no  subsequent  word  exists on the current
     line, move to the first character of the first word  on
     the first following line that contains a word.

     The  ww  command  may be used as the motion component of
     other vvii commands, in which case any text copied into a
     buffer is character oriented.

     Line:    Set  to the line containing the word selected.
     Column:  Set  to  the  first  character  of  the   word
              selected.
     Options: None.

[[bbuuffffeerr]] [[ccoouunntt]] xx
     Delete  ccoouunntt  characters.  The deletion is at the cur-
     rent character position.  If the number  of  characters
     to be deleted is greater than or equal to the number of
     characters to the end of the line, all of  the  charac-
     ters from the current cursor position to the end of the
     line are deleted.










NNvvii//NNeexx RReeffeerreennccee ((VVii CCoommmmaannddss))                    UUSSDD::1133--4433


     Line:    Unchanged.
     Column:  Unchanged unless the  last  character  in  the
              line  is deleted and the cursor is not already
              on the first character in the line,  in  which
              case it is set to the previous character.
     Options: None.

[[bbuuffffeerr]] [[ccoouunntt]] yy mmoottiioonn
     Copy  (or  "yank") a text region specified by the ccoouunntt
     and motion into a buffer.  If ccoouunntt is specified, it is
     applied to the mmoottiioonn.

     Line:    Unchanged,  unless the region covers more than
              a single line, in which case it is set to  the
              line where the region starts.
     Column:  Unchanged,  unless the region covers more than
              a single line, in which case it is set to  the
              character were the region starts.
     Options: None.

[[ccoouunntt11]] zz [[ccoouunntt22]] ttyyppee
     Redraw the screen with a window ccoouunntt22 lines long, with
     line ccoouunntt11 placed as specified by the ttyyppee  character.
     If  ccoouunntt11 is not specified, it defaults to the current
     line.  If ccoouunntt22 is not specified, it defaults  to  the
     current window size.

     The following ttyyppee characters may be used:

     +        If  ccoouunntt11 is specified, place the line ccoouunntt11
              at the top of the screen.  Otherwise,  display
              the screen after the current screen, similarly
              to the <<ccoonnttrrooll--FF>> command.
     <carriage-return>
              Place the  line  ccoouunntt11  at  the  top  of  the
              screen.
     .        Place  the  line  ccoouunntt11  in the center of the
              screen.
     -        Place the line ccoouunntt11 at  the  bottom  of  the
              screen.
     ^        If ccoouunntt11 is specified, place the line that is
              at the top of the screen when ccoouunntt11 is at the
              bottom  of  the  screen,  at the bottom of the
              screen, i.e. display  the  screen  before  the
              screen  before ccoouunntt11.  Otherwise, display the
              screen before the current screen, similarly to
              the <<ccoonnttrrooll--BB>> command.

     Line:    Set  to  ccoouunntt11 unless ccoouunntt11 is not specified
              and the ttyyppee character was either "^^" or  "++",
              in which case it is set to the line before the
              first line on the previous screen or the  line
              after  the  last  line on the previous screen,










UUSSDD::1133--4444                    NNvvii//NNeexx RReeffeerreennccee ((VVii CCoommmmaannddss))


              respectively.
     Column:  Set to the first  nonblank  character  in  the
              line.
     Options: None.

[[ccoouunntt]] {{
     Move backward ccoouunntt paragraphs.

     The  {{  command is an absolute movement.  The {{ command
     may be used as the motion component of  other  vvii  com-
     mands,  in  which case any text copied into a buffer is
     character oriented, unless the  starting  character  is
     the  first  character  on its line, in which case it is
     line oriented.

     Line:    Set to the line containing  the  beginning  of
              the previous paragraph.
     Column:  Set  to  the  first  nonblank character in the
              line.
     Options: Affected by the ppaarraaggrraapphh option.

[[ccoouunntt]] ||
     Move to a specific _c_o_l_u_m_n position on the current line.

     The  ||  command  may be used as the motion component of
     other vvii commands, in which case any text copied into a
     buffer  is  character  oriented.  It is an error to use
     the || command as a motion component and for the  cursor
     not to move.

     Line:    Unchanged.
     Column:  Set  to  the  character  occupying  the column
              position identified by ccoouunntt, if the  position
              exists  in  the line.  If the column length of
              the current line is less than ccoouunntt, the  cur-
              sor  is  moved  to  the  last character in the
              line.
     Options: None.

[[ccoouunntt]] }}
     Move forward ccoouunntt paragraphs.

     The }} command is an absolute movement.  The  }}  command
     may  be  used  as the motion component of other vvii com-
     mands, in which case any text copied into a  buffer  is
     character oriented, unless the starting character is at
     or before any nonblank characters in its line, in which
     case it is line oriented.

     Line:    Set  to  the  line containing the beginning of
              the next paragraph.
     Column:  Set to the first  nonblank  character  in  the
              line.










NNvvii//NNeexx RReeffeerreennccee ((VVii CCoommmmaannddss))                    UUSSDD::1133--4455


     Options: Affected by the ppaarraaggrraapphh option.

[[ccoouunntt]] ~~
     Reverse  the case of the next ccoouunntt character(s).  This
     is the historic semantic for the ~~ command  and  it  is
     only in effect if the ttiillddeeoopp option is not set.

     Lowercase  alphabetic  characters are changed to upper-
     case, and uppercase characters are  changed  to  lower-
     case.  No other characters are affected.

     Historically,  the ~~ command did not take an associated
     count, nor did it move past  the  end  of  the  current
     line.   As it had no associated motion it was difficult
     to change the case of large blocks of text.  In nnvvii, if
     the  cursor  is  on  the  last character of a line, and
     there are more lines in the file, the cursor  moves  to
     the next line.

     It  is  not an error to specify a count larger than the
     number of characters between the cursor and the end  of
     the file.

     Line:    Set  to  the line of the character after ccoouunntt
              characters, or, end of file.
     Column:  Set to the character after  ccoouunntt  characters,
              or, end-of-file.
     Options: Affected by the ttiillddeeoopp option.

[[ccoouunntt]] ~~ mmoottiioonn
     Reverse  the  case  of  the characters in a text region
     specified by the ccoouunntt and mmoottiioonn.  Only in  effect  if
     the ttiillddeeoopp option is set.

     Lowercase  characters  are  changed  to  uppercase, and
     uppercase characters  are  changed  to  lowercase.   No
     other characters are affected.

     Line:    Set  to  the  line  of the character after the
              last character in the region.
     Column:  Set to the character after the last  character
              in the region.
     Options: Affected by the ttiillddeeoopp option.

<<iinntteerrrruupptt>>
     Interrupt  the  current  operation.  Many of the poten-
     tially long-running  vvii  commands  may  be  interrupted
     using  the  terminal interrupt character.  These opera-
     tions include searches, file reading and writing,  fil-
     ter operations and map character expansion.  Interrupts
     are also enabled when running commands outside of vvii.

     If the <<iinntteerrrruupptt>> character is used to interrupt while










UUSSDD::1133--4466                    NNvvii//NNeexx RReeffeerreennccee ((VVii CCoommmmaannddss))


     entering  an  eexx  command,  the command is aborted, the
     cursor returns to its previous position, and vvii remains
     in command mode.

     Generally,  if  the  <<iinntteerrrruupptt>>  character  is used to
     interrupt any operation, any changes  made  before  the
     interrupt are left in place.

     Line:    Dependent  on the operation being interrupted.
     Column:  Dependent on the operation being  interrupted.
     Options: None.

     1111..  VVii TTeexxtt IInnppuutt CCoommmmaannddss

          The   following  section  describes  the  commands
     available in the text input mode of the vvii editor.

          Historically, vvii  implementations  only  permitted
     the  characters  inserted  on  the  current  line to be
     erased.  In addition, only the <<ccoonnttrrooll--DD>> erase  char-
     acter  and  the "00<<ccoonnttrrooll--DD>>" and "^^<<ccoonnttrrooll--DD>>" erase
     strings could erase autoindent characters.  This imple-
     mentation  permits  erasure to continue past the begin-
     ning of the current line, and back to where text  input
     mode  was  entered.  In addition, autoindent characters
     may be erased using the standard erase characters.  For
     the  line  and  word  erase  characters,  reaching  the
     autoindent characters forms a "soft" boundary, denoting
     the  end  of the current word or line erase.  Repeating
     the word or line erase key will  erase  the  autoindent
     characters.

          Historically, vvii always used <<ccoonnttrrooll--HH>> and <<ccoonn--
     ttrrooll--WW>> as character and word erase characters, respec-
     tively,  regardless  of  the current terminal settings.
     This implementation accepts, in addition to  these  two
     characters,  the  current terminal characters for those
     operations.

     <<nnuull>>
          If the first character of the input  is  a  <<nnuull>>,
          the   previous  input  is  replayed,  as  if  just
          entered.

     <<ccoonnttrrooll--DD>>
          If the previous  character  on  the  line  was  an
          autoindent character, erase it.  Otherwise, if the
          user is entering the first character in the  line,
          <<ccoonnttrrooll--DD>>  is  ignored.   Otherwise,  a  literal
          <<ccoonnttrrooll--DD>> character is entered.

     ^^<<ccoonnttrrooll--DD>>
          If the previous  character  on  the  line  was  an










NNvvii//NNeexx RReeffeerreennccee ((VVii CCoommmmaannddss))                    UUSSDD::1133--4477


          autoindent  character, erase all of the autoindent
          characters on the line.  In addition, the  autoin-
          dent level is reset to 0.

     00<<ccoonnttrrooll--DD>>
          If  the  previous  character  on  the  line was an
          autoindent character, erase all of the  autoindent
          characters on the line.

     <<ccoonnttrrooll--TT>>
          Insert  sufficient <<ttaabb>> and <<ssppaaccee>> characters to
          move the cursor forward to  a  column  immediately
          after the next column which is an even multiple of
          the sshhiiffttwwiiddtthh option.

          Historically, vvii did not  permit  the  <<ccoonnttrrooll--TT>>
          command  to  be  used unless the cursor was at the
          first column of a new line or it was preceded only
          by  autoindent  characters.   NNvvii permits it to be
          used at any time during insert mode.

     <<eerraassee>>
     <<ccoonnttrrooll--HH>>
          Erase the last character.

     <<lliitteerraall nneexxtt>>
          Quote the next character.  The next character will
          not be mapped (see the mmaapp command for more infor-
          mation) or interpreted specially.  A  carat  ("^^")
          character  will  be  displayed  immediately  as  a
          placeholder, but will  be  replaced  by  the  next
          character.

     <<eessccaappee>>
          Resolve  all  text input into the file, and return
          to command mode.

     <<lliinnee eerraassee>>
          Erase the current line.

     <<ccoonnttrrooll--WW>>
     <<wwoorrdd eerraassee>>
          Erase the last word.  The definition  of  word  is
          dependent  on the aallttwweerraassee and ttttyywweerraassee options.

     <<ccoonnttrrooll--XX>>[[00--99AA--FFaa--ff]]**
          Insert a character with the specified  hexadecimal
          value into the text.

     <<iinntteerrrruupptt>>
          Interrupt  text  input  mode, returning to command
          mode.  If the <<iinntteerrrruupptt>>  character  is  used  to
          interrupt  inserting  text into the file, it is as










UUSSDD::1133--4488                    NNvvii//NNeexx RReeffeerreennccee ((VVii CCoommmmaannddss))


          if the <<eessccaappee>> character was used; all text input
          up  to the interruption is resolved into the file.

     1122..  EExx AAddddrreessssiinngg

          Addressing in eexx (and when eexx  commands  are  exe-
     cuted  from  vvii)  relates to the current line.  In gen-
     eral, the current line is the last line affected  by  a
     command.   The exact effect on the current line is dis-
     cussed under the description of each command.  When the
     file contains no lines, the current line is zero.

          Addresses  are  constructed  by one or more of the
     following methods:

      (1)   The address ".."  refers to the current line.

      (2)   The address "$$" refers to the last line  of  the
            file.

      (3)   The  address  "NN", where NN is a positive number,
            refers to the N-th line of the file.

      (4)   The  address  "''<<cchhaarraacctteerr>>"  or  "``<<cchhaarraacctteerr>>"
            refers to the line marked with the name <<cchhaarraacc--
            tteerr>>.  (See the kk or mm commands for more  infor-
            mation on how to mark lines.)

      (5)   A  regular  expression  (RE) enclosed by slashes
            ("//") is an address, and it refers to the  first
            line  found  by  searching forward from the line
            _a_f_t_e_r the current line toward  the  end  of  the
            file,  and stopping at the first line containing
            a string matching the RE.  (The  trailing  slash
            can  be omitted at the end of the command line.)

            If no RE is specified, i.e. the pattern is "////",
            the  last  RE used in any command is used in the
            search.

            If the eexxtteennddeedd option is set, the RE is handled
            as an extended RE, not a basic RE.  If the wwrraapp--
            ssccaann option is set, the search wraps  around  to
            the  beginning  of  the file and continues up to
            and including the  current  line,  so  that  the
            entire file is searched.

            The  form "\\//" is accepted for historic reasons,
            and is identical to "////".

      (6)   An  RE  enclosed   in   question   marks   ("??")
            addresses  the  first  line  found  by searching
            backward from the  line  _p_r_e_c_e_d_i_n_g  the  current










NNvvii//NNeexx RReeffeerreennccee                                  UUSSDD::1133--4499


            line, toward the beginning of the file and stop-
            ping at  the  first  line  containing  a  string
            matching  the  RE.   (The trailing question mark
            can be omitted at the end of a command line.)

            If no RE is specified, i.e. the pattern is "????",
            the  last  RE used in any command is used in the
            search.

            If the eexxtteennddeedd option is set, the RE is handled
            as an extended RE, not a basic RE.  If the wwrraapp--
            ssccaann option is set,  the  search   wraps  around
            from the beginning of the file to the end of the
            file and continues up to and including the  cur-
            rent  line, so that the entire file is searched.

            The form "\\??"  is accepted for historic reasons,
            and is identical to "????".

      (7)   An  address  followed  by a plus sign ("++") or a
            minus sign ("--") followed by a number is an off-
            set  address  and refers to the address plus (or
            minus) the indicated number of  lines.   If  the
            address  is omitted, the addition or subtraction
            is done with respect to the current line.

      (8)   An address of "++" or "--" followed by a number is
            an  offset  from the current line.  For example,
            "--55" is the same as "..--55".

      (9)   An address ending with "++" or "--" has 1 added to
            or  subtracted  from  the address, respectively.
            As a consequence of this rule and of the  previ-
            ous  rule,  the  address  "--" refers to the line
            preceding the current line.  Moreover,  trailing
            "++" and "--" characters have a cumulative effect.
            For example, "++++--++++" refers to the current  line
            plus 3.

      (10)  A  percent  sign  ("%%")  is  equivalent  to  the
            address range "11,,$$".

          EExx commands require zero, one, or  two  addresses.
     It is an error to specify an address to a command which
     requires zero addresses.

          If the user provides more than the expected number
     of  addresses  to  any  eexx command, the first addresses
     specified are discarded.  For  example,  "11,,22,,33,,55"print
     prints  lines  3  through  5, because the pprriinntt command
     only takes two addresses.












UUSSDD::1133--5500                                  NNvvii//NNeexx RReeffeerreennccee


          The addresses in a range are separated  from  each
     other  by  a  comma (",,") or a semicolon (";;").  In the
     latter case, the current line  ("..")   is  set  to  the
     first address, and only then is the second address cal-
     culated.  This feature can be  used  to  determine  the
     starting  line  for  forward and backward searches (see
     rules (5) and (6) above).  The second  address  of  any
     two-address  sequence  corresponds  to a line that fol-
     lows, in the file, the line corresponding to the  first
     address.   The first address must be less than or equal
     to the second  address.   The  first  address  must  be
     greater  than  or  equal to the first line of the file,
     and the last address must be less than or equal to  the
     last line of the file.

     1133..  EExx DDeessccrriippttiioonn

          The  following  words have special meanings for eexx
     commands.

     <<eeooff>>
          The end-of-file character is used  to  scroll  the
          screen  in  the eexx editor.  This character is nor-
          mally <<ccoonnttrrooll--DD>>, however, whatever character  is
          set for the current terminal is used.

     lliinnee
          A  single-line  address, given in any of the forms
          described in the section entitled "EExx AAddddrreessssiinngg".
          The default for lliinnee is the current line.

     rraannggee
          A  line, or a pair of line addresses, separated by
          a comma or semicolon.  (See the  section  entitled
          "EExx   AAddddrreessssiinngg"   for  more  information.)   The
          default for range is the current line  _o_n_l_y,  i.e.
          "..,,..".   A percent sign ("%%") stands for the range
          "11,,$$".  The starting address must be less than, or
          equal to, the ending address.

     ccoouunntt
          A positive integer, specifying the number of lines
          to be affected by the command; the default  is  1.
          Generally,  a  count  past  the end-of-file may be
          specified, e.g. the command "pp 33000000" in a 10  line
          file  is  acceptable, and will print from the cur-
          rent line through the last line in the file.

     ffllaaggss
          One or more of the characters "#", "p",  and  "l".
          When a command that accepts these flags completes,
          the addressed line(s) are written out as if by the
          corresponding  ##,  ll  or pp commands.  In addition,










NNvvii//NNeexx RReeffeerreennccee ((EExx CCoommmmaannddss))                    UUSSDD::1133--5511


          any number of "++" or "--" characters can be  speci-
          fied  before, after, or during the flags, in which
          case the line written is not necessarily  the  one
          affected  by  the  command,  but  rather  the line
          addressed by the offset  address  specified.   The
          default for ffllaaggss is none.

     ffiillee
          A  pattern  used to derive a pathname; the default
          is the current file.  File names are subjected  to
          normal _s_h(1) word expansions.

          Anywhere a file name is specified, it is also pos-
     sible to use the special string "//ttmmpp".  This  will  be
     replaced  with  a temporary file name which can be used
     for temporary work, e.g.  "::ee //ttmmpp" creates and edits a
     new file.

          If both a count and a range are specified for com-
     mands that use either, the starting line for  the  com-
     mand  is  the  _l_a_s_t  line  addressed  by the range, and
     ccoouunntt- subsequent lines are affected  by  the  command,
     e.g.  the  command "22,,33pp44" prints out lines 3, 4, 5 and
     6.

          When only a line or range is  specified,  with  no
     command,  the  implied command is either a lliisstt, nnuummbbeerr
     or pprriinntt command.  The command used is the most  recent
     of  the three commands to have been used (including any
     use as a flag).  If none of these  commands  have  been
     used  before, the pprriinntt command is the implied command.
     When no range or count is  specified  and  the  command
     line  is  a blank line, the current line is incremented
     by 1 and then the current line is displayed.

          Zero or more whitespace characters may precede  or
     follow  the  addresses,  count, flags, or command name.
     Any object following a command name  (such  as  buffer,
     file,  etc.), that begins with an alphabetic character,
     should be separated from the command name by  at  least
     one whitespace character.

          Any  character,  including  <<ccaarrrriiaaggee--rreettuurrnn>>, "%%"
     and "##" retain their literal value when preceded  by  a
     backslash.

     1144..  EExx CCoommmmaannddss

          The   following  section  describes  the  commands
     available in the eexx editor.  In each entry  below,  the
     tag line is a usage synopsis for the command.












UUSSDD::1133--5522                    NNvvii//NNeexx RReeffeerreennccee ((EExx CCoommmmaannddss))


          Each  command  can  be entered as the abbreviation
     (those characters in the synopsis command word  preced-
     ing  the  "[" character), the full command (all charac-
     ters shown for the command word, omitting the  "["  and
     "]" characters), or any leading subset of the full com-
     mand down to the abbreviation.  For example,  the  args
     command  (shown  as  "aarr[[ggss]]"  in  the synopsis) can be
     entered as "aarr", "aarrgg" or "aarrggss".

          Each eexx command described below notes the new cur-
     rent  line after it is executed, as well as any options
     that affect the command.

     ""
          A comment.  Command lines beginning with the  dou-
          ble-quote  character ("""") are ignored.  This per-
          mits comments in editor scripts and startup files.

     <<eenndd--ooff--ffiillee>>
          Scroll  the screen.  Write the next N lines, where
          N is the value of the ssccrroollll option.  The  command
          is  the  end-of-file terminal character, which may
          be different on different  terminals.   Tradition-
          ally, it is the <<ccoonnttrrooll--DD>> key.

          Historically,  the eeooff command ignored any preced-
          ing count, and  the  <<eenndd--ooff--ffiillee>>  character  was
          ignored unless it was entered as the first charac-
          ter of the command.  This implementation treats it
          as  a command _o_n_l_y if entered as the first charac-
          ter of the command line, and otherwise  treats  it
          as any other character.

          Line:    Set to the last line written.
          Options: None.

     !! aarrgguummeenntt((ss))
     [[rraannggee]]!! aarrgguummeenntt((ss))
          Execute a shell command, or filter lines through a
          shell command.  In the first synopsis, the remain-
          der of the line after the "!!"  character is passed
          to the program named by the  sshheellll  option,  as  a
          single argument.

          Within  the  rest  of  the  line,  "%%" and "##" are
          expanded into the current and alternate pathnames,
          respectively.  The character "!!"  is expanded with
          the command  text  of  the  previous  !!   command.
          (Therefore, the command !!!!  repeats the previous !!
          command.)  The special meanings of "%%",  "##",  and
          "!!"   can  be  overridden  by escaping them with a
          backslash.  If no !!  or ::!!  command has  yet  been
          executed,  it  is an error to use an unescaped "!!"










NNvvii//NNeexx RReeffeerreennccee ((EExx CCoommmmaannddss))                    UUSSDD::1133--5533


          character.  The  !!   command  does  _n_o_t  do  shell
          expansion  on  the  strings provided as arguments.
          If any of the above expansions change the  command
          the  user  entered,  the command is redisplayed at
          the bottom of the screen.

          EExx then executes the program named  by  the  sshheellll
          option,  with  a --cc flag followed by the arguments
          (which are bundled into a single argument).

          The !!  command is permitted in an empty file.

          If the file has been modified since  it  was  last
          completely written, the command will warn you.

          A single "!!"  character is displayed when the com-
          mand completes.

          In the second form of the !!  command, the  remain-
          der  of  the  line after the "!!"  is passed to the
          program named by the sshheellll  option,  as  described
          above.  The specified lines are passed to the pro-
          gram as standard input, and the standard and stan-
          dard error output of the program replace the orig-
          inal lines.

          Line:    Unchanged if no range was specified, oth-
                   erwise  set  to  the  first  line  of the
                   range.
          Options: Affected by the  aauuttoowwrriittee  and  wwrriitteeaannyy
                   options.

     [[rraannggee]] nnuu[[mmbbeerr]] [[ccoouunntt]] [[ffllaaggss]]
     [[rraannggee]] ## [[ccoouunntt]] [[ffllaaggss]]
          Display the selected lines, each preceded with its
          line number.

          The line number format is "%6d", followed  by  two
          spaces.

          Line:    Set to the last line displayed.
          Options: None.

     @@ bbuuffffeerr
     ** bbuuffffeerr
          Execute  a  buffer.  Each line in the named buffer
          is executed as an eexx command.   If  no  buffer  is
          specified,  or  if  the specified buffer is "@@" or
          "**", the last buffer executed is used.

     [[rraannggee]] <<[[<< ......]] [[ccoouunntt]] [[ffllaaggss]]
          Shift lines left or right.   The  specified  lines
          are  shifted  to  the  left (for the << command) or










UUSSDD::1133--5544                    NNvvii//NNeexx RReeffeerreennccee ((EExx CCoommmmaannddss))


          right (for  the  >>  command),  by  the  number  of
          columns  specified by the sshhiiffttwwiiddtthh option.  Only
          leading whitespace  characters  are  deleted  when
          shifting  left;  once the first column of the line
          contains a nonblank character, the  sshhiifftt  command
          will succeed, but the line will not be modified.

          If  the  command character << or >> is repeated more
          than once, the command is repeated once  for  each
          additional command character.

          Line:    If  the current line is set to one of the
                   lines that are affected by  the  command,
                   it is unchanged.  Otherwise, it is set to
                   the first nonblank character of the  low-
                   est numbered line shifted.
          Options: Affected by the sshhiiffttwwiiddtthh option.

     [[lliinnee]] == [[ffllaaggss]]
          Display  the line number.  Display the line number
          of lliinnee (which defaults to the last  line  in  the
          file).

          Line:    Unchanged.
          Options: None.

     [[rraannggee]] >>[[>> ......]] [[ccoouunntt]] [[ffllaaggss]]
          Shift  right.   The specified lines are shifted to
          the right by the number of  columns  specified  by
          the  sshhiiffttwwiiddtthh option, by inserting tab and space
          characters.  Empty lines are not changed.

          If the command character ">>" is repeated more than
          once,  the command is repeated once for each addi-
          tional command character.

          Line:    Set to the last line modified by the com-
                   mand.
          Options: None.

     aabb[[bbrreevv]] llhhss rrhhss
          Add  an  abbreviation  to the current abbreviation
          list.  In vvii, if llhhss is entered such  that  it  is
          preceded and followed by characters that cannot be
          part of a word, it is replaced by the string  rrhhss.

          Line:    Unchanged.
          Options: None.

     [[lliinnee]] aa[[ppppeenndd]][[!!]]
          The  input text is appended to the specified line.
          If line 0 is specified, the text  is  inserted  at
          the  beginning  of the file.  Set to the last line










NNvvii//NNeexx RReeffeerreennccee ((EExx CCoommmmaannddss))                    UUSSDD::1133--5555


          input.  If no lines are input, then set  to  lliinnee,
          or  to  the  first line of the file if a lliinnee of 0
          was specified.  Following the command name with  a
          "!!"   character causes the aauuttooiinnddeenntt option to be
          toggled for the duration of the command.

          Line:    Unchanged.
          Options: Affected by  the  aallttwweerraassee,  aauuttooiinnddeenntt,
                   bbeeaauuttiiffyy,  sshhoowwmmaattcchh, ttttyywweerraassee and wwrraapp--
                   mmaarrggiinn options.

     aarr[[ggss]]
          Display the argument list.  The  current  argument
          is  displayed  inside  of  "[[" and "]]" characters.
          The argument list is the list of  operands  speci-
          fied  on  startup, which can be replaced using the
          nneexxtt command.

          Line:    Unchanged.
          Options: None.

     bbgg
          VVii mode only.  Background the current screen.

          Line:    Set to the current line when  the  screen
                   was last edited.
          Options: None.

     [[rraannggee]] cc[[hhaannggee]][[!!]] [[ccoouunntt]]
          Replace  the lines with input text.  Following the
          command name with  a  "!!"   character  causes  the
          aauuttooiinnddeenntt  option  to be toggled for the duration
          of the command.

          Line:    Set to the last line  input,  or,  if  no
                   lines  were input, set to the line before
                   the target line, or to the first line  of
                   the  file if there are no lines preceding
                   the target line.
          Options: Affected by  the  aallttwweerraassee,  aauuttooiinnddeenntt,
                   bbeeaauuttiiffyy,  sshhoowwmmaattcchh, ttttyywweerraassee and wwrraapp--
                   mmaarrggiinn options.

     cchhdd[[iirr]][[!!]] [[ddiirreeccttoorryy]]
     ccdd[[!!]] [[ddiirreeccttoorryy]]
          Change the current working directory.  The  ddiirreecc--
          ttoorryy  argument  is  subjected to _s_h(1) word expan-
          sions.  When invoked with  no  directory  argument
          and  the  HHOOMMEE  environment  variable  is set, the
          directory named by the HHOOMMEE  environment  variable
          becomes the new current directory.  Otherwise, the
          new  current  directory  becomes   the   directory
          returned by the _g_e_t_p_w_e_n_t(3) routine.










UUSSDD::1133--5566                    NNvvii//NNeexx RReeffeerreennccee ((EExx CCoommmmaannddss))


          The  cchhddiirr  command will fail if the file has been
          modified since the  last  complete  write  of  the
          file.   You can override this check by appending a
          "!!"  character to the command.

          Line:    Unchanged.
          Options: Affected by the ccddppaatthh option.

     [[rraannggee]] ccoo[[ppyy]] lliinnee [[ffllaaggss]]
     [[rraannggee]] tt lliinnee [[ffllaaggss]]
          Copy the specified lines (range) after the  desti-
          nation  line.   Line  0 may be specified to insert
          the lines at the beginning of the file.

          Line:    Unchanged.
          Options: None.

     [[rraannggee]] dd[[eelleettee]] [[bbuuffffeerr]] [[ccoouunntt]] [[ffllaaggss]]
          Delete the lines from the file.  The deleted  text
          is saved in the specified buffer, or, if no buffer
          is specified, in the unnamed buffer.  If the  com-
          mand  name  is  followed by a letter that could be
          interpreted as either a  buffer  name  or  a  flag
          value  (because  neither  a  ccoouunntt or ffllaaggss values
          were given), eexx treats the letter as a ffllaaggss value
          if  the  letter  immediately  follows  the command
          name, without any whitespace separation.   If  the
          letter  is  preceded  by whitespace characters, it
          treats it as a buffer name.

          Line:    Set to the  line  following  the  deleted
                   lines, or to the last line if the deleted
                   lines were at the end.
          Options: None.

     ddii[[ssppllaayy]] bb[[uuffffeerrss]] || ss[[ccrreeeennss]] || tt[[aaggss]]
          Display buffers, screens  or  tags.   The  ddiissppllaayy
          command  takes  one of three additional arguments,
          which are as follows:

          b[uffers]
                   Display  all  buffers  (including  named,
                   unnamed,  and numeric) that contain text.
          s[creens]
                   Display the file names of all  background
                   screens.
          t[ags]   Display the tags stack.

          Line:    Unchanged.
          Options: None.

     ee[[ddiitt]][[!!]] [[++ccmmdd]] [[ffiillee]]











NNvvii//NNeexx RReeffeerreennccee ((EExx CCoommmmaannddss))                    UUSSDD::1133--5577


     eexx[[!!]] [[++ccmmdd]] [[ffiillee]]
          Edit  a different file.  If the current buffer has
          been modified since the last complete  write,  the
          command  will  fail.   You  can  override  this by
          appending a "!!"  character to the command name.

          If the "++ccmmdd" option is specified, that eexx command
          will  be executed in the new file.  Any eexx command
          may be used, although the most common use of  this
          feature is to specify a line number or search pat-
          tern to set the initial location in the new  file.

          Line:    If  you  have previously edited the file,
                   the current line will be set to your last
                   position  in  the file.  If that position
                   does not exist, or you  have  not  previ-
                   ously  edited  the file, the current line
                   will be set to the first line of the file
                   if  you are in vvii mode, and the last line
                   of the file if you are in eexx.
          Options: Affected by the  aauuttoowwrriittee  and  wwrriitteeaannyy
                   options.

     eexxuu[[ssaaggee]] [[ccoommmmaanndd]]
          Display  usage  for  an eexx command.  If ccoommmmaanndd is
          specified, a usage statement for that  command  is
          displayed.  Otherwise, usage statements for all eexx
          commands are displayed.

          Line:    Unchanged.
          Options: None.

     ff[[iillee]] [[ffiillee]]
          Display and optionally change the file name.  If a
          file  name  is  specified, the current pathname is
          changed to the specified name.  The current  path-
          name,  the  number of lines, and the current posi-
          tion in the file are displayed.

          Line:    Unchanged.
          Options: None.

     ffgg [[nnaammee]]
          VVii mode only.  Foreground  the  specified  screen.
          Swap  the  current screen with the specified back-
          grounded screen.  If no screen is  specified,  the
          first background screen is foregrounded.

          Line:    Set  to  the current line when the screen
                   was last edited.
          Options: None.












UUSSDD::1133--5588                    NNvvii//NNeexx RReeffeerreennccee ((EExx CCoommmmaannddss))


     [[rraannggee]] gg[[lloobbaall]] //ppaatttteerrnn// [[ccoommmmaannddss]]
     [[rraannggee]] vv //ppaatttteerrnn// [[ccoommmmaannddss]]
          Apply commands to lines matching (or not matching)
          a  pattern.  The lines within the given range that
          match ("gg[[lloobbaall]]"), or  do  not  match  ("vv")  the
          given  pattern  are selected.  Then, the specified
          eexx command(s) are executed with the  current  line
          ("..")   set to each selected line.  If no range is
          specified, the entire file is searched for  match-
          ing, or not matching, lines.

          Multiple  commands can be specified, one per line,
          by escaping each <<nneewwlliinnee>> character with a  back-
          slash,  or by separating commands with a "||" char-
          acter.  If no commands are specified, the  command
          defaults to the pprriinntt command.

          For  the  aappppeenndd,  cchhaannggee and iinnsseerrtt commands, the
          input text must be  part  of  the  global  command
          line.  In this case, the terminating period can be
          omitted if it ends the commands.

          The vviissuuaall command may also be specified as one of
          the  eexx  commands.   In  this mode, input is taken
          from the terminal.  Entering a  QQ  command  in  vvii
          mode  causes the next line matching the pattern to
          be selected and vvii to be reentered, until the list
          is exhausted.

          The  gglloobbaall, vv and uunnddoo commands cannot be used as
          part of these commands.

          The  editor  options  aauuttoopprriinntt,  aauuttooiinnddeenntt,  and
          rreeppoorrtt  are  turned  off  for  the duration of the
          gglloobbaall and vv commands.

          Line:    The last line modified.
          Options: None.

     hhee[[llpp]]
          Display a help message.

          Line:    Unchanged.
          Options: None.

     [[lliinnee]] ii[[nnsseerrtt]][[!!]]
          The input text is inserted  before  the  specified
          line.   Following  the  command  name  with  a "!!"
          character causes the aauuttooiinnddeenntt option setting  to
          be toggled for the duration of this command.

          Line:    Set  to  the last line input; if no lines
                   were input, set to the  line  before  the










NNvvii//NNeexx RReeffeerreennccee ((EExx CCoommmmaannddss))                    UUSSDD::1133--5599


                   target  line, or to the first line of the
                   file if there are no lines preceding  the
                   target line.
          Options: Affected  by  the  aallttwweerraassee, aauuttooiinnddeenntt,
                   bbeeaauuttiiffyy, sshhoowwmmaattcchh, ttttyywweerraassee and  wwrraapp--
                   mmaarrggiinn options.

     [[rraannggee]] jj[[ooiinn]][[!!]] [[ccoouunntt]] [[ffllaaggss]]
          Join lines of text together.

          A  ccoouunntt  specified  to the command specifies that
          the last line of the rraannggee plus  ccoouunntt  subsequent
          lines  will be joined.  (Note, this differs by one
          from the general rule where only ccoouunntt- subsequent
          lines are affected.)

          If the current line ends with a whitespace charac-
          ter, all whitespace  is  stripped  from  the  next
          line.   Otherwise,  if the next line starts with a
          open parenthesis ("(("), do nothing.  Otherwise, if
          the  current line ends with a question mark ("??"),
          period ("..")  or exclamation point  ("!!"),  insert
          two spaces.  Otherwise, insert a single space.

          Appending  a  "!!"   character  to the command name
          causes a simpler join with no white-space process-
          ing.

          Line:    Unchanged.
          Options: None.

     [[rraannggee]] ll[[iisstt]] [[ccoouunntt]] [[ffllaaggss]]
          Display  the  lines  unambiguously.  Tabs are dis-
          played as "^^II", and the end of the line is  marked
          with a "$$" character.

          Line:    Set to the last line displayed.
          Options: None.

     mmaapp[[!!]] [[llhhss rrhhss]]
          Define or display maps (for vvii only).

          If  "llhhss" and "rrhhss" are not specified, the current
          set of command mode maps are displayed.  If a  "!!"
          character  is appended to to the command, the text
          input mode maps are displayed.

          Otherwise, when the "llhhss"  character  sequence  is
          entered in vvii, the action is as if the correspond-
          ing "rrhhss" had been entered.  If a  "!!"   character
          is  appended  to  the command name, the mapping is
          effective during text input mode, otherwise, it is
          effective  during command mode.  This allows "llhhss"










UUSSDD::1133--6600                    NNvvii//NNeexx RReeffeerreennccee ((EExx CCoommmmaannddss))


          to have two different  macro  definitions  at  the
          same  time: one for command mode and one for input
          mode.

          Whitespace  characters  require  escaping  with  a
          <<lliitteerraallnext>  character  to be entered in the llhhss
          string in visual mode.

          Normally, keys in the rrhhss string are remapped (see
          the  rreemmaapp  option),  and it is possible to create
          infinite loops.  However, keys which map to  them-
          selves are not further remapped, regardless of the
          setting of the rreemmaapp  option.   For  example,  the
          command  "::mmaapp  nn  nnzz.."  maps the "nn" key to the nn
          and zz commands.

          To exit an infinitely looping map, use the  termi-
          nal <<iinntteerrrruupptt>> character.

          Line:    Unchanged.
          Options: None.

     [[lliinnee]] mmaa[[rrkk]] <<cchhaarraacctteerr>>
     [[lliinnee]] kk <<cchhaarraacctteerr>>
          Mark  the  line  with  the  mark <<cchhaarraacctteerr>>.  The
          expressions "''<<cchhaarraacctteerr>>" and "``<<cchhaarraacctteerr>>"  can
          then  be  used  as  an address in any command that
          uses one.

          Line:    Unchanged.
          Options: None.

     [[rraannggee]] mm[[oovvee]] lliinnee
          Move the specified lines after the target line.  A
          target line of 0 places the lines at the beginning
          of the file.

          Line:    Set to the first of the moved lines.
          Options: None.

     mmkk[[eexxrrcc]][[!!]] ffiillee
          Write the abbreviations, editor options  and  maps
          to  the specified file.  Information is written in
          a form which can later be read back in  using  the
          eexx  ssoouurrccee  command.   If ffiillee already exists, the
          mmkkeexxrrcc command will fail.  This check can be over-
          ridden  by  appending a "!!"  character to the com-
          mand.

          Line:    Unchanged.
          Options: None.












NNvvii//NNeexx RReeffeerreennccee ((EExx CCoommmmaannddss))                    UUSSDD::1133--6611


     nn[[eexxtt]][[!!]] [[ffiillee ......]]
          Edit the next file from the  argument  list.   The
          nneexxtt  command will fail if the file has been modi-
          fied since the last complete  write.   This  check
          can  be overridden by appending the "!!"  character
          to  the  command  name.   The  argument  list  can
          optionally  be replaced by specifying a new one as
          arguments to this command.  In this case,  editing
          starts with the first file on the new list.

          Line:    Set as described for the eeddiitt command.
          Options: Affected  by  the  options  aauuttoowwrriittee and
                   wwrriitteeaannyy.

     [[lliinnee]] oo[[ppeenn]] //ppaatttteerrnn// [[ffllaaggss]]
          Enter open mode.  Open mode is the same  as  being
          in  vvii, but with a one-line window.  All the stan-
          dard vvii commands are available.   If  a  match  is
          found  for the optional RE argument, the cursor is
          set to the start of the matching pattern.

          _T_h_i_s _c_o_m_m_a_n_d _i_s _n_o_t _y_e_t _i_m_p_l_e_m_e_n_t_e_d_.

          Line:    Unchanged,  unless  the  optional  RE  is
                   specified, in which case it is set to the
                   line where the matching pattern is found.
          Options: Affected by the ooppeenn option.

     pprree[[sseerrvvee]]
          Save  the  file in a form that can later be recov-
          ered using the eexx --rr option.   When  the  file  is
          preserved, an email message is sent to the user.

          Line:    Unchanged.
          Options: None.

     pprreevv[[iioouuss]][[!!]]
          Edit  the  previous  file  from the argument list.
          The pprreevviioouuss command will fail  if  the  file  has
          been modified since the last complete write.  This
          check can  be  overridden  by  appending  the  "!!"
          character to the command name.

          Line:    Set as described for the eeddiitt command.
          Options: Affected  by  the  options  aauuttoowwrriittee and
                   wwrriitteeaannyy.  None.

     [[rraannggee]] pp[[rriinntt]] [[ccoouunntt]] [[ffllaaggss]]
          Display the specified lines.

          Line:    Set to the last line displayed.
          Options: None.











UUSSDD::1133--6622                    NNvvii//NNeexx RReeffeerreennccee ((EExx CCoommmmaannddss))


     [[lliinnee]] ppuu[[tt]] [[bbuuffffeerr]]
          Append buffer contents to the current line.  If  a
          buffer  is specified, its contents are appended to
          the line, otherwise, the contents of  the  unnamed
          buffer are used.

          Line:    Set to the line after the current line.
          Options: None.

     qq[[uuiitt]][[!!]]
          End  the  editing  session.   If the file has been
          modified since the last complete write,  the  qquuiitt
          command  will  fail.  This check may be overridden
          by appending a "!!"  character to the command.

          If there are more files to edit, the qquuiitt  command
          will fail.  Appending a "!!"  character to the com-
          mand name or entering two qquuiitt commands (i.e.  wwqq,
          qquuiitt,  xxiitt  or  ZZZZ)  in  a row) will override this
          check and the editor will exit.

          Line:    Unchanged.
          Options: None.

     [[lliinnee]] rr[[eeaadd]][[!!]] [[ffiillee]]
          Read a file.  A copy  of  the  specified  file  is
          appended  to  the line.  If lliinnee is 0, the copy is
          inserted at the beginning of the file.  If no file
          is  specified,  the current file is read; if there
          is no current file, then ffiillee becomes the  current
          file.   If there is no current file and no ffiillee is
          specified, then the rreeaadd command will fail.

          If ffiillee is preceded by a "!!"  character,  ffiillee  is
          treated  as if it were a shell command, and passed
          to the program  named  by  the  SSHHEELLLL  environment
          variable.  The standard and standard error outputs
          of that command are read into the file  after  the
          specified  line.   The  special meaning of the "!!"
          character can be overridden by escaping it with  a
          backslash ("\\") character.

          Line:    When  executed  from eexx, the current line
                   is set to the last line read.  When  exe-
                   cuted from vvii, the current line is set to
                   the first line read.
          Options: None.

     rreecc[[oovveerr]] ffiillee
          Recover ffiillee if it was previously  saved.   If  no
          saved  file  by that name exists, the rreeccoovveerr com-
          mand behaves similarly to the eeddiitt command.











NNvvii//NNeexx RReeffeerreennccee ((EExx CCoommmmaannddss))                    UUSSDD::1133--6633


          Line:    Set as described for the eeddiitt command.
          Options: None.

     rreess[[iizzee]] [[++||--]]ssiizzee
          VVii mode only.  Grow or shrink the current  screen.
          If  ssiizzee is a positive, signed number, the current
          screen is grown by that many lines.  If ssiizzee is  a
          negative,  signed  number,  the  current screen is
          shrunk by that many lines.  If ssiizzee is not signed,
          the  current  screen is set to the specified ssiizzee.
          Applicable only to split screens.

          Line:    Unchanged.
          Options: None.

     rreeww[[iinndd]][[!!]]
          Rewind the argument list.  If the current file has
          been  modified  since the last complete write, the
          rreewwiinndd command will fail.  This check may be over-
          ridden by appending the "!!"  character to the com-
          mand.

          Otherwise, the current file is set  to  the  first
          file in the argument list.

          Line:    Set as described for the eeddiitt command.
          Options: Affected  by  the  aauuttoowwrriittee and wwrriitteeaannyy
                   options.

     ssee[[tt]] [[ooppttiioonn[[==[[vvaalluuee]]]] ......]]  [[nnooooppttiioonn  ......]]  [[ooppttiioonn??
          ......]] [[aallll]]
          Display  or set editor options.  When no arguments
          are specified, the editor  option  tteerrmm,  and  any
          editor options whose values have been changed from
          the default settings are displayed.  If the  argu-
          ment aallll is specified, the values of all of editor
          options are displayed.

          Specifying an option name followed by the  charac-
          ter  "??"   causes the current value of that option
          to be displayed.  The "??"  can be  separated  from
          the option name by whitespace characters.  The "??"
          is necessary  only  for  Boolean  valued  options.
          Boolean  options  can  be given values by the form
          "sseett ooppttiioonn" to turn them on, or "sseett nnooooppttiioonn" to
          turn  them off.  String and numeric options can be
          assigned by  the  form  "sseett  ooppttiioonn==vvaalluuee".   Any
          whitespace  characters  in strings can be included
          literally by  preceding  each  with  a  backslash.
          More  than  one  option  can be set or listed by a
          single set command, by specifying  multiple  argu-
          ments,  each separated from the next by whitespace
          characters.










UUSSDD::1133--6644                    NNvvii//NNeexx RReeffeerreennccee ((EExx CCoommmmaannddss))


          Line:    Unchanged.
          Options: None.

     sshh[[eellll]]
          Run a shell program.  The  program  named  by  the
          sshheellll  option  is  run with a --ii (for interactive)
          flag.  Editing is resumed when that program exits.

          Line:    Unchanged.
          Options: None.

     ssoo[[uurrccee]] ffiillee
          Read  and execute eexx commands from a file.  SSoouurrccee
          commands may be nested.

          Line:    Unchanged.
          Options: None.

     sspp[[lliitt]] [[ffiillee ......]]
          VVii mode only.   Split  the  screen.   The  current
          screen is split into two screens, of approximately
          equal size.  If the cursor is in the lower half of
          the screen, the screen will split up, i.e. the new
          screen will be above the old one.  If  the  cursor
          is in the upper half of the screen, the new screen
          will be below the old one.

          If ffiillee is specified, the new  screen  is  editing
          that file, otherwise, both screens are editing the
          same  file,  and  changes  in  each  will  be   be
          reflected in the other.  The argument list for the
          new screen consists of the list of files specified
          as  arguments  to  this  command,  or, the current
          pathname if no files are specified.

          Line:    If ffiillee is specified, set as for the eeddiitt
                   command, otherwise unchanged.
          Options: None.

     [[rraannggee]]   ss[[uubbssttiittuuttee]]   [[//ppaatttteerrnn//rreeppllaaccee//]]  [[ooppttiioonnss]]
          [[ccoouunntt]] [[ffllaaggss]]
     [[rraannggee]] && [[ooppttiioonnss]] [[ccoouunntt]] [[ffllaaggss]]
     [[rraannggee]] ~~ [[ooppttiioonnss]] [[ccoouunntt]] [[ffllaaggss]]
          Make substitutions.  Replace the first instance of
          ppaatttteerrnn  with  the string rreeppllaaccee on the specified
          line(s).  If the "//ppaatttteerrnn//rreeppll//" argument is  not
          specified,  the "//ppaatttteerrnn//rreeppll//" from the previous
          ssuubbssttiittuuttee command is used.

          If ooppttiioonnss includes the letter "cc" (confirm),  you
          will  be  prompted  for  confirmation  before each
          replacement is done.  An affirmative response  (in
          English,  a  "yy" character) causes the replacement










NNvvii//NNeexx RReeffeerreennccee ((EExx CCoommmmaannddss))                    UUSSDD::1133--6655


          to be made.  A quit response (in  English,  a  "qq"
          character)  causes  the  ssuubbssttiittuuttee  command to be
          terminated.   Any  other   response   causes   the
          replacement  not  to  be  made, and the ssuubbssttiittuuttee
          command continues.  If ooppttiioonnss includes the letter
          "gg" (global), all nonoverlapping instances of ppaatt--
          tteerrnn in the line are replaced.

          The && version of the command is the  same  as  not
          specifying  a pattern or replacement string to the
          ssuubbssttiittuuttee command, and the "&&" is replaced by the
          pattern  and replacement information from the pre-
          vious substitute command.

          The ~~ version of the command is the same as &&  and
          ss, except that the search pattern used is the last
          RE used in _a_n_y command, not  necessarily  the  one
          used in the last ssuubbssttiittuuttee command.

          For example, in the sequence

              ss//rreedd//bblluuee//
              //ggrreeeenn
              ~~

          the "~~" is equivalent to "ss//ggrreeeenn//bblluuee//".

          The  ssuubbssttiittuuttee  command may be interrupted, using
          the terminal interrupt character.   All  substitu-
          tions completed before the interrupt are retained.

          Line:    Set to the last line upon which a substi-
                   tution was made.
          Options: None.

     ssuu[[ssppeenndd]][[!!]]
     sstt[[oopp]][[!!]]
     <<ccoonnttrrooll--ZZ>>
          Suspend  the edit session.  Appending a "!!"  char-
          acter to these commands turns  off  the  aauuttoowwrriittee
          option for the command.

          Line:    Unchanged.
          Options: Affected by the aauuttoowwrriittee option.

     ttaa[[gg]][[!!]] ttaaggssttrriinngg
          Edit   the  file  containing  the  specified  tag.
          Search for the tagstring, which can be in  a  dif-
          ferent  file.   If the tag is in a different file,
          then the new file is edited.  If the current  file
          has  been  modified since the last complete write,
          the ttaagg command will  fail.   This  check  can  be
          overridden  by appending the "!!"  character to the










UUSSDD::1133--6666                    NNvvii//NNeexx RReeffeerreennccee ((EExx CCoommmmaannddss))


          command name.

          The ttaagg command searches for ttaaggssttrriinngg in the tags
          file(s)  specified  by  the option.  (See _c_t_a_g_s(1)
          for more information on tags files.)

          Line:    Set to the line indicated by the tag.
          Options: Affected  by  the  aauuttoowwrriittee,  ttaagglleennggtthh,
                   ttaaggss and wwrriitteeaannyy options.

     ttaaggpp[[oopp]][[!!]] [[ffiillee || nnuummbbeerr]]
          Pop  to  the  specified tag in the tags stack.  If
          neither ffiillee or nnuummbbeerr is  specified,  the  ttaaggppoopp
          command  pops to the most recent entry on the tags
          stack.  If ffiillee or nnuummbbeerr is specified, the ttaaggppoopp
          command  pops to the most recent entry in the tags
          stack for that file, or numbered entry in the tags
          stack, respectively.  (See the ddiissppllaayy command for
          information on displaying the tags stack.)

          If the file has been modified since the last  com-
          plete  write,  the ttaaggppoopp command will fail.  This
          check may be overridden by appending a "!!"   char-
          acter to the command name.

          Line:    Set to the line indicated by the tag.
          Options: Affected  by  the aauuttoowwrriittee, and wwrriitteeaannyy
                   options.

     ttaaggtt[[oopp]][[!!]]
          Pop to the least recent tag  on  the  tags  stack,
          clearing the tags stack.

          If  the file has been modified since the last com-
          plete write, the ttaaggppoopp command will  fail.   This
          check  may be overridden by appending a "!!"  char-
          acter to the command name.

          Line:    Set to the line indicated by the tag.
          Options: Affected by the aauuttoowwrriittee,  and  wwrriitteeaannyy
                   options.

     uunnaa[[bbbbrreevv]] llhhss
          Delete  an abbreviation.  Delete llhhss from the cur-
          rent list of abbreviations.

          Line:    Unchanged.
          Options: None.

     uu[[nnddoo]]
          Undo the last change made to  the  file.   Changes
          made  by  gglloobbaall,  vv, vviissuuaall and map sequences are
          considered a single command.  If repeated,  the  uu










NNvvii//NNeexx RReeffeerreennccee ((EExx CCoommmmaannddss))                    UUSSDD::1133--6677


          command  alternates  between these two states, and
          is its own inverse.

          Line:    Set to the last line modified by the com-
                   mand.
          Options: None.

     uunnmm[[aapp]][[!!]] llhhss
          Unmap  a  mapped  string.  Delete the command mode
          map definition for llhhss.  If a  "!!"   character  is
          appended  to  the  command  name,  delete the text
          input mode map definition instead.

          Line:    Unchanged.
          Options: None.

     vvee[[rrssiioonn]]
          Display the version of the eexx//vvii editor.

     [[lliinnee]] vvii[[ssuuaall]] [[ttyyppee]] [[ccoouunntt]] [[ffllaaggss]]
          EExx mode only.  Enter vvii.  The  ttyyppee  is  optional,
          and  can  be  "--", "++" or "^^", as in the eexx zz com-
          mand, to specify the the position of the specified
          line  in  the  screen  window.  (The default is to
          place the line at the top of the  screen  window.)
          A  ccoouunntt  specifies  the number of lines that will
          initially be displayed.  (The default is the value
          of the wwiinnddooww editor option.)

          Line:    Unchanged  unless  lliinnee  is specified, in
                   which case it is set to that line.
          Options: None.

     vvii[[ssuuaall]][[!!]] [[++ccmmdd]] [[ffiillee]]
          VVii mode only.  Edit a new file.  Identical to  the
          "eeddiitt[[!!]] [[++ccmmdd]] [[ffiillee]]" command.

     vviiuu[[ssaaggee]] [[ccoommmmaanndd]]
          Display  usage  for  a  vvii command.  If ccoommmmaanndd is
          specified, a usage statement for that  command  is
          displayed.  Otherwise, usage statements for all vvii
          commands are displayed.

          Line:    Unchanged.
          Options: None.

     [[rraannggee]] ww[[rriittee]][[!!]] [[>>>>]] [[ffiillee]]
     [[rraannggee]] ww[[rriittee]] [[!!]] [[ffiillee]]
     [[rraannggee]] wwnn[[!!]] [[>>>>]] [[ffiillee]]
     [[rraannggee]] wwqq[[!!]] [[>>>>]] [[ffiillee]]
          Write the file.  The specified lines  (the  entire
          file,  if  no  range is given) is written to ffiillee.
          If ffiillee is not specified, the current pathname  is










UUSSDD::1133--6688                    NNvvii//NNeexx RReeffeerreennccee ((EExx CCoommmmaannddss))


          used.   If ffiillee is specified, and it exists, or if
          the current pathname was set using the  ffiillee  com-
          mand,  and the file already exists, these commands
          will fail.  Appending a "!!"  character to the com-
          mand  name  will override this check and the write
          will be attempted, regardless.

          Specifying the optional ">>>>" string will cause the
          write to be appended to the file, in which case no
          tests are made for the file already existing.

          If the file is preceded by a "!!"   character,  the
          program named in the SHELL environment variable is
          invoked with file as its second argument, and  the
          specified  lines  are  passed as standard input to
          that command.  The "!!"  in this usage must be sep-
          arated  from  command name by at least one whites-
          pace character.  The special meaning  of  the  "!!"
          may  be overridden by escaping it with a backslash
          ("\\") character.

          The wwqq version of the write command will exit  the
          editor  after  writing  the  file, if there are no
          further files to edit.  Appending a "!!"  character
          to  the  command  name or entering two "quit" com-
          mands (i.e.  wwqq, qquuiitt, xxiitt or ZZZZ) in a  row)  will
          override  this  check  and  the  editor will exit,
          ignoring any files that have not yet been  edited.

          The  wwnn  version of the write command will move to
          the next file after writing the file,  unless  the
          write fails.

          Line:    Unchanged.
          Options: Affected  by  the  rreeaaddoonnllyy  and wwrriitteeaannyy
                   options.

     [[rraannggee]] xx[[iitt]][[!!]] [[ffiillee]]
          Write the file if it has been modified.  The spec-
          ified  lines  are written to ffiillee, if the file has
          been modified since the last complete write to any
          file.   If  no rraannggee is specified, the entire file
          is written.

          The xxiitt command will exit the editor after writing
          the  file,  if there are no further files to edit.
          Appending a "!!"  character to the command name  or
          entering  two "quit" commands (i.e.  wwqq, qquuiitt, xxiitt
          or ZZZZ) in a row) will override this check and  the
          editor will exit, ignoring any files that have not
          yet been edited.












NNvvii//NNeexx RReeffeerreennccee ((EExx CCoommmmaannddss))                    UUSSDD::1133--6699


          Line:    Unchanged.
          Options: Affected by  the  rreeaaddoonnllyy  and  wwrriitteeaannyy
                   options.

     [[rraannggee]] yyaa[[nnkk]] [[bbuuffffeerr]] [[ccoouunntt]]
          Copy  the  specified  lines  to  a  buffer.  If no
          buffer is specified, the unnamed buffer is used.

          Line:    Unchanged.
          Options: None.

     [[lliinnee]] zz [[ttyyppee]] [[ccoouunntt]] [[ffllaaggss]]
          Adjust the window.  If no ttyyppee is specified,  then
          ccoouunntt  lines following the specified line are dis-
          played.  The default ccoouunntt is  the  value  of  the
          wwiinnddooww  option.   The  ttyyppee  argument  changes the
          position at which lliinnee is displayed on the  screen
          by  changing  the number of lines displayed before
          and after lliinnee.  The following ttyyppee characters may
          be used:

          -        Place  the  line  at  the  bottom  of the
                   screen.
          +        Place the line at the top of the  screen.
          .        Place  the  line  in  the  middle  of the
                   screen.
          ^        Write out count lines starting ccoouunntt **  22
                   lines before lliinnee; the net effect of this
                   is that a "zz^^" command following a zz com-
                   mand writes the previous page.
          =        Center  lliinnee on the screen with a line of
                   hyphens displayed immediately before  and
                   after  it.   The  number of preceding and
                   following lines  of  text  displayed  are
                   reduced to account for those lines.

          Line:    Set  to the last line displayed, with the
                   exception of the ttyyppee, where the  current
                   line  is set to the line specified by the
                   command.
          Options: Affected by the option.

     1155..  SSeett OOppttiioonnss

          There are a large number of options  that  may  be
     set  (or  unset) to change the editor's behavior.  This
     section describes the options, their abbreviations  and
     their default values.

          In  each  entry  below,  the first part of the tag
     line is the full name of the option,  followed  by  any
     equivalent abbreviations.  (Regardless of the abbrevia-
     tions, it is only necessary to use the  minimum  number










UUSSDD::1133--7700                                  NNvvii//NNeexx RReeffeerreennccee


     of  characters necessary to distinguish an abbreviation
     from all other commands  for  it  to  be  accepted,  in
     nneexx/nnvvii.   Historically,  only  the  full  name and the
     official abbreviations were accepted by  eexx/vvii.   Using
     full  names  in  your  startup  files and environmental
     variables will probably make them more portable.)   The
     part  in  square  brackets  is the default value of the
     option.  Most of the options are boolean, i.e. they are
     either  on or off, and do not have an associated value.

          Options apply to both eexx and vvii modes, unless oth-
     erwise specified.

          For  information  on  modifying  the options or to
     display the options and their current values,  see  the
     "set" command in the section entitled "EExx CCoommmmaannddss".

     aallttwweerraassee [[ooffff]]
          VVii  only.   Change  how  vvii does word erase during
          text input.  When this option is set, text is bro-
          ken up into three classes: alphabetic, numeric and
          underscore characters, other nonblank  characters,
          and  blank characters.  Changing from one class to
          another marks the end of a word.  In addition, the
          class  of  the  first  character erased is ignored
          (which is exactly what you want when erasing path-
          name components).

     aauuttooiinnddeenntt,, aaii [[ooffff]]
          If  this  option is set, whenever you create a new
          line (using the vvii AA, aa, CC, cc, II, ii, OO, oo,  RR,  rr,
          SS,  and  ss commands, or the eexx aappppeenndd, cchhaannggee, and
          iinnsseerrtt commands) the  new  line  is  automatically
          indented  to  align the cursor with the first non-
          blank character of the line from which you created
          it.   Lines  are  indented using tab characters to
          the extent possible (based on  the  value  of  the
          ttaabbssttoopp option) and then using space characters as
          necessary.  For commands inserting text  into  the
          middle  of  a  line,  any  blank characters to the
          right of the cursor are discarded, and  the  first
          nonblank  character  to the right of the cursor is
          aligned as described above.

          The indent characters are themselves somewhat spe-
          cial.   If you do not enter more characters on the
          new line before moving to another line, or  enter-
          ing <<eessccaappee>>, the indent character will be deleted
          and the line will be empty.  For example,  if  you
          enter  <<ccaarrrriiaaggee--rreettuurrnn>>  twice in succession, the
          line created by the first  <<ccaarrrriiaaggee--rreettuurrnn>>  will
          not  have  any characters in it, regardless of the
          indentation of the previous or subsequent line.










NNvvii//NNeexx RReeffeerreennccee                                  UUSSDD::1133--7711


          Indent characters  also  require  that  you  enter
          additional  erase  characters to delete them.  For
          example, if you have an indented line,  containing
          only  blanks, the first <<wwoorrdd--eerraassee>> character you
          enter will erase up to end of the  indent  charac-
          ters, and the second will erase back to the begin-
          ning of the line.  (Historically, only  the  <<ccoonn--
          ttrrooll--DD>>  key  would  erase  the indent characters.
          Both the <<ccoonnttrrooll--DD>> key and the usual erase  keys
          work in nnvvii.)  In addition, if the cursor is posi-
          tioned at the end of the  indent  characters,  the
          keys  "00<<ccoonnttrrooll--DD>>"  will erase all of the indent
          characters for the  current  line,  resetting  the
          indentation  level  to  0.   Similarly,  the  keys
          "^^<<ccoonnttrrooll--DD>>" will erase all of the indent  char-
          acters  for the current line, leaving the indenta-
          tion level for future created lines unaffected.

          Finally, if the aauuttooiinnddeenntt option is  set,  the  SS
          and  cccc commands change from the first nonblank of
          the line to the end of the line, instead  of  from
          the  beginning of the line to the end of the line.

     aauuttoopprriinntt,, aapp [[ooffff]]
          EExx only.  Cause the current line to  be  automati-
          cally  displayed after the eexx commands <<, >>, ccooppyy,
          ddeelleettee, jjooiinn, mmoovvee, ppuutt, tt, UUnnddoo, and uunnddoo.   This
          automatic  display is suppressed during gglloobbaall and
          vvgglloobbaall  commands,  and  for  any  command   where
          optional  flags are used to explicitly display the
          line.

     aauuttoowwrriittee,, aaww [[ooffff]]
          If this option is set, the vvii !!, ^^^^, ^^]] and  <<ccoonn--
          ttrrooll--ZZ>>  commands,  and the eexx eeddiitt, nneexxtt, rreewwiinndd,
          ssttoopp, ssuussppeenndd, ttaagg, ttaaggppoopp,  and  ttaaggttoopp  commands
          automatically  write  the current file back to the
          current file name if it has been modified since it
          was last written.  If the write fails, the command
          fails and goes no further.

          Appending the optional force  flag  character  "!!"
          to  the  eexx  commands nneexxtt, rreewwiinndd, ssttoopp, ssuussppeenndd,
          ttaagg, ttaaggppoopp, and ttaaggttoopp stops the automatic  write
          from being attempted.

          (Historically,   the   nneexxtt  command  ignored  the
          optional force flag.)  Note, the eexx commands eeddiitt,
          qquuiitt,  sshheellll,  and  xxiitt  are  _n_o_t  affected by the
          aauuttoowwrriittee option.

     bbeeaauuttiiffyy,, bbff [[ooffff]]
          If this option is set, all control characters that










UUSSDD::1133--7722                                  NNvvii//NNeexx RReeffeerreennccee


          are  not  currently  being  specially interpreted,
          other than <<ttaabb>>, <<nneewwlliinnee>>, and <<ffoorrmm--ffeeeedd>>,  are
          discarded from commands read in by eexx from command
          files, and from input text entered to  vvii  (either
          into the file or to the colon command line).  Text
          files read by eexx/vvii are _n_o_t affected by the  bbeeaauu--
          ttiiffyy option.

     ccddppaatthh  [[eennvviirroonnmmeenntt vvaarriiaabbllee CCDDPPAATTHH,, oorr ccuurrrreenntt ddiirreecc--
          ttoorryy]]
          This option is used to specify a  colon  separated
          list  of  directories  which are used as path pre-
          fixes for any relative path names  used  as  argu-
          ments  for  the  ccdd  command.   The  value of this
          option defaults to the value of the  environmental
          variable  CCDDPPAATTHH  if  it  is set, otherwise to the
          current directory.   For  compatibility  with  the
          POSIX  1003.2 shell, the ccdd command does _n_o_t check
          the current directory as a path prefix  for  rela-
          tive path names unless it is explicitly specified.
          It may be so specified by entering an empty string
          or  a  ".."   character into the CCDDPPAATTHH variable or
          the option value.

     ccoolluummnnss,, ccoo [[8800]]
          The number of columns in the screen.  Setting this
          option causes eexx/vvii to set (or reset) the environ-
          mental variable CCOOLLUUMMNNSS.  See the section entitled
          "SSiizziinngg tthhee SSccrreeeenn" more information.

     ccoommmmeenntt [[ooffff]]
          VVii  only.  If the first non-empty line of the file
          begins with the string "//**", this option causes vvii
          to  skip  to  the  end  of that C-language comment
          (probably a terribly boring legal  notice)  before
          displaying the file.

     ddiirreeccttoorryy,, ddiirr [[eennvviirroonnmmeenntt vvaarriiaabbllee TTMMPPDDIIRR,, oorr //ttmmpp]]
          The  directory  where temporary files are created.
          The environmental variable TTMMPPDDIIRR is used  as  the
          default  value  if  it  exists,  otherwise //ttmmpp is
          used.

     eeddccoommppaattiibbllee,, eedd [[ooffff]]
          Remember the values of the "c" and "g" suffices to
          the  ssuubbssttiittuuttee  commands, instead of initializing
          them as unset for each  new  command.   Specifying
          pattern  and replacement strings to the ssuubbssttiittuuttee
          command unsets the "c" and "g" suffices as well.

     eerrrroorrbbeellllss,, eebb [[ooffff]]
          EExx only.  EExx error messages are normally presented
          in inverse video.  If that is not possible for the










NNvvii//NNeexx RReeffeerreennccee                                  UUSSDD::1133--7733


          terminal, setting this option  causes  error  mes-
          sages  to  be  announced  by  ringing the terminal
          bell.

     eexxrrcc,, eexx [[ooffff]]
          If this option is turned  off  in  the  system  or
          $HOME  startup  files, the local startup files are
          never read (unless they are the same as the system
          or  $HOME  startup  files).   Turning it on has no
          effect, i.e. the normal checks for  local  startup
          files  are performed, regardless.  See the section
          entitled "SSttaarrttuupp IInnffoorrmmaattiioonn" for  more  informa-
          tion.

     eexxtteennddeedd [[ooffff]]
          This  option  causes all regular expressions to be
          treated as POSIX 1003.2 Extended  Regular  Expres-
          sions  (which  are  similar  to  historic _e_g_r_e_p(1)
          style expressions).

     ffllaasshh [[oonn]]
          This option causes the screen to flash instead  of
          beeping  the  keyboard,  on error, if the terminal
          has the capability.

     hhaarrddttaabbss,, hhtt [[88]]
          This option defines the spacing  between  hardware
          tab  settings, i.e.  the tab expansion done by the
          operating system and/or the terminal  itself.   As
          nneexx/nnvvii  never writes <<ttaabb>> characters to the ter-
          minal, unlike historic  versions  of  eexx/vvii,  this
          option does not currently have any affect.

     iiggnnoorreeccaassee,, iicc [[ooffff]]
          This option causes regular expressions, both in eexx
          commands and in searches, to  be  evaluated  in  a
          case-insensitive manner.

     kkeeyyttiimmee [[66]]
          The  10th's  of  a second eexx/vvii waits for a subse-
          quent key to complete a key mapping.

     lleeffttrriigghhtt [[ooffff]]
          VVii only.  This option  causes  the  screen  to  be
          scrolled  left-right to view lines longer than the
          screen,  instead  of  the  traditional  vvii  screen
          interface which folds long lines at the right-hand
          margin of the terminal.

     lliinneess,, llii [[2244]]
          VVii only.  The number of lines in the screen.  Set-
          ting  this  option  causes eexx/vvii to set (or reset)
          the environmental variable LLIINNEESS.  See the section










UUSSDD::1133--7744                                  NNvvii//NNeexx RReeffeerreennccee


          entitled "SSiizziinngg tthhee SSccrreeeenn" for more information.

     lliisspp [[ooffff]]
          VVii only.  This option changes the behavior of  the
          vvii  ((,  )),  {{,  }}, [[[[ and ]]]] commands to match the
          Lisp  language.   Also,  the  aauuttooiinnddeenntt  option's
          behavior is changed to be appropriate for Lisp.

          _T_h_i_s _o_p_t_i_o_n _i_s _n_o_t _y_e_t _i_m_p_l_e_m_e_n_t_e_d_.

     lliisstt [[ooffff]]
          This  option  causes  lines  to be displayed in an
          unambiguous fashion.  Specifically, tabs are  dis-
          played  as control characters, i.e.  "^^II", and the
          ends of lines are marked with a "$$" character.

     mmaaggiicc [[oonn]]
          This option is on by default.  Turning  the  mmaaggiicc
          option  off  causes all regular expression charac-
          ters except for "^^" and  "$$",  to  be  treated  as
          ordinary   characters.   To  re-enable  characters
          individually, when the mmaaggiicc option is  off,  pre-
          cede them with a backslash "\\" character.  See the
          section entitled "RReegguullaarr EExxpprreessssiioonnss aanndd RReeppllaaccee--
          mmeenntt SSttrriinnggss" for more information.

     mmaattcchhttiimmee [[77]]
          VVii  only.   The 10th's of a second eexx/vvii pauses on
          the matching character when the  sshhoowwmmaattcchh  option
          is set.

     mmeessgg [[oonn]]
          This  option  allows  other  users  to contact you
          using the _t_a_l_k(1) and  _w_r_i_t_e(1)  utilities,  while
          you  are editing.  EExx/vvii does not turn message on,
          i.e. if messages were turned off when  the  editor
          was  invoked,  they  will  stay  turned off.  This
          option only permits you to disallow  messages  for
          the  edit  session.   See  the _m_e_s_g(1) utility for
          more information.

     mmooddeelliinneess,, mmooddeelliinnee [[ooffff]]
          If the mmooddeelliinneess option is set, eexx/vvii has histori-
          cally  scanned  the  first  and last five lines of
          each file as it is read for editing,  looking  for
          any  eexx  commands  that  have been placed in those
          lines.  After the  startup  information  has  been
          processed,  and before the user starts editing the
          file, any commands embedded in the file  are  exe-
          cuted.

          Commands were recognized by the letters "e" or "v"
          followed by "x" or "i", at the beginning of a line










NNvvii//NNeexx RReeffeerreennccee                                  UUSSDD::1133--7755


          or  following  a  tab or space character, and fol-
          lowed by a ":", an eexx command, and another ":".

          This option is a security problem of immense  pro-
          portions, and should not be used under any circum-
          stances.

          _T_h_i_s _o_p_t_i_o_n _w_i_l_l _n_e_v_e_r _b_e _i_m_p_l_e_m_e_n_t_e_d_.

     nnuummbbeerr,, nnuu [[ooffff]]
          Precede each line displayed with its current  line
          number.

     ooccttaall [[ooffff]]
          Display   unknown  characters  as  octal  numbers,
          instead of the default hexadecimal.

     ooppeenn [[oonn]]
          EExx only.  If this option is not set, the ooppeenn  and
          vviissuuaall commands are disallowed.

     ooppttiimmiizzee,, oopptt [[oonn]]
          VVii  only.  Throughput of text is expedited by set-
          ting the terminal not  to  do  automatic  carriage
          returns when printing more than one (logical) line
          of output, greatly speeding  output  on  terminals
          without addressable cursors when text with leading
          white space is printed.

          _T_h_i_s _o_p_t_i_o_n _i_s _n_o_t _y_e_t _i_m_p_l_e_m_e_n_t_e_d_.

     ppaarraaggrraapphhss,, ppaarraa [[IIPPLLPPPPPPQQPPPP LLIIppppllppiippbbpp]]
          VVii only.  Define additional  paragraph  boundaries
          for  the  {{  and  }}  commands.   The value of this
          option must be a character  string  consisting  of
          zero or more character pairs.

          In  the  text  to  be edited, the character string
          <<nneewwlliinnee>>..<<cchhaarr--ppaaiirr>>, (where <<cchhaarr--ppaaiirr>>  is  one
          of  the  character  pairs  in  the option's value)
          defines a paragraph boundary.  For example, if the
          option  were  set to LLaaAA<<ssppaaccee>>####, then all of the
          following additional paragraph boundaries would be
          recognized:


              <newline>.La
              <newline>.A<space>
              <newline>.##


     pprroommpptt [[oonn]]
          EExx  only.   This  option  causes  eexx to prompt for










UUSSDD::1133--7766                                  NNvvii//NNeexx RReeffeerreennccee


          command input with a "::" character; when it is not
          set, no prompt is displayed.

     rreeaaddoonnllyy,, rroo [[ooffff]]
          This  option causes a force flag to be required to
          attempt to write the file  back  to  the  original
          file  name.   Setting this option is equivalent to
          using the --RR command line  option,  or  editing  a
          file which lacks write permission.

     rreeccddiirr [[//vvaarr//ttmmpp//vvii..rreeccoovveerr]]
          The directory where recovery files are stored.

          If  you  change the value of rreeccddiirr, be careful to
          choose a directory whose contents  are  not  regu-
          larly deleted.  Bad choices include directories in
          memory based filesystems, or //ttmmpp,  on  most  sys-
          tems,  as  their  contents  are  removed  when the
          machine is rebooted.

          Public directories like //uussrr//ttmmpp and //vvaarr//ttmmpp  are
          usually  safe,  although  some  sites periodically
          prune old files from them.  There is  no  require-
          ment  that you use a public directory, e.g. a sub-
          directory of your home directory will work fine.

          Finally, if you change the value  of  rreeccddiirr,  you
          must modify the recovery script to operate in your
          chosen recovery area.

          See the section entitled  "RReeccoovveerryy"  for  further
          information.

     rreeddrraaww,, rree [[ooffff]]
          VVii   only.   The  editor  simulates  (using  great
          amounts of output), an intelligent terminal  on  a
          dumb  terminal  (e.g.  during insertions in vvii the
          characters  to  the  right  of  the   cursor   are
          refreshed as each input character is typed).

          _T_h_i_s _o_p_t_i_o_n _i_s _n_o_t _y_e_t _i_m_p_l_e_m_e_n_t_e_d_.

     rreemmaapp [[oonn]]
          If  this  option  is set, it is possible to define
          macros in terms of other macros.  Otherwise,  each
          key is only remapped up to one time.  For example,
          if "AA" is mapped to "BB", and "BB" is mapped to "CC",
          The  keystroke  "AA"  will  be mapped to "CC" if the
          rreemmaapp option is set, and to "BB" if it is not  set.

     rreeppoorrtt [[55]]
          Set the threshold of the number of lines that need
          to be changed or yanked before a message  will  be










NNvvii//NNeexx RReeffeerreennccee                                  UUSSDD::1133--7777


          displayed  to  the  user.   For everything but the
          yank command, the value is the largest value about
          which  the  editor  is  silent, i.e. by default, 6
          lines must be deleted before the user is notified.
          However,  if the number of lines yanked is greater
          than _o_r _e_q_u_a_l _t_o the set value, it is reported  to
          the user.

     rruulleerr [[ooffff]]
          VVii  only.  Display a row/column ruler on the colon
          command line.

     ssccrroollll,, ssccrr [[wwiinnddooww // 22]]
          Set the number of lines scrolled by the  vvii  <<ccoonn--
          ttrrooll--DD>> and <<ccoonnttrrooll--UU>> commands.

          Historically,  the  eexx  zz  command, when specified
          without a count, used two times the  size  of  the
          scroll  value; the POSIX 1003.2 standard specified
          the window size, which is a better choice.

     sseeccttiioonnss,, sseecctt [[NNHHSSHHHH HHUUnnhhsshh]]
          VVii only.  Define additional section boundaries for
          the  [[[[  and  ]]]]  commands.   The  sseeccttiioonnss option
          should be set to a character string consisting  of
          zero  or  more character pairs.  In the text to be
          edited,  the  character  string   <<nneewwlliinnee>>..<<cchhaarr--
          ppaaiirr>>,  (where <<cchhaarr--ppaaiirr>> is one of the character
          pairs in the option's value),  defines  a  section
          boundary  in the same manner that ppaarraaggrraapphh option
          boundaries are defined.

     sshheellll,, sshh [[eennvviirroonnmmeenntt vvaarriiaabbllee SSHHEELLLL,, oorr //bbiinn//sshh]]
          Select the shell used by the editor.   The  speci-
          fied  path is the pathname of the shell invoked by
          the vvii !!  shell escape command and by the eexx sshheellll
          command.  This program is also used to resolve any
          shell meta-characters in eexx commands.

     sshhiiffttwwiiddtthh,, ssww [[88]]
          Set the autoindent and shift  command  indentation
          width.   This  width  is  used  by  the aauuttooiinnddeenntt
          option and by the <<, >>, and sshhiifftt commands.

     sshhoowwddiirrttyy [[ooffff]]
          VVii only.  Display an asterisk on the colon command
          line if the file has been modified.

     sshhoowwmmaattcchh,, ssmm [[ooffff]]
          VVii only.  This option causes vvii, when a "}}" or "))"
          is entered, to briefly move the cursor the  match-
          ing "{{" or "((".  See the mmaattcchhttiimmee option for more
          information.










UUSSDD::1133--7788                                  NNvvii//NNeexx RReeffeerreennccee


     sshhoowwmmooddee [[ooffff]]
          VVii only.  This  option  causes  vvii  to  display  a
          string  identifying the current editor mode on the
          colon command line.

     ssiiddeessccrroollll [[1166]]
          VVii only.  Sets the  number  of  columns  that  are
          shifted  to  the  left  or right, when vvii is doing
          left-right scrolling and the left or right  margin
          is  crossed.   See  the  lleeffttrriigghhtt option for more
          information.

     sslloowwooppeenn,, ssllooww [[ooffff]]
          This option affects the display algorithm used  by
          vvii,  holding  off display updating during input of
          new text to improve throughput when  the  terminal
          in use is slow and unintelligent.

          _T_h_i_s _o_p_t_i_o_n _i_s _n_o_t _y_e_t _i_m_p_l_e_m_e_n_t_e_d_.

     ssoouurrcceeaannyy [[ooffff]]
          If  this option is turned on, vvii historically read
          startup files that were  owned  by  someone  other
          than  the  editor  user.  See the section entitled
          "SSttaarrttuupp IInnffoorrmmaattiioonn" for more information.   This
          option  is  a  security problem of immense propor-
          tions, and should not be used  under  any  circum-
          stances.

          _T_h_i_s _o_p_t_i_o_n _w_i_l_l _n_e_v_e_r _b_e _i_m_p_l_e_m_e_n_t_e_d_.

     ttaabbssttoopp,, ttss [[88]]
          This  option  sets  tab widths for the editor dis-
          play.

     ttaagglleennggtthh,, ttll [[00]]
          This option sets the maximum number of  characters
          that  are  considered  significant  in a tag name.
          Setting the value to 0 makes all of the characters
          in the tag name significant.

     ttaaggss,, ttaagg [[ttaaggss //vvaarr//ddbb//lliibbcc..ttaaggss //ssyyss//kkeerrnn//ttaaggss]]
          Sets  the  list  of  tags  files, in search order,
          which are used when the editor searches for a tag.

     tteerrmm,, ttttyyttyyppee,, ttttyy [[eennvviirroonnmmeenntt vvaarriiaabbllee TTEERRMM]]
          Set the terminal type.  Setting this option causes
          eexx/vvii to set (or reset) the environmental variable
          TTEERRMM.

     tteerrssee [[ooffff]]
          This  option has historically made editor messages
          less  verbose.   It  has   no   effect   in   this










NNvvii//NNeexx RReeffeerreennccee                                  UUSSDD::1133--7799


          implementation.   See  the vveerrbboossee option for more
          information.

     ttiillddeeoopp
          Modify the ~~ command to take an associated motion.

     ttiimmeeoouutt,, ttoo [[oonn]]
          If  this option is set, eexx/vvii waits for a specific
          period for a subsequent key to complete a key map-
          ping  (see  the kkeeyyttiimmee option).  If the option is
          not set, the editor waits until  enough  keys  are
          entered  to  resolve  the ambiguity, regardless of
          how long it takes.

     ttttyywweerraassee [[ooffff]]
          VVii only.  This option changes  how  vvii  does  word
          erase  during  text input.  If this option is set,
          text is broken up into two classes, blank  charac-
          ters  and  nonblank characters.  Changing from one
          class to another marks the end of a word.

     vveerrbboossee [[ooffff]]
          VVii only.  VVii historically bells the  terminal  for
          many  obvious  mistakes,  e.g. trying to move past
          the left-hand margin, or past the end of the file.
          If  this  option  is set, an error message is dis-
          played for all errors.

     ww330000 [[nnoo ddeeffaauulltt]]
          VVii only.  Set the window size if the baud rate  is
          less  than  1200  baud.  See the wwiinnddooww option for
          more information.

     ww11220000 [[nnoo ddeeffaauulltt]]
          VVii only.  Set the window size if the baud rate  is
          equal  to  1200  baud.   See the wwiinnddooww option for
          more information.

     ww99660000 [[nnoo ddeeffaauulltt]]
          VVii only.  Set the window size if the baud rate  is
          greater than 1200 baud.  See the wwiinnddooww option for
          more information.

     wwaarrnn [[oonn]]
          EExx only.  This option causes a warning message  to
          the  terminal if the file has been modified, since
          it was last written, before a !!  command.

     wwiinnddooww,, ww,, wwii [[eennvviirroonnmmeenntt vvaarriiaabbllee LLIINNEESS]]
          This option determines the default number of lines
          in  a  screenful, as written by the zz command.  It
          also determines the number of  lines  scrolled  by
          the  vvii commands <<ccoonnttrrooll--FF>> and <<ccoonnttrrooll--BB>>.  The










UUSSDD::1133--8800                                  NNvvii//NNeexx RReeffeerreennccee


          value of window  can  be  unrelated  to  the  real
          screen  size, although it starts out as the number
          of lines on the screen (see the  section  entitled
          "SSiizziinngg  tthhee  SSccrreeeenn" for more information).  Set-
          ting the value of the wwiinnddooww option is the same as
          using the --ww command line option.

          If  the  value of the wwiinnddooww option (as set by the
          wwiinnddooww, ww330000, ww11220000 or ww99660000 options)  is  smaller
          than  the  actual size of the screen, large screen
          movements will  result  in  displaying  only  that
          smaller  number  of lines on the screen.  (Further
          movements in that same area  will  result  in  the
          screen  being filled.)  This can provide a perfor-
          mance improvement when viewing different places in
          one or more files over a slow link.

     wwrraappmmaarrggiinn,, wwmm [[00]]
          VVii only.  If the value of the wwrraappmmaarrggiinn option is
          non-zero, vvii will split lines so that they end  at
          least  that number of characters before the right-
          hand margin of the screen.  (Note,  the  value  of
          wwrraappmmaarrggiinn is _n_o_t a text length.  In a screen that
          is 80 columns wide,  the  command  "::sseett  wwrraappmmaarr--
          ggiinn==88"  attempts  to  keep  the lines less than or
          equal to 72 columns wide.)

          Lines are split at the previous whitespace charac-
          ter  closest  to the number.  Any trailing whites-
          pace characters before that character are deleted.
          If  the  line  is  split  because  of  an inserted
          <<ssppaaccee>> or <<ttaabb>> character,  and  you  then  enter
          another <<ssppaaccee>> character, it is discarded.

          If wrapmargin is set to 0, or if there is no blank
          character upon which to split the line,  the  line
          is not broken.

     wwrraappssccaann,, wwss [[oonn]]
          This option causes searches to wrap around the end
          or the beginning of the  file,  and  back  to  the
          starting  point.   Otherwise, the end or beginning
          of the file terminates the search.

     wwrriitteeaannyy,, wwaa [[ooffff]]
          If this option  is  set,  file-overwriting  checks
          that  would  usually  be made before the wwrriittee and
          xxiitt commands, or before an  automatic  write  (see
          the  aauuttoowwrriittee option), are not made.  This allows
          a write to any file, provided the file permissions
          allow it.












NNvvii//NNeexx RReeffeerreennccee                                  UUSSDD::1133--8811


     1166..  AAddddiittiioonnaall FFeeaattuurreess iinn NNeexx//NNvvii

          There  are  a few features in nneexx/nnvvii that are not
     found in historic versions of eexx/vvii.  Some of the  more
     interesting of those features are as follows:

     88--bbiitt cclleeaann ddaattaa,, llaarrggee lliinneess,, ffiilleess
          NNeexx/nnvvii  will  edit any format file.  Line lengths
          are limited by available memory,  and  file  sizes
          are  limited by available disk space.  The vvii text
          input mode command <<ccoonnttrrooll--XX>> can insert any pos-
          sible character value into the text.

     SSpplliitt ssccrreeeennss
          The sspplliitt command divides the screen into multiple
          editing regions.  The <<ccoonnttrrooll--WW>> command  rotates
          between  the  foreground screens.  The rreessiizzee com-
          mand can be used to grow or  shrink  a  particular
          screen.

     BBaacckkggrroouunndd aanndd ffoorreeggrroouunndd ssccrreeeennss
          The bbgg command backgrounds the current screen, and
          the ffgg command foregrounds  backgrounded  screens.
          The  ddiissppllaayy command can be used to list the back-
          ground screens.

     TTaagg ssttaacckkss
          Tags are now maintained in a stack.  The <<ccoonnttrrooll--
          TT>>  command  returns to the previous tag location.
          The ttaaggppoopp command returns to the most recent  tag
          location  by default, or, optionally to a specific
          tag number in the tag stack, or  the  most  recent
          tag  from  a  specified file.  The ddiissppllaayy command
          can be used to list the tags  stack.   The  ttaaggttoopp
          command returns to the top of the tag stack.

     NNeeww ddiissppllaayyss
          The  ddiissppllaayy  command  can  be used to display the
          current buffers, the backgrounded screens, and the
          tags stack.

     IInnffiinniittee uunnddoo
          Changes  made during an edit session may be rolled
          backward and forward.  A  ..   command  immediately
          after  a  uu  command  continues  either forward or
          backward depending on whether the uu command was an
          undo or a redo.

     UUssaaggee iinnffoorrmmaattiioonn
          The  eexxuussaaggee  and  vviiuussaaggee  commands provide usage
          information for all of the eexx and vvii  commands  by
          default, or, optionally, for a specific command or
          key.










UUSSDD::1133--8822                                  NNvvii//NNeexx RReeffeerreennccee


     EExxtteennddeedd RReegguullaarr EExxpprreessssiioonnss
          The eexxtteennddeedd option causes Regular Expressions  to
          be interpreted as as Extended Regular Expressions,
          (i.e. _e_g_r_e_p(1) style Regular Expressions).

     WWoorrdd sseeaarrcchh
          The <<ccoonnttrrooll--AA>> command searches for the word ref-
          erenced by the cursor.

     NNuummbbeerr iinnccrreemmeenntt
          The  ## command increments or decrements the number
          referenced by the cursor.

     PPrreevviioouuss ffiillee
          The pprreevviioouuss command edits the previous file  from
          the argument list.

     LLeefftt--rriigghhtt ssccrroolllliinngg
          The  lleeffttrriigghhtt  option causes nnvvii to do left-right
          screen scrolling, instead of  the  traditional  vvii
          line wrapping.










































NNvvii//NNeexx RReeffeerreennccee                                  UUSSDD::1133--8833


     1177..  IInnddeexx

     !       16, 34         @       20, 35         columns     47
     ""          34         A           20         comment     47
     #       16, 35         B           21         copy        37
     $           16         C           21         count   10, 33
     %           17         D           21         current pathname 8
     &       17, 43         E           21         d           26
     (           17         F           21         delete      37
     )           18         G           22         directory   48
     *           35         H           22         display     37
     +           13         I           22         e           26
     ,           18         J           22         edcompatible48
     /RE/        19         L           22         edit        37
     0           19         M           23         errorbells  48
     0<control-D>31         N           19         exrc        48
     :           19         O           23         extended    48
     ;           20         P           23         exusage     38
     <       20, 35         Q           23         f           26
     <control-A> 11         R           23         fg          38
     <control-B> 12         S           23         file    33, 38
     <control-1D2>, 31         T           24         flags       33
     <control-E> 12         U           24         flash       48
     <control-F> 12         W           24         global      38
     <control-G> 13         X           24         hardtabs    48
     <control-1H3>, 31         Y           24         help        38
     <control-J> 13         ZZ          24         i           27
     <control-L> 13         [[          25         ignorecase  48
     <control-M> 13         -           18         insert      39
     <control-N> 13         ]]          25         j           13
     <control-P> 14         ^           25         join        39
     <control-R> 13         ^<control-D>31         k       14, 40
     <control-1T4>, 31         _           25         keytime     48
     <control-U> 14         `<character>17         l           15
     <control-1W4>, 32         a           25         leftright   48
     <control-X> 32         abbrev      36         line        33
     <control-Y> 14         alternate pathname 8   lines       48
     <control-1Z4>, 43         altwerase   46         lisp        48
     <control-]> 15         append      36         list    39, 48
     <control-^> 15         args        36         m           27
     <end-of-file> 34       autoindent  46         magic       49
     <eof>       33         autoprint   47         map         39
     <erase>     31         autowrite   47         mark        40
     <escape>15, 31         b           26         matchtime   49
     <inter8r,up3t0>, 32         beautify    47         mesg        49
     <line erase>31         bg          36         mkexrc      40
     <literal next> 8, 31   bigword     11         modelines   49
     <nul>       31         buffer       8         motion      10
     <space>     15         c           26         move        40
     <word erase>32         cd          36         n           19
     =           35         cdpath      47         next        40
     >       20, 36         change      36         number  35, 49
     ?RE?        19         chdir       36         o           27










UUSSDD::1133--8844                                  NNvvii//NNeexx RReeffeerreennccee


     octal       49         tildeop     52
     open    40, 49         timeout     52
     optimize    49         ttywerase   52
     p           27         u           28
     paragraph   11         unabbrev    44
     paragraphs  49         undo        44
     preserve    40         unmap       44
     previous    40         unnamed buffer 9
     previous context 10    v           38
     print       41         verbose     52
     prompt      50         version     44
     put         41         visual      44
     quit        41         viusage     45
     r           27         w           28
     range       33         w1200       52
     read        41         w300        52
     readonly    50         w9600       52
     recdir      50         warn        52
     recover     41         window      52
     redraw      50         wn          45
     remap       50         word        11
     report      50         wq          45
     resize      41         wrapmargin  53
     rewind      42         wrapscan    53
     ruler       50         write       45
     s           28         writeany    53
     scroll      50         x           28
     section     11         xit         45
     sections    51         y           29
     sentence    11         yank        45
     set         42         z       29, 46
     shell   42, 51         {           29
     shiftwidth  51         |           29
     showdirty   51         }           30
     showmatch   51         ~       30, 43
     showmode    51
     sidescroll  51
     slowopen    51
     source      42
     sourceany   51
     split       42
     stop        43
     substitute  43
     suspend     43
     t       28, 37
     tabstop     51
     tag         43
     taglength   51
     tagpop      44
     tags        52
     tagtop      44
     term        52
     terse       52










UUSSDD::1133--22                                   NNvvii//NNeexx RReeffeerreennccee


                        TTaabbllee ooff CCoonntteennttss

     Description ......................................    3
     Startup Information ..............................    3
     Recovery .........................................    4
     Sizing the Screen ................................    8
     Character Display ................................    8
     Multiple Screens .................................    9
     Regular Expressions and Replacement Strings ......    9
     General Editor Description .......................   11
     Vi Description ...................................   13
     Vi Commands ......................................   18
     Vi Text Input Commands ...........................   46
     Ex Addressing ....................................   48
     Ex Description ...................................   50
     Ex Commands ......................................   51
     Set Options ......................................   69
     Additional Features in Nex/Nvi ...................   80
     Index ............................................   83








































