







                   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

                       June 30, 1996



                          _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.








Copyright (c) 1991, 1993, 1994
     The Regents  of  the  University  of  California.   All
Rights Reserved.

Copyright (c) 1994, 1995
     Keith Bostic.  All Rights Reserved.







































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-ori-
ented 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 next section,
entitled  "AAddddiittiioonnaall FFeeaattuurreess".  For the rest of this docu-
ment, nneexx/nnvvii is used only when it is necessary  to  distin-
guish it from the historic implementations 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
ftp.cs.berkeley.edu, in the directory ucb/4bsd.

22..  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 these 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 com-
     mand <<ccoonnttrrooll--XX>>  can  insert  any  possible  character
     value into the text.

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










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


     ffgg command foregrounds backgrounded screens.  The  ddiiss--
     ppllaayy  command  can  be  used  to  list  the  background
     screens.

CCoommmmaanndd EEddiittiinngg
     You can enter a normal editing window on the  collected
     commands  that  you've entered on the vvii colon command-
     line, and then modify and/or execute the commands.  See
     the cceeddiitt edit option for more information.

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.

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).

FFiillee NNaammee CCoommpplleettiioonn
     It is possible to do file name completion and file name
     displays when entering commands on the  vvii  colon  com-
     mand-line.   See the ffiilleecc option for more information.

IInnffiinniittee uunnddoo
     Changes made during an edit session may be rolled back-
     ward  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.

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.

MMeessssaaggee CCaattaallooggss
     It  is possible to display informational and error mes-
     sages in different languages by providing a catalog  of
     messages.   See  the  mmssggccaatt  option and the file cata-
     log/README ffoorr mmoorree iinnffoorrmmaattiioonn..

IInnccrreemmeennttiinngg nnuummbbeerrss
     The ## command increments or decrements the number  ref-
     erenced 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.

SSccrriippttiinngg llaanngguuaaggeess
     The ::ppee[[rrll]] ccmmdd, ::ppeerrlldd[[oo]] ccmmdd and ::ttcc[[ll]] ccmmdd  commands
     execute  Perl5  and  Tcl/Tk  commands, respectively, on
     lines from the edit buffer.  See  the  "SSccrriippttiinngg  LLaann--
     gguuaaggeess"  section  and  the  specific  commands for more










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


     information.

SSpplliitt ssccrreeeennss
     The EEddiitt, EExx, NNeexxtt, PPrreevviioouuss, TTaagg  and  VViissuuaall  (in  vvii
     mode)  commands divide the screen into multiple editing
     regions and then perform their normal function in a new
     screen  area.   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 command can be used
     to grow or shrink a particular screen.

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g--
     p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.

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 informa-
     tion  for all of the eexx and vvii commands by default, or,
     optionally, for a specific command or key.

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  refer-
     enced by the cursor.

33..  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  historical  imple-
mentations  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:










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


 (1)   The file /etc/vi.exrc is read, as long as it is owned
       by root or the effective user ID of the user.

 (2)   The  environmental  variable NEXINIT (or the variable
       EXINIT, if NEXINIT is not set) is interpreted.

 (3)   If neither NEXINIT or EXINIT was set,  and  the  HOME
       environmental  variable is set, the file $HOME/.nexrc
       (or the file $HOME/.exrc, if  $HOME/.nexrc  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.

       When  the  $HOME  directory  is  being  used for both
       nneexx/nnvvii and an historic implementation  of  eexx/vvii,  a
       possible solution is to put nneexx/nnvvii specific commands
       in the .nexrc ffiillee,, aalloonngg wwiitthh aa ::ssoouurrccee  $$HHOOMMEE//..eexxrrcc
       ccoommmmaanndd ttoo rreeaadd iinn tthhee ccoommmmaannddss ccoommmmoonn ttoo bbootthh iimmppllee--
       mmeennttaattiioonnss..

 (4)   If the eexxrrcc option was turned on by one of the previ-
       ous  startup information sources, the file .nexrc ((oorr
       tthhee ffiillee ..eexxrrcc, if .nexrc ddooeess nnoott eexxiisstt)) iiss rreeaadd,, aass
       lloonngg aass tthhee eeffffeeccttiivvee uusseerr IIDD ooff tthhee uusseerr iiss tthhee ssaammee
       aass tthhee oowwnneerr ooff tthhee ffiillee..

     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.

44..  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
/var/tmp/vi.recover bbyy ddeeffaauulltt)),, aanndd aarree nnaammeedd  ""vvii..XXXXXXXXXXXX"",,
wwhheerree  ""XXXXXXXXXXXX"" iiss aa nnuummbbeerr rreellaatteedd ttoo tthhee pprroocceessss IIDD..  WWhheenn
aa ffiillee iiss ffiirrsstt mmooddiiffiieedd,, aa sseeccoonndd rreeccoovveerryy ffiillee  ccoonnttaaiinniinngg
aann  eemmaaiill  mmeessssaaggee  ffoorr  tthhee  uusseerr  iiss ccrreeaatteedd,, aanndd iiss nnaammeedd
""rreeccoovveerr..XXXXXXXXXXXX"",, wwhheerree,, aaggaaiinn,, ""XXXXXXXXXXXX"" iiss aassssoocciiaatteedd  wwiitthh










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


tthhee pprroocceessss IIDD..  BBootthh ffiilleess aarree rreemmoovveedd aatt tthhee eenndd ooff aa nnoorr--
mmaall eeddiitt sseessssiioonn,, bbuutt wwiillll rreemmaaiinn iiff  tthhee  eeddiitt  sseessssiioonn  iiss
aabbnnoorrmmaallllyy  tteerrmmiinnaatteedd oorr tthhee uusseerr rruunnss tthhee eexx pprreesseerrvvee ccoomm--
mmaanndd..

     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 /tmp wwhhiicchh aarree cclleeaarreedd ooff tthheeiirr ccoonntteennttss
bbyy aa  ssyysstteemm  rreebboooott,,  oorr  //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 /var/tmp/vi.recover _n_a_m_e_d _"rreeccoovveerr..XXXXXXXXXXXX_" _s_h_o_u_l_d _b_e _s_e_n_t
_t_o _t_h_e_i_r _o_w_n_e_r_s_, _b_y _e_m_a_i_l_, _u_s_i_n_g _t_h_e --tt _o_p_t_i_o_n  _o_f  sseennddmmaaiill
_(_o_r  _a  _s_i_m_i_l_a_r  _m_e_c_h_a_n_i_s_m  _i_n  _o_t_h_e_r  _m_a_i_l_e_r_s_)_.   _I_f  eexx_/vvii
_r_e_c_e_i_v_e_s _a _h_a_n_g_u_p _(_S_I_G_H_U_P_) _s_i_g_n_a_l_, _o_r _t_h_e _u_s_e_r _e_x_e_c_u_t_e_s  _t_h_e
eexx  pprreesseerrvvee  _c_o_m_m_a_n_d_,  eexx_/vvii  _w_i_l_l  _a_u_t_o_m_a_t_i_c_a_l_l_y _e_m_a_i_l _t_h_e
_r_e_c_o_v_e_r_y _i_n_f_o_r_m_a_t_i_o_n _t_o _t_h_e _u_s_e_r_.

     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
nvi/common/recover.c wwiillll hhaavvee ttoo bbee mmooddiiffiieedd  ttoo  uussee  yyoouurr
llooccaall  mmaaiill  ddeelliivveerryy pprrooggrraammss..  NNoottee,, iiff nneexx//nnvvii iiss cchhaannggeedd
ttoo uussee aannootthheerr mmaaiilleerr,, iitt iiss iimmppoorrttaanntt ttoo rreemmeemmbbeerr tthhaatt  tthhee
oowwnneerr  ooff  tthhee ffiillee ggiivveenn ttoo tthhee mmaaiilleerr iiss tthhee nneexx//nnvvii uusseerr,,
ssoo nnootthhiinngg iinn tthhee ffiillee sshhoouulldd bbee ttrruusstteedd aass iitt mmaayy hhaavvee bbeeeenn
mmooddiiffiieedd iinn aann eeffffoorrtt ttoo ccoommpprroommiissee tthhee ssyysstteemm..

     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










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


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 /etc/rc.local (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
nvi/install/recover.script 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--99


    #    @(#)recover.script  8.7 (Berkeley) 8/16/94
    #
    # Script to recover nvi edit sessions.
    #
    RECDIR=/var/tmp/vi.recover
    SENDMAIL=/usr/lib/sendmail
    echo 'Recovering nvi editor sessions.'

    # Check editor backup files.
    vibackup=`echo $RECDIR/vi.*`
    if [ "$vibackup" != "$RECDIR/vi.*" ]; then
         for i in $vibackup; do
              # Only test files that are readable.
              if test ! -r $i; then
                   continue
              fi

              # Unmodified nvi editor backup files either have the
              # execute bit set or are zero length.  Delete them.
              if test -x $i -o ! -s $i; then
                   rm $i
              fi
         done
    fi

    # It is possible to get incomplete recovery files, if the editor crashes
    # at the right time.
    virecovery=`echo $RECDIR/recover.*`
    if [ "$virecovery" != "$RECDIR/recover.*" ]; then
         for i in $virecovery; do
              # Only test files that are readable.
              if test ! -r $i; then
                   continue
              fi

              # Delete any recovery files that are zero length, corrupted,
              # or that have no corresponding backup file.  Else send mail
              # to the user.
              recfile=`awk '/^X-vi-recover-path:/{print $2}' < $i`
              if test -n "$recfile" -a -s "$recfile"; then
                   $SENDMAIL -t < $i
              else
                   rm $i
              fi
         done
    fi



     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
RECDIR vvaalluuee iinn tthhee rreeccoovveerryy ssccrriipptt..











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


     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 /usr/lib/sendmail,, bbee  ssuurree
ttoo ssuubbssttiittuuttee tthhee ccoorrrreecctt ppaatthhnnaammee ffoorr tthhee 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.

55..  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  LINES  exists,  it  is
       used to specify the number of rows in the screen.

 (2)   If  the  environmental variable COLUMNS 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.

66..  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 \040, are displayed as
the string "^<character>_"_, _w_h_e_r_e _<_c_h_a_r_a_c_t_e_r_> is the  charac-
ter  that  is the original character's value offset from the
"@_" _c_h_a_r_a_c_t_e_r_.  _F_o_r _e_x_a_m_p_l_e_, _t_h_e  _o_c_t_a_l  _c_h_a_r_a_c_t_e_r  _\_0_0_1  _i_s
_d_i_s_p_l_a_y_e_d _a_s _"_^_A".  If _i_s_c_n_t_r_l(3) returns true for the octal
character \177, it is displayed as  the  string  "^?_"_.   _A_l_l
_o_t_h_e_r _c_h_a_r_a_c_t_e_r_s _a_r_e _d_i_s_p_l_a_y_e_d _a_s _e_i_t_h_e_r _h_e_x_a_d_e_c_i_m_a_l _v_a_l_u_e_s_,
_i_n _t_h_e _f_o_r_m _"_0_x_<_h_i_g_h_-_h_a_l_f_b_y_t_e_> _._._. _0_x_<_l_o_w_-_h_a_l_f_b_y_t_e_>", or  as
octal  values,  in  the  form  "\<high-one-or-two-bits>  ...
\<low-three-bits>_"_.  _T_h_e _d_i_s_p_l_a_y _o_f  _u_n_k_n_o_w_n  _c_h_a_r_a_c_t_e_r_s  _i_s
_b_a_s_e_d _o_n _t_h_e _v_a_l_u_e _o_f _t_h_e ooccttaall _o_p_t_i_o_n_.

     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--1111


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.

77..  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 EEddiitt, EExx, FFgg, NNeexxtt, PPrreevviioouuss, TTaagg and VViissuuaall (in vvii
mode) commands divide the current screen into two regions of
approximately equal size and then perform their usual action
in a new screen area.  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.

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

     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 moves the specified screen from
the list of backgrounded screens to the foreground.   If  no
file  argument is specified, the first screen on the list is
foregrounded.  By default, foregrounding consists  of  back-
grounding the current screen, and replacing its space in the
window with the foregrounded screen.

     Capitalizing the first letter of the command, i.e.  FFgg,
will  foreground  the  backgrounded  screen  in a new screen










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


instead of swapping it with the current screen.

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

88..  TTaaggss,, TTaagg SSttaacckkss,, aanndd CCssccooppee

     NNvvii supports the historic vvii tag  command  <<ccoonnttrrooll--]]>>,
and  the historic eexx tag command ttaagg.  These commands change
the current file context to a new location, based on  infor-
mation  found in the tags ffiilleess..  IIff yyoouu aarree uunnffaammiilliiaarr wwiitthh
tthheessee ccoommmmaannddss,, yyoouu sshhoouulldd rreevviieeww tthheeiirr ddeessccrriippttiioonn  iinn  tthhee
eexx  aanndd  vvii ccoommmmaannddss sseeccttiioonn ooff tthhiiss mmaannuuaall..  FFoorr aaddddiittiioonnaall
iinnffoorrmmaattiioonn oonn ttaaggss ffiilleess,, sseeee tthhee ddiissccuussssiioonn  ooff  tthhee  ttaaggss
eeddiitt ooppttiioonn aanndd tthhee ssyysstteemm _c_t_a_g_s((11)) mmaannuuaall ppaaggee..

     In  addition, nnvvii supports the notion of "tags stacks",
using the  <<ccoonnttrrooll--TT>>  command.   The  <<ccoonnttrrooll--TT>>  command
returns  the  user  to  the previous context, i.e., the last
place from which a <<ccoonnttrrooll--]]>> or ttaagg command  was  entered.
These  three  commands provide the basic functionality which
allows you to use vvii to review source code in  a  structured
manner.

     NNvvii  also  provides two other basic eexx commands for tag
support: ttaaggppoopp and ttaaggttoopp.  The ttaaggppoopp command is identical
to  the <<ccoonnttrrooll--TT>> command, with the additional functional-
ity that you may specify that modifications to  the  current
file  are  to  be  discarded.  This cannot be done using the
<<ccoonnttrrooll--TT>> command.  The ttaaggttoopp command discards all of the
contexts that have been pushed onto the tag stack, returning
to the context from which the first <<ccoonnttrrooll--]]>> or ttaagg  com-
mand was entered.

     The  historic _c_t_a_g_s(1) tags file format supports only a
single location per tag, normally the  function  declaration
or  structure  or  string  definition.   More  sophisticated
source code tools often provide multiple locations per  tag,
e.g.,  a  list of the places from which a function is called
or a string definition is used.  An example  of  this  func-
tionality is the System V source code tool, ccssccooppee.

CCssccooppee  creates  a  database  of  information on source code
files, and supports a query language for that information as
described  in  the  _c_s_c_o_p_e(1)  manual page.  NNvvii contains an
interface to the ccssccooppee query language which permits you  to
query  ccssccooppee  and  then sequentially step through the loca-
tions in the sources files which ccssccooppee returns.  There  are
two  nnvvii commands which support this ability to step through
multiple locations.  They are the eexx  commands  ttaaggnneexxtt  and
ttaaggpprreevv.  The ttaaggnneexxtt command moves to the next location for
the current tag.  The ttaaggpprreevv command moves to the  previous










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


location  for the current tag.  (See the ttaaggnneexxtt and ttaaggpprreevv
command discussion in the eexx commands section of this manual
for  more  information.)  At any time during this sequential
walk, you may use the <<ccoonnttrrooll--]]>>, ttaagg or ccssccooppee commands to
move  to  a new tag context, and then use the <<ccoonnttrrooll--TT>> or
ttaaggppoopp commands to return and continue stepping through  the
locations  for  this  tag.   This is similar to the previous
model of a simple tag stack, except that each entry  in  the
tag  stack  may  have  more than one file context that is of
interest.

     Although there is  no  widely  distributed  version  of
_c_t_a_g_s(1) that creates tags files with multiple locations per
tag, nnvvii has been written to understand the  obvious  exten-
sion  to  the  historic  tags file format, i.e., more than a
single line in the tags file with the same initial tag name.
If  you  wish  to  extend your ccttaaggss implementation or other
tool with which you build tags files, this extension  should
be simple and will require no changes to nnvvii.

     The  nnvvii  and  ccssccooppee  interface is based on the new eexx
command ccssccooppee, which has five subcommands: aadddd, ffiinndd, hheellpp,
kkiillll  and  rreesseett.  The subcommand ffiinndd itself has eight sub-
commands: cc, dd, ee, ff, gg, ii, ss and tt.

ccss[[ccooppee]] aa[[dddd]] ddiirreeccttoorryy
     The aadddd command attaches to the ccssccooppee database in  the
     specified  directory.   The  directory name is expanded
     using the  standard  filename  expansions.   After  nnvvii
     attaches  to  a  new  database,  all  subsequent ccssccooppee
     queries will be asked of that database.  The result  of
     any  single  query  is the collection of responses from
     all of the databases to the query.

     If the "CSCOPE_DIRS" environmental variable is set when
     nnvvii  is  run,  it is expected to be a <blank>-separated
     list of  directories  containing  ccssccooppee  databases  to
     which the user wishes to attach.

::ccss[[ccooppee]] ff[[iinndd]] cc||dd||ee||ff||gg||ii||ss||tt bbuuffffeerr||ppaatttteerrnn
     The  ffiinndd  command is the ccssccooppee query command for nnvvii.
     For this  command,  nnvvii  queries  all  attached  ccssccooppee
     databases for the pattern.  If the pattern is a double-
     quote character followed by a valid buffer name  (e.g.,
     "<character>)),,  tthheenn  tthhee  ccoonntteennttss ooff tthhee nnaammeedd bbuuffffeerr
     aarree uusseedd aass tthhee ppaatttteerrnn..  OOtthheerrwwiissee,, tthhee ppaatttteerrnn  iiss  aa
     RReegguullaarr EExxpprreessssiioonn..

     TThhee  ffiinndd  ccoommmmaanndd ppuusshheess tthhee ccuurrrreenntt llooccaattiioonn oonnttoo tthhee
     ttaaggss ssttaacckk,, aanndd sswwiittcchheess ttoo tthhee ffiirrsstt llooccaattiioonn  rreessuulltt--
     iinngg  ffrroomm tthhee qquueerryy,, iiff tthhee qquueerryy rreettuurrnneedd aatt lleeaasstt oonnee
     rreessuulltt..











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


     FFiillee nnaammeess rreettuurrnneedd bbyy tthhee ccssccooppee qquueerryy,, iiff  nnoott  aabbssoo--
     lluuttee  ppaatthhss,, aarree sseeaarrcchheedd ffoorr rreellaattiivvee ttoo tthhee ddiirreeccttoorryy
     wwhheerree tthhee ccssccooppee ddaattaabbaassee iiss llooccaatteedd..  IInn aaddddiittiioonn,,  iiff
     tthhee  ffiillee  ""ccssccooppee..ttppaatthh"" aappppeeaarrss iinn tthhee ssaammee ddiirreeccttoorryy
     aass tthhee ccssccooppee ddaattaabbaassee,, iitt iiss  eexxppeecctteedd  ttoo  ccoonnttaaiinn  aa
     ccoolloonn--sseeppaarraatteedd  lliisstt  ooff  ddiirreeccttoorryy  nnaammeess wwhheerree ffiilleess
     rreeffeerreenncceedd bbyy iittss aassssoocciiaatteedd  ccssccooppee  ddaattaabbaassee  mmaayy  bbee
     ffoouunndd..

     TThhee ffiinndd ssuubbccoommmmaanndd iiss oonnee ooff tthhee ffoolllloowwiinngg::

     c        Find callers of the name.
     d        Find all function calls made from name.
     e        Find pattern.
     f        Find files with name as substring.
     g        Find definition of name.
     i        Find files #including name.
     s        Find all uses of name.
     t        Find assignments to name.

::ccss[[ccooppee]] hh[[eellpp]] [[ccoommmmaanndd]]
     List the ccssccooppee commands, or optionally list usage help
     for any single ccssccooppee command.

::ddiissppllaayy cc[[oonnnneeccttiioonnss]]
     Display the list of ccssccooppee databases to  which  nnvvii  is
     currently connected.

::ccss[[ccooppee]] kk[[iillll]] ##
     Disconnect  from  a specific ccssccooppee database.  The con-
     nection number is the one displayed by the  eexx  ddiissppllaayy
     ccoonnnneeccttiioonnss command.

::ccss[[ccooppee]] rr[[eesseett]]
     Disconnect from all attached ccssccooppee databases.

     Cscope  is  not freely redistributable software, but is
fairly inexpensive and easily available.  To purchase a copy
of   ccssccooppee,   see   http://www.att.com/ssg/products/toolch-
est.html.

99..  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v commands, 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










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155


speaking, 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 "^_" _c_h_a_r_a_c_t_e_r _a_t _t_h_e _b_e_g_i_n_n_i_n_g
_o_f _a_n _R_E_, _a _"_$" character at the  end  of  an  RE,  and  the
escaping  character  "\_"_.   _T_h_e _c_h_a_r_a_c_t_e_r_s _"_.", "*_"_, _"_[" and
"~_" _a_r_e _t_r_e_a_t_e_d _a_s _o_r_d_i_n_a_r_y _c_h_a_r_a_c_t_e_r_s _u_n_l_e_s_s _p_r_e_c_e_d_e_d _b_y  _a
_"_\";  when preceded by a "\_" _t_h_e_y _r_e_g_a_i_n _t_h_e_i_r _s_p_e_c_i_a_l _m_e_a_n_-
_i_n_g_.

     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 "~_" _(_o_r
_"_\_~" 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.
"\("  and  "\)".   For example, "s/abc\(.*\)def/\1/" deletes
the strings "abc" and "def" from the matched pattern.

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










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


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

     In  vvii,  inserting  a  <control-M> iinnttoo tthhee rreeppllaacceemmeenntt
ssttrriinngg wwiillll ccaauussee tthhee mmaattcchheedd lliinnee  ttoo  bbee  sspplliitt  iinnttoo  ttwwoo
lliinneess aatt tthhaatt ppooiinntt..  ((TThhee <<ccoonnttrrooll--MM>> will be discarded.)

1100..  SSccrriippttiinngg LLaanngguuaaggeess

     The  nnvvii  editor  currently supports two scripting lan-
guages, Tcl/Tk and Perl5.  (Note  that  Perl4  isn't  suffi-
cient,  and  that  the Perl5 must be version 5.002 or later.
See the "BBuuiillddiinngg NNvvii" section for more information.

     The scripting language interface is still being  worked
on,  therefore  the following information is probably incom-
plete, probably wrong in cases, and likely to  change.   See
the  perl_api and tcl_api source directories for more infor-
mation.  As a quick reference, the following function  calls
are provided for both the Perl and Tcl interfaces.  The Perl
interface uses a slightly different naming convention,  e.g.
``viFindScreen'' is named ``VI:FindScreen''.

vviiFFiinnddSSccrreeeenn ffiillee
     Return the screenIdaassssoocciiaatteedd ffiillee.

vviiAAppppeennddLLiinnee ssccrreeeennIIdd lliinneeNNuummbbeerr tteexxtt
     Append text aass aa nneeww lliinnee aafftteerr lliinnee nnuummbbeerr lliinneeNNuummbbeerr,
     in the screen screenId..

vviiDDeellLLiinnee ssccrreeeennIIdd lliinneeNNuumm
     Delete the line lineNumber ffrroomm tthhee ssccrreeeenn ssccrreeeennIIdd.

vviiGGeettLLiinnee ssccrreeeennIIdd lliinneeNNuummbbeerr
     Return the line lineNumber ffrroomm tthhee ssccrreeeenn ssccrreeeennIIdd.

vviiIInnsseerrttLLiinnee ssccrreeeennIIdd lliinneeNNuummbbeerr tteexxtt
     Insert text aass aa nneeww lliinnee bbeeffoorree lliinnee nnuummbbeerr lliinneeNNuummbbeerr
     in the screen screenId..

vviiLLaassttLLiinnee ssccrreeeennIIdd
     Return  the  line number of the last line in the screen
     screenId..

vviiSSeettLLiinnee ssccrreeeennIIdd lliinneeNNuummbbeerr tteexxtt
     Change the line lineNumber iinn tthhee  ssccrreeeenn  ssccrreeeennIIdd  to
     match the specified text..

vviiGGeettMMaarrkk ssccrreeeennIIdd mmaarrkk
     Return  the  current  line and column for the specified
     mark ffrroomm tthhee ssccrreeeenn ssccrreeeennIIdd.












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177


vviiSSeettMMaarrkk ssccrreeeennIIdd mmaarrkk lliinnee ccoolluummnn
     Set the specified mark ttoo bbee aatt lliinnee lliinnee, column  col-
     umn,, iinn tthhee ssccrreeeenn ssccrreeeennIIdd.

vviiGGeettCCuurrssoorr ssccrreeeennIIdd
     Return  the  current  line and column for the cursor in
     the screen screenId..

vviiSSeettCCuurrssoorr ssccrreeeennIIdd lliinnee ccoolluummnn
     Set the cursor in the screen screenId ttoo tthhee  ssppeecciiffiieedd
     lliinnee and column..

vviiMMssgg ssccrreeeennIIdd tteexxtt
     Display  the  specified  text  aass  aa  vvii mmeessssaaggee iinn tthhee
     ssccrreeeenn ssccrreeeennIIdd.

vviiNNeewwSSccrreeeenn ssccrreeeennIIdd [[ffiillee]]
     Create a new screen.

vviiEEnnddSSccrreeeenn ssccrreeeennIIdd
     Exit the screen screenId..

vviiSSwwiittcchhSSccrreeeenn ssccrreeeennIIdd ssccrreeeennIIdd
     Switch from the screen screenId ttoo tthhee ssccrreeeenn ssccrreeeennIIdd.

vviiMMaappKKeeyy ssccrreeeennIIdd kkeeyy ttccllpprroocc
     Map the specified key iinn tthhee ssccrreeeenn ssccrreeeennIIdd to the Tcl
     procedure tclproc..

vviiUUnnmmMMaappKKeeyy ssccrreeeennIIdd kkeeyy
     Unmap the specified key iinn tthhee ssccrreeeenn ssccrreeeennIIdd

vviiGGeettOOpptt ssccrreeeennIIdd ooppttiioonn
     Return the value  of  the  specified  option  ffrroomm  tthhee
     ssccrreeeenn ssccrreeeennIIdd.

vviiSSeettOOpptt ssccrreeeennIIdd ccoommmmaanndd
     Set one or more options in the screen screenId..

1111..  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










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


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
(":""))  cchhaarraacctteerr..   TThheerree  aarree tthhrreeee ccoommmmaannddss tthhaatt sswwiittcchh eexx
iinnttoo tteexxtt iinnppuutt mmooddee:: aappppeenndd,, cchhaannggee aanndd  iinnsseerrtt..   OOnnccee  iinn
iinnppuutt  mmooddee,, eenntteerriinngg aa lliinnee ccoonnttaaiinniinngg oonnllyy aa ssiinnggllee ppeerriioodd
((""..""))  eennddss tteexxtt iinnppuutt mmooddee aanndd  rreettuurrnnss  ttoo  ccoommmmaanndd  mmooddee,,
wwhheerree tthhee pprroommpptt iiss rreeddiissppllaayyeedd..

     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 <escape> cchhaarraacctteerr eennddss  tteexxtt  iinnppuutt
mmooddee aanndd rreettuurrnnss ttoo ccoommmmaanndd mmooddee..

     EExx/vvii  present  three different interfaces to editing a
file.  EExx presents a line oriented interface.  VVii presents a
full  screen  display  oriented  interface,  also  known  as
"visual mode".  In addition, there is a  third  mode,  "open
mode",  which is line oriented, but supports cursor movement
and editing within the displayed line, similarly  to  visual
mode.  Open mode is not yet implemented in nnvvii.

     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 <control-C>,, wwhhaatteevveerr cchhaarraacc--
     tteerr iiss sseett ffoorr tthhee ccuurrrreenntt tteerrmmiinnaall iiss uusseedd..

<<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 <control-V>..  IIff tthhee tteerrmmiinnaall iiss nnoott  sseett
     uupp  ttoo  ddoo  XXOONN//XXOOFFFF  ffllooww ccoonnttrrooll,, tthheenn <<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 ("%"")) aappppeeaarrss iinn aa ffiillee nnaammee
     eenntteerreedd aass ppaarrtt  ooff  aann  eexx  ccoommmmaanndd  aarrgguummeenntt,,  iitt  iiss
     rreeppllaacceedd  bbyy  tthhee ccuurrrreenntt ppaatthhnnaammee..  ((TThhee ""%%"" cchhaarraacctteerr
     ccaann bbee eessccaappeedd bbyy pprreecceeddiinngg iitt wwiitthh aa bbaacckkssllaasshh..))










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199


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 ("#"")) aappppeeaarrss iinn aa ffiillee nnaammee eenntteerreedd aass
     ppaarrtt ooff aann eexx ccoommmmaanndd aarrgguummeenntt,, iitt iiss rreeppllaacceedd  bbyy  tthhee
     aalltteerrnnaattee  ppaatthhnnaammee..  ((TThhee ""##"" cchhaarraacctteerr ccaann bbee eessccaappeedd
     bbyy pprreecceeddiinngg iitt wwiitthh aa bbaacckkssllaasshh..))

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.   "<character>  iinn  vvii
     aanndd wwiitthhoouutt tthhee ddoouubbllee qquuoottee,, ee..gg..  <<cchhaarraacctteerr>>,, iinn eexx..
     ((TThhee  ddoouubbllee  qquuoottee  iissnn''tt  nneecceessssaarryy  ffoorr  eexx  bbeeccaauussee
     bbuuffffeerrss nnaammeess aarree ddeennootteedd bbyy tthheeiirr ppoossiittiioonn iinn tthhee ccoomm--
     mmaanndd lliinnee..))  HHiissttoorriicc iimmpplleemmeennttaattiioonnss ooff eexx//vvii  lliimmiitteedd
     <<cchhaarraacctteerr>>  ttoo  tthhee  aallpphhaannuummeerriicc  cchhaarraacctteerrss;; nneexx//nnvvii
     ppeerrmmiittss tthhee uussee ooff aannyy cchhaarraacctteerr wwiitthhoouutt aannootthheerr  mmeeaann--
     iinngg iinn tthhee ppoossiittiioonn wwhheerree aa bbuuffffeerr nnaammee iiss eexxppeecctteedd..

     BBuuffffeerrss  nnaammeedd  bbyy uuppppeerrccaassee cchhaarraacctteerrss aarree tthhee ssaammee aass
     bbuuffffeerrss nnaammeedd bbyy lloowweerrccaassee cchhaarraacctteerrss,, ee..gg.. tthhee  bbuuffffeerr
     nnaammeedd  bbyy  tthhee EEnngglliisshh cchhaarraacctteerr ""AA"" iiss tthhee ssaammee aass tthhee
     bbuuffffeerr nnaammeedd bbyy tthhee cchhaarraacctteerr ""aa"",, wwiitthh  tthhee  eexxcceeppttiioonn
     tthhaatt,, iiff tthhee bbuuffffeerr ccoonntteennttss aarree bbeeiinngg cchhaannggeedd ((aass wwiitthh
     aa tteexxtt ddeelleettiioonn oorr vvii  cchhaannggee  ccoommmmaanndd)),,  tthhee  tteexxtt  iiss
     _a_p_p_e_n_d_e_d  ttoo  tthhee bbuuffffeerr,, iinnsstteeaadd ooff rreeppllaacciinngg tthhee ccuurr--
     rreenntt ccoonntteennttss..

     TThhee  bbuuffffeerrss  nnaammeedd  bbyy  tthhee  nnuummeerriicc  cchhaarraacctteerrss   ((iinn
     EEnngglliisshh,, ""11_" _t_h_r_o_u_g_h _"_9"")),, aarree ssppeecciiaall..  IIff aa rreeggiioonn ooff
     tteexxtt iinncclluuddiinngg cchhaarraacctteerrss ffrroomm mmoorree tthhaann oonnee lliinnee,, oorr aa
     ssiinnggllee  lliinnee ooff tteexxtt ssppeecciiffiieedd bbyy uussiinngg aa lliinnee--oorriieenntteedd
     mmoottiioonn,, iiss cchhaannggeedd oorr ddeelleetteedd iinn tthhee ffiillee uussiinngg tthhee  vvii
     cchhaannggee oorr ddeelleettee ccoommmmaannddss,, aa ccooppyy ooff tthhee tteexxtt iiss ppllaacceedd
     iinnttoo tthhee nnuummeerriicc bbuuffffeerr ""11"",,  rreeggaarrddlleessss  ooff  tthhee  uusseerr
     ssppeecciiffyyiinngg  aannootthheerr  bbuuffffeerr  iinn  wwhhiicchh  ttoo ssaavvee iitt..  IInn
     aaddddiittiioonn,, tthheerree aarree aa ffeeww ccoommmmaannddss wwhhiicchh,, wwhheenn uusseedd  aass
     aa mmoottiioonn wwiitthh tthhee vvii cchhaannggee aanndd ddeelleettee ccoommmmaannddss,, _a_l_w_a_y_s
     ccooppyy tthhee ssppeecciiffiieedd rreeggiioonn  ooff  tteexxtt  iinnttoo  tthhee  nnuummeerriicc
     bbuuffffeerrss  rreeggaarrddlleessss  ooff tthhee rreeggiioonn iinncclluuddiinngg cchhaarraacctteerrss
     ffrroomm mmoorree tthhaann oonnee lliinnee..  TThheessee ccoommmmaannddss aarree::


      <<ccoonnttrrooll--AA>>   %%   ((   ))













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


     ``<<cchhaarraacctteerr>>   //   ??   NN
                nn   {{   }}


     Before this copy is  done,  the  previous  contents  of
     buffer  "1""  aarree mmoovveedd iinnttoo bbuuffffeerr ""22", "2"" iinnttoo bbuuffffeerr
     ""33", and so on.  The contents of buffer  "9""  aarree  ddiiss--
     ccaarrddeedd..   IInn vvii,, tteexxtt mmaayy bbee eexxpplliicciittllyy ssttoorreedd iinnttoo tthhee
     nnuummeerriicc bbuuffffeerrss..  IInn tthhiiss  ccaassee,,  tthhee  bbuuffffeerr  rroottaattiioonn
     ddeessccrriibbeedd  aabboovvee  ooccccuurrss  bbeeffoorree tthhee rreeppllaacceemmeenntt ooff tthhee
     bbuuffffeerr''ss ccoonntteennttss..  TThhee nnuummeerriicc bbuuffffeerrss aarree oonnllyy aavvaaiill--
     aabbllee  iinn  vviissuuaall aanndd ooppeenn mmooddeess,, aanndd aarree nnoott aacccceessssiibbllee
     bbyy eexx iinn aannyy wwaayy,, aalltthhoouugghh cchhaannggeedd aanndd ddeelleetteedd tteexxtt  iiss
     ssttiillll ssttoorreedd tthheerree wwhhiillee iinn eexx mmooddee..

     WWhheenn  aa vvii ccoommmmaanndd ssyynnooppssiiss sshhoowwss bbootthh aa [[bbuuffffeerr]] aanndd aa
     [[ccoouunntt]],, tthheeyy mmaayy bbee pprreesseenntteedd iinn aannyy oorrddeerr..

     FFiinnaallllyy,, aallll bbuuffffeerrss aarree eeiitthheerr ""lliinnee""  oorr  ""cchhaarraacctteerr""
     oorriieenntteedd..   AAllll  eexx  ccoommmmaannddss  wwhhiicchh  ssttoorree  tteexxtt  iinnttoo
     bbuuffffeerrss aarree lliinnee  oorriieenntteedd..   SSoommee  vvii  ccoommmmaannddss  wwhhiicchh
     ssttoorree tteexxtt iinnttoo bbuuffffeerrss aarree lliinnee oorriieenntteedd,, aanndd ssoommee aarree
     cchhaarraacctteerr oorriieenntteedd;; tthhee ddeessccrriippttiioonn ffoorr eeaacchh aapppplliiccaabbllee
     vvii ccoommmmaanndd nnootteess wwhheetthheerr tteexxtt ccooppiieedd iinnttoo bbuuffffeerrss uussiinngg
     tthhee ccoommmmaanndd iiss lliinnee oorr cchhaarraacctteerr  oorriieenntteedd..   IInn  aaddddii--
     ttiioonn,,  tthhee vvii ccoommmmaanndd ddiissppllaayy bbuuffffeerrss ddiissppllaayyss tthhee ccuurr--
     rreenntt oorriieennttaattiioonn ffoorr eeaacchh bbuuffffeerr..  GGeenneerraallllyy,, tthhee  oonnllyy
     iimmppoorrttaannccee  aattttaacchheedd ttoo tthhiiss oorriieennttaattiioonn iiss tthhaatt iiff tthhee
     bbuuffffeerr iiss ssuubbsseeqquueennttllyy iinnsseerrtteedd  iinnttoo  tthhee  tteexxtt,,  lliinnee
     oorriieenntteedd bbuuffffeerrss ccrreeaattee nneeww lliinneess ffoorr eeaacchh ooff tthhee lliinneess
     tthheeyy ccoonnttaaiinn,, aanndd cchhaarraacctteerr oorriieenntteedd bbuuffffeerrss ccrreeaattee nneeww
     lliinneess ffoorr aannyy lliinneess _o_t_h_e_r tthhaann tthhee ffiirrsstt aanndd llaasstt lliinneess
     tthheeyy ccoonnttaaiinn..  TThhee ffiirrsstt aanndd llaasstt  lliinneess  aarree  iinnsseerrtteedd
     iinnttoo  tthhee tteexxtt aatt tthhee ccuurrrreenntt ccuurrssoorr ppoossiittiioonn,, bbeeccoommiinngg
     ppaarrtt ooff tthhee ccuurrrreenntt lliinnee..  IIff tthheerree iiss  mmoorree  tthhaann  oonnee
     lliinnee  iinn  tthhee  bbuuffffeerr,, hhoowweevveerr,, tthhee ccuurrrreenntt lliinnee iittsseellff
     wwiillll bbee sspplliitt..

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  use  or operate on a buffer when no
     buffer is specified by the user.  If the command stores
     text into a buffer, the text is stored into the unnamed
     buffer even if a buffer is also specified by the  user.
     It  is  not  possible  to  append  text  to the unnamed
     buffer.  If text is appended to  a  named  buffer,  the
     named  buffer contains both the old and new text, while
     the unnamed buffer contains only the new  text.   There
     is no way to explicitly reference the unnamed buffer.

     Historically,  the  contents of the unnamed buffer were
     discarded by many different commands,  even  ones  that











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--2211


     didn't  store text into it.  NNeexx/nnvvii never discards the
     contents of the unnamed buffer until new text  replaces
     them.

wwhhiitteessppaaccee
     The characters <tab> and <space>.

<<ccaarrrriiaaggee--rreettuurrnn>>
     The  character  represented  by  an  ASCII <control-M>..
     TThhiiss cchhaarraacctteerr iiss aallmmoosstt aallwwaayyss ttrreeaatteedd iiddeennttiiccaallllyy  ttoo
     aa  <<nneewwlliinnee>>  character,  but differs in that it can be
     escaped into the file text or into a command.

<<nneewwlliinnee>>
     The character  represented  by  an  ASCII  <control-J>..
     TThhiiss  cchhaarraacctteerr iiss aallmmoosstt aallwwaayyss ttrreeaatteedd iiddeennttiiccaallllyy ttoo
     aa <<ccoonnttrrooll--MM>> character, but differs in that it  cannot
     be escaped into the file text or into a command.

1122..  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 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  ("@""))  cchhaarraacctteerrss..
TThheessee  wweerree  lliinneess  tthhaatt  wweerree nnoott ccoorrrreeccttllyy ddiissppllaayyeedd,, ii..ee..
lliinneess oonn tthhee ssccrreeeenn tthhaatt ddiidd nnoott ccoorrrreessppoonndd ttoo lliinneess iinn  tthhee
ffiillee,,  oorr lliinneess tthhaatt ddiidd nnoott ffiitt oonn tthhee ccuurrrreenntt ssccrreeeenn..  NNvvii
nneevveerr ddiissppllaayyss lliinneess iinn tthhiiss ffaasshhiioonn..

     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 <escape> cchhaarraacctteerr iiss uusseedd ttoo
rreessoollvvee tthhee tteexxtt iinnppuutt iinnttoo tthhee ffiillee,,  aanndd  eexxiitt  bbaacckk  iinnttoo
ccoommmmaanndd  mmooddee..   IInn  vvii  ccoommmmaanndd  mmooddee,, tthhee ccuurrssoorr iiss aallwwaayyss
ppoossiittiioonneedd oonn tthhee llaasstt ccoolluummnn ooff cchhaarraacctteerrss  wwhhiicchh  ttaakkee  uupp
mmoorree tthhaann oonnee ccoolluummnn oonn tthhee ssccrreeeenn..  IInn vvii tteexxtt iinnsseerrtt mmooddee,,
tthhee ccuurrssoorr iiss ppoossiittiioonneedd oonn tthhee ffiirrsstt ccoolluummnn  ooff  cchhaarraacctteerrss
wwhhiicchh ttaakkee uupp mmoorree tthhaann oonnee ccoolluummnn oonn tthhee ssccrreeeenn..











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))


     When  positioning  the cursor to a new line and column,
the type of movement is defined by the distance to  the  new
cursor  position.   If the new position is close, the screen
is scrolled to the new location.  If the new position is far
away, the screen is repainted so that the new position is on
the screen.  If the screen is scrolled, it is moved a  mini-
mal  amount,  and the cursor line will usually appear at the
top or bottom of the screen.  If 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 isn't 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
(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
commands 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
alter  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 latter means
that the cursor is moved to the cursor position that is hor-
izontally  as  close as possible to the current cursor posi-
tion.  If the current line is shorter than the cursor  posi-
tion  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.










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


     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.

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:


     <control-A>    <control-H>   <control-J>   <control-M>
     <control-N>    <control-P>       <space>             $
               %   '<character>             (             )
               +              ,             -             /
               0              ;             ?             B
               E              F             G             H
               L              M             N             T
               W             [[            ]]             ^
               _   `<character>             b             e













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))


               f              h             j             k
               l              n             t             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
     "c2w_" _a_n_d _"_2_c_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 "4cw"" aanndd ""22cc22ww" are
     equivalent, and the region affected by the cc command is
     four words of text.

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  [buffer]  aanndd
     [[ccoouunntt]], they may be presented in any order.

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, and the begin-
     ning or end of the file.  Second, a sequence of charac-
     ters   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, and the beginning or end of
     the  file.   For  example, the characters " !@#abc$%^ ""
     ccoonnttaaiinn tthhrreeee wwoorrddss:: ""!!@@##", "abc"" aanndd ""$$%%^^".

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

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.  For example, the characters "
     !@#abc$%^ "" ccoonnttaaiinn oonnee bbiiggwwoorrdd:: ""!!@@##aabbcc$$%%^^".











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


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

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hss 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
     ("{"")) aanndd ccoonnttiinnuueess uunnttiill tthhee nneexxtt sseeccttiioonn oorr  tthhee  eenndd
     ooff tthhee ffiillee..

     AAddddiittiioonnaall  sseeccttiioonn bboouunnddaarriieess ccaann bbee ddeeffiinneedd uussiinngg tthhee
     sseeccttiioonnss ooppttiioonn..

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 period
     (".""))  eexxccllaammaattiioonn ppooiinntt ((""!!")  or question mark  ("?""))
     cchhaarraacctteerr,,  ffoolllloowweedd  bbyy  eeiitthheerr  aann eenndd--ooff--lliinnee oorr ttwwoo
     wwhhiitteessppaaccee cchhaarraacctteerrss..  AAnnyy nnuummbbeerr ooff cclloossiinngg ppaarreenntthhee--
     sseess ((""))"), brackets ("]"")),, ddoouubbllee--qquuoottee ((""""") or single
     quote ("'"")) cchhaarraacctteerrss ccaann aappppeeaarr bbeettwweeeenn  tthhee  ppeerriioodd,,
     eexxccllaammaattiioonn  ppooiinntt,, oorr qquueessttiioonn mmaarrkk aanndd tthhee wwhhiitteessppaaccee
     cchhaarraacctteerrss oorr eenndd--ooff--lliinnee..

     GGrroouuppss ooff eemmppttyy lliinneess ((oorr lliinneess ccoonnttaaiinniinngg oonnllyy wwhhiitteess--
     ppaaccee cchhaarraacctteerrss)) aarree ttrreeaatteedd aass aa ssiinnggllee sseenntteennccee..

1133..  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  count ttiimmeess ffoorr tthhee ccuurrrreenntt wwoorrdd..  TThhee
     ccuurrrreenntt wwoorrdd bbeeggiinnss aatt tthhee ffiirrsstt nnoonn--wwhhiitteessppaaccee cchhaarraacc--
     tteerr  oonn  oorr  aafftteerr  tthhee  ccuurrrreenntt  ccuurrssoorr  ppoossiittiioonn,, aanndd
     eexxtteennddss uupp ttoo tthhee nneexxtt nnoonn--wwoorrdd cchhaarraacctteerr oorr tthhee eenndd ooff










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))


     tthhee lliinnee..  TThhee sseeaarrcchh iiss lliitteerraall,, ii..ee.. nnoo cchhaarraacctteerrss iinn
     tthhee wwoorrdd hhaavvee aannyy ssppeecciiaall mmeeaanniinngg iinn tteerrmmss  ooff  RReegguullaarr
     EExxpprreessssiioonnss..   IItt iiss aann eerrrroorr iiff nnoo mmaattcchhiinngg ppaatttteerrnn iiss
     ffoouunndd bbeettwweeeenn tthhee ssttaarrttiinngg ppoossiittiioonn aanndd tthhee eenndd ooff  tthhee
     ffiillee..

     TThhee  <<ccoonnttrrooll--AA>>  ccoommmmaanndd iiss aann aabbssoolluuttee mmoovveemmeenntt..  TThhee
     <<ccoonnttrrooll--AA>> ccoommmmaanndd mmaayy bbee uusseedd aass tthhee mmoottiioonn ccoommppoonneenntt
     ooff  ootthheerr  vvii  ccoommmmaannddss,,  iinn wwhhiicchh ccaassee aannyy tteexxtt ccooppiieedd
     iinnttoo aa bbuuffffeerr iiss cchhaarraacctteerr oorriieenntteedd..

     Line:    Set to the line where the word is found.
     Column:  Set to the first character of the word.
     Options: Affected  by  the  iiggnnoorreeccaassee   and   wwrraappssccaann
              options.

[[ccoouunntt]] <<ccoonnttrrooll--BB>>
     Page  backward count ssccrreeeennss..  TTwwoo lliinneess ooff oovveerrllaapp aarree
     mmaaiinnttaaiinneedd,,  iiff  ppoossssiibbllee,,  bbyy  ddiissppllaayyiinngg  tthhee  wwiinnddooww
     ssttaarrttiinngg  aatt lliinnee ((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 window_size iiss tthhee vvaalluuee ooff  tthhee  wwiinnddooww  ooppttiioonn..
     ((IInn  tthhee  ccaassee ooff sspplliitt ssccrreeeennss,, tthhiiss ssiizzee iiss ccoorrrreecctteedd
     ttoo tthhee ccuurrrreenntt ssccrreeeenn ssiizzee..))  IItt iiss  aann  eerrrroorr  iiff  tthhee
     mmoovveemmeenntt iiss ppaasstt tthhee bbeeggiinnnniinngg ooff tthhee ffiillee..

     Line:    Set  to the last line of text displayed on the
              screen.
     Column:  Set to the first  nonblank  character  of  the
              line.
     Options: Affected by the wwiinnddooww option.

[[ccoouunntt]] <<ccoonnttrrooll--DD>>
     Scroll forward count lliinneess..  IIff 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.)
     It is an error if the movement is past the end  of  the
     file.

     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  count lliinneess,, lleeaavviinngg tthhee ccuurrssoorr oonn tthhee
     ccuurrrreenntt lliinnee aanndd ccoolluummnn,, iiff ppoossssiibbllee..  IItt iiss  aann  eerrrroorr
     iiff tthhee mmoovveemmeenntt iiss ppaasstt tthhee eenndd ooff tthhee ffiillee..











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


     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  count ssccrreeeennss..  TTwwoo lliinneess ooff oovveerrllaapp aarree
     mmaaiinnttaaiinneedd,,  iiff  ppoossssiibbllee,,  bbyy  ddiissppllaayyiinngg  tthhee  wwiinnddooww
     ssttaarrttiinngg  aatt  lliinnee  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 window_size iiss tthhee vvaalluuee ooff  tthhee  wwiinnddooww  ooppttiioonn..
     ((IInn  tthhee  ccaassee ooff sspplliitt ssccrreeeennss,, tthhiiss ssiizzee iiss ccoorrrreecctteedd
     ttoo tthhee ccuurrrreenntt ssccrreeeenn ssiizzee..))  IItt iiss  aann  eerrrroorr  iiff  tthhee
     mmoovveemmeenntt iiss ppaasstt tthhee eenndd ooff tthhee ffiillee..

     Line:    Set to the first line on the screen.
     Column:  Set  to  the  first  nonblank character of the
              current line.
     Options: Affected by the wwiinnddooww option.

<<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ouunntt]] <<ccoonnttrrooll--HH>>
[[ccoouunntt]] hh
     Move the cursor back count cchhaarraacctteerrss  iinn  tthhee  ccuurrrreenntt
     lliinnee..   IItt  iiss  aann  eerrrroorr iiff tthhee ccuurrssoorr iiss oonn tthhee ffiirrsstt
     cchhaarraacctteerr iinn tthhee lliinnee..

     TThhee <<ccoonnttrrooll--HH>> aanndd hh  ccoommmmaannddss  mmaayy  bbee  uusseedd  aass  tthhee
     mmoottiioonn  ccoommppoonneenntt  ooff  ootthheerr vvii ccoommmmaannddss,, iinn wwhhiicchh ccaassee
     aannyy tteexxtt ccooppiieedd iinnttoo aa bbuuffffeerr iiss cchhaarraacctteerr oorriieenntteedd..

     Line:    Unchanged.
     Column:  Set to the current - count character, or,  the
              first  character  in  the  line  if  count  is
              greater than or equal to the number of charac-
              ters in the line before the cursor.
     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]] <<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 count lliinneess wwiitthhoouutt cchhaannggiinngg tthhee
     ccuurrrreenntt ccoolluummnn..  IItt iiss aann eerrrroorr iiff tthhee mmoovveemmeenntt iiss ppaasstt
     tthhee eenndd ooff tthhee ffiillee..

     TThhee <<ccoonnttrrooll--JJ>>,, <<ccoonnttrrooll--NN>> aanndd jj ccoommmmaannddss mmaayy bbee uusseedd
     aass tthhee mmoottiioonn ccoommppoonneenntt ooff ootthheerr vvii ccoommmmaannddss,, iinn  wwhhiicchh
     ccaassee aannyy tteexxtt ccooppiieedd iinnttoo aa bbuuffffeerr iiss lliinnee oorriieenntteedd..

     Line:    Set to the current line plus count..
     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.

     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 count lliinneess ttoo tthhee ffiirrsstt nnoonnbbllaannkk
     cchhaarraacctteerr ooff tthhaatt lliinnee..  IItt iiss aann eerrrroorr iiff tthhee mmoovveemmeenntt
     iiss ppaasstt tthhee eenndd ooff tthhee ffiillee..

     TThhee  <<ccoonnttrrooll--MM>>  aanndd  ++  ccoommmmaannddss  mmaayy  bbee uusseedd aass tthhee
     mmoottiioonn ccoommppoonneenntt ooff ootthheerr vvii ccoommmmaannddss,,  iinn  wwhhiicchh  ccaassee
     aannyy tteexxtt ccooppiieedd iinnttoo aa bbuuffffeerr iiss lliinnee oorriieenntteedd..

     Line:    Set to the current line plus count..
     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 count lliinneess,,  wwiitthhoouutt  cchhaannggiinngg  tthhee
     ccuurrrreenntt ccoolluummnn..  IItt iiss aann eerrrroorr iiff tthhee mmoovveemmeenntt iiss ppaasstt
     tthhee bbeeggiinnnniinngg ooff tthhee ffiillee..

     TThhee <<ccoonnttrrooll--PP>> aanndd kk  ccoommmmaannddss  mmaayy  bbee  uusseedd  aass  tthhee
     mmoottiioonn  ccoommppoonneenntt  ooff  ootthheerr vvii ccoommmmaannddss,, iinn wwhhiicchh ccaassee
     aannyy tteexxtt ccooppiieedd iinnttoo aa bbuuffffeerr iiss lliinnee oorriieenntteedd..

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












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


<<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ouunntt]] <<ccoonnttrrooll--UU>>
     Scroll  backward  count  lliinneess..  IIff 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.)
     It is an error if the movement is past the beginning of
     the file.

     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ouunntt]] <<ccoonnttrrooll--YY>>
     Scroll  backward  count lliinneess,, lleeaavviinngg tthhee ccuurrrreenntt lliinnee
     aanndd ccoolluummnn aass iiss,, iiff ppoossssiibbllee..  IItt iiss aann eerrrroorr  iiff  tthhee
     mmoovveemmeenntt iiss ppaasstt tthhee bbeeggiinnnniinngg ooff tthhee ffiillee..

     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










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))


     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.  "[0-9]*"",, oorr ""[[00--99]]**[[!!<<>>ccddyy]]", the  com-
     mand 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.
     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.










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


     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 count cchhaarraacctteerrss wwiitthhoouutt cchhaanngg--
     iinngg tthhee ccuurrrreenntt lliinnee..  IItt iiss aann eerrrroorr iiff tthhee ccuurrssoorr  iiss
     oonn tthhee llaasstt cchhaarraacctteerr iinn tthhee lliinnee..

     TThhee  <<ssppaaccee>>  aanndd  ll ccoommmmaannddss mmaayy bbee uusseedd aass tthhee mmoottiioonn
     ccoommppoonneenntt ooff ootthheerr vvii ccoommmmaannddss,, iinn wwhhiicchh ccaassee aannyy  tteexxtt
     ccooppiieedd  iinnttoo  aa bbuuffffeerr iiss cchhaarraacctteerr oorriieenntteedd..  IInn aaddddii--
     ttiioonn,, tthheessee ccoommmmaannddss mmaayy bbee uusseedd aass tthhee  mmoottiioonn  ccoommppoo--
     nneennttss  ooff ootthheerr ccoommmmaannddss wwhheenn tthhee ccuurrssoorr iiss oonn tthhee llaasstt
     cchhaarraacctteerr iinn tthhee lliinnee,, wwiitthhoouutt eerrrroorr..

     Line:    Unchanged.
     Column:  Set to the current  character  plus  the  next
              count  characters, or to the last character on
              the line if count 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))<<ccaarrrriiaaggee--rreettuurrnn>>
     Replace text with results from a shell  command.   Pass
     the  lines  specified by the count aanndd 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,  "%""  aanndd  ""##" characters are
     expanded  to  the  current  and  alternate   pathnames,
     respectively.   The "!""  cchhaarraacctteerr iiss eexxppaannddeedd wwiitthh tthhee
     ccoommmmaanndd tteexxtt  ooff  tthhee  pprreevviioouuss  !!   oorr  ::!!   ccoommmmaannddss..
     ((TThheerreeffoorree,,  tthhee ccoommmmaanndd !!<<mmoottiioonn>>!!  rreeppeeaattss tthhee pprreevvii--
     oouuss !!  ccoommmmaanndd..))  TThhee ssppeecciiaall mmeeaanniinnggss ooff ""%%"",, ""##""  aanndd
     ""!!""   ccaann  bbee  oovveerrrriiddddeenn bbyy eessccaappiinngg tthheemm wwiitthh aa bbaacckk--
     ssllaasshh..  IIff nnoo !!  oorr ::!!  ccoommmmaanndd hhaass yyeett bbeeeenn  eexxeeccuutteedd,,
     iitt  iiss aann eerrrroorr ttoo uussee aann uunneessccaappeedd ""!!""  cchhaarraacctteerr aass aa
     sshheellll aarrgguummeenntt..  TThhee  !!   ccoommmmaanndd  ddooeess  _n_o_t  ddoo  sshheellll
     eexxppaannssiioonn oonn tthhee ssttrriinnggss pprroovviiddeedd aass aarrgguummeennttss..  IIff aannyy
     ooff tthhee aabboovvee eexxppaannssiioonnss cchhaannggee tthhee aarrgguummeennttss  tthhee  uusseerr
     eenntteerreedd,,  tthhee  ccoommmmaanndd  iiss rreeddiissppllaayyeedd aatt tthhee bboottttoomm ooff
     tthhee ssccrreeeenn..

     VVii tthheenn eexxeeccuutteess tthhee pprrooggrraamm nnaammeedd bbyy tthhee sshheellll ooppttiioonn,,










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))


     wwiitthh  aa  --cc  ffllaagg  ffoolllloowweedd bbyy tthhee aarrgguummeennttss ((wwhhiicchh aarree
     bbuunnddlleedd iinnttoo aa ssiinnggllee aarrgguummeenntt))..

     TThhee !!  ccoommmmaanndd iiss ppeerrmmiitttteedd iinn aann eemmppttyy ffiillee..

     IIff tthhee ffiillee hhaass bbeeeenn mmooddiiffiieedd ssiinnccee iitt  wwaass  llaasstt  ccoomm--
     pplleetteellyy wwrriitttteenn,, tthhee !!  ccoommmmaanndd wwiillll wwaarrnn yyoouu..

     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  number referenced by the
     cursor.  If the trailing character is a  +  oorr  ##,  the
     number  is incremented by count..  IIff tthhee ttrraaiilliinngg cchhaarr--
     aacctteerr iiss aa --, the number is decremented by count..

     AA lleeaaddiinngg ""00XX" or "0x"" ccaauusseess tthhee nnuummbbeerr ttoo  bbee  iinntteerr--
     pprreetteedd  aass  aa hheexxaaddeecciimmaall nnuummbbeerr..  OOtthheerrwwiissee,, aa lleeaaddiinngg
     ""00" causes the number to be  interpreted  as  an  octal
     number,  unless  a  non-octal digit is found as part of
     the number.  Otherwise, the number is interpreted as  a
     decimal  number,  and  may  have a leading + oorr -- sign.
     The current number begins at the first non-blank  char-
     acter  at  or  after  the  current cursor position, and
     extends up to the end of the line or the first  charac-
     ter  that  isn't  a  possible character for the numeric
     type.  The format of  the  number  (e.g.  leading  0's,
     signs)  is retained unless the new value cannot be rep-
     resented in the previous format.

     Octal and hexadecimal numbers, and the  result  of  the
     operation,  must  fit  into  an "unsigned long""..  SSiimmii--
     llaarrllyy,, ddeecciimmaall nnuummbbeerrss aanndd tthheeiirr rreessuulltt mmuusstt ffiitt iinnttoo aa
     ""ssiiggnneedd lloonngg".  It is an error to use this command when
     the cursor is not positioned at a number.


     Line:    Unchanged.
     Column:  Set to the first character in the cursor  num-
              ber.
     Options: None.

[[ccoouunntt]] $$
     Move  the  cursor  to  the  end of a line.  If count iiss
     ssppeecciiffiieedd,, tthhee ccuurrssoorr mmoovveess ddoowwnn 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










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


     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 count 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 count ssppeecciiffiieedd ttoo tthhee %% ccoommmmaanndd wwaass
     iiggnnoorreedd..

     TThhee %% ccoommmmaanndd iiss aann aabbssoolluuttee mmoovveemmeenntt..  TThhee  %%  ccoommmmaanndd
     mmaayy  bbee  uusseedd  aass tthhee mmoottiioonn ccoommppoonneenntt ooff ootthheerr vvii ccoomm--
     mmaannddss,, iinn wwhhiicchh ccaassee aannyy tteexxtt ccooppiieedd iinnttoo aa  bbuuffffeerr  iiss
     cchhaarraacctteerr  oorriieenntteedd,,  uunnlleessss  tthhee ssttaarrttiinngg ppooiinntt ooff tthhee
     rreeggiioonn iiss aatt oorr bbeeffoorree tthhee ffiirrsstt nnoonnbbllaannkk cchhaarraacctteerr  oonn
     iittss  lliinnee,, aanndd tthhee eennddiinngg ppooiinntt iiss aatt oorr aafftteerr tthhee llaasstt
     nnoonnbbllaannkk cchhaarraacctteerr oonn iittss lliinnee,, iinn  wwhhiicchh  ccaassee  iitt  iiss
     lliinnee oorriieenntteedd..

     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 count ssppeecciiffiieedd ttoo tthhee && ccoommmmaanndd wwaass
     iiggnnoorreedd..

     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










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))


     <character>..  IIff <<cchhaarraacctteerr>> is the "'"" oorr ""``"  charac-
     ter, return to the previous context.  If <character> iiss
     aannyy ootthheerr cchhaarraacctteerr,, rreettuurrnn ttoo tthhee  ccoonntteexxtt  mmaarrkkeedd  bbyy
     tthhaatt  cchhaarraacctteerr  ((sseeee  tthhee  mm ccoommmmaanndd ffoorr mmoorree iinnffoorrmmaa--
     ttiioonn))..  IIff tthhee ccoommmmaanndd iiss tthhee '' ccoommmmaanndd,, oonnllyy tthhee  lliinnee
     vvaalluuee  iiss  rreessttoorreedd,,  aanndd  tthhee  ccuurrssoorr iiss ppllaacceedd oonn tthhee
     ffiirrsstt nnoonnbbllaannkk cchhaarraacctteerr ooff tthhaatt lliinnee..  IIff tthhee  ccoommmmaanndd
     iiss  tthhee  `` ccoommmmaanndd,, bbootthh tthhee lliinnee aanndd ccoolluummnn vvaalluueess aarree
     rreessttoorreedd..

     IItt iiss aann eerrrroorr iiff tthhee ccoonntteexxtt nnoo lloonnggeerr eexxiissttss  bbeeccaauussee
     ooff  lliinnee  ddeelleettiioonn..   ((CCoonntteexxttss  ffoollllooww  lliinneess tthhaatt aarree
     mmoovveedd,, oorr wwhhiicchh aarree ddeelleetteedd aanndd tthheenn rreessttoorreedd..))

     TThhee '' aanndd `` ccoommmmaannddss aarree bbootthh aabbssoolluuttee mmoovveemmeennttss..  TThheeyy
     mmaayy  bbee  uusseedd  aass  aa mmoottiioonn ccoommppoonneenntt ffoorr ootthheerr vvii ccoomm--
     mmaannddss..  FFoorr tthhee ''  ccoommmmaanndd,,  aannyy  tteexxtt  ccooppiieedd  iinnttoo  aa
     bbuuffffeerr  iiss  lliinnee oorriieenntteedd..  FFoorr tthhee `` ccoommmmaanndd,, aannyy tteexxtt
     ccooppiieedd iinnttoo aa bbuuffffeerr iiss cchhaarraacctteerr oorriieenntteedd,,  uunnlleessss  iitt
     bbootthh  ssttaarrttss  aanndd  ssttooppss  aatt tthhee ffiirrsstt cchhaarraacctteerr iinn tthhee
     lliinnee,, iinn wwhhiicchh ccaassee iitt iiss lliinnee oorriieenntteedd..  IInn  aaddddiittiioonn,,
     wwhheenn  uussiinngg  tthhee  `` ccoommmmaanndd aass aa mmoottiioonn ccoommppoonneenntt,, ccoomm--
     mmaannddss wwhhiicchh mmoovvee bbaacckkwwaarrdd  aanndd  ssttaarrtteedd  aatt  tthhee  ffiirrsstt
     cchhaarraacctteerr iinn tthhee lliinnee,, oorr mmoovvee ffoorrwwaarrdd aanndd eennddeedd aatt tthhee
     ffiirrsstt cchhaarraacctteerr iinn tthhee lliinnee,, aarree ccoorrrreecctteedd ttoo tthhee  llaasstt
     cchhaarraacctteerr ooff tthhee lliinnee pprreecceeddiinngg tthhee ssttaarrttiinngg aanndd eennddiinngg
     lliinneess,, rreessppeeccttiivveellyy..

     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.
     Options: None.

[[ccoouunntt]] ((
     Back up count sseenntteenncceess..

     TThhee (( ccoommmmaanndd iiss aann aabbssoolluuttee mmoovveemmeenntt..  TThhee  ((  ccoommmmaanndd
     mmaayy  bbee  uusseedd  aass tthhee mmoottiioonn ccoommppoonneenntt ooff ootthheerr vvii ccoomm--
     mmaannddss,, iinn wwhhiicchh ccaassee aannyy tteexxtt ccooppiieedd iinnttoo aa  bbuuffffeerr  iiss
     cchhaarraacctteerr  oorriieenntteedd,,  uunnlleessss  tthhee ssttaarrttiinngg aanndd ssttooppppiinngg
     ppooiinnttss ooff tthhee rreeggiioonn aarree tthhee  ffiirrsstt  cchhaarraacctteerr  iinn  tthhee
     lliinnee,, iinn wwhhiicchh ccaassee iitt iiss lliinnee oorriieenntteedd..  IIff iitt iiss lliinnee
     oorriieenntteedd,, tthhee ssttaarrttiinngg ppooiinntt ooff tthhee rreeggiioonn iiss  aaddjjuusstteedd
     ttoo bbee tthhee eenndd ooff tthhee lliinnee iimmmmeeddiiaatteellyy bbeeffoorree tthhee ssttaarrtt--
     iinngg ccuurrssoorr ppoossiittiioonn..

     Line:    Set to the line containing  the  beginning  of
              the sentence.
     Column:  Set  to  the  first  nonblank character of the
              sentence.
     Options: Affected by the lliisspp option.











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


[[ccoouunntt]] ))
     Move forward count sseenntteenncceess..

     TThhee )) ccoommmmaanndd iiss aann aabbssoolluuttee mmoovveemmeenntt..  TThhee  ))  ccoommmmaanndd
     mmaayy  bbee  uusseedd  aass tthhee mmoottiioonn ccoommppoonneenntt ooff ootthheerr vvii ccoomm--
     mmaannddss,, iinn wwhhiicchh ccaassee aannyy tteexxtt ccooppiieedd iinnttoo aa  bbuuffffeerr  iiss
     cchhaarraacctteerr  oorriieenntteedd,,  uunnlleessss  tthhee ssttaarrttiinngg ppooiinntt ooff tthhee
     rreeggiioonn iiss tthhee ffiirrsstt cchhaarraacctteerr iinn  tthhee  lliinnee,,  iinn  wwhhiicchh
     ccaassee  iitt  iiss lliinnee oorriieenntteedd..  IInn tthhee llaatttteerr ccaassee,, iiff tthhee
     ssttooppppiinngg ppooiinntt ooff tthhee rreeggiioonn iiss aallssoo tthhee ffiirrsstt  cchhaarraacc--
     tteerr  iinn  tthhee  lliinnee,, iitt iiss aaddjjuusstteedd ttoo bbee tthhee eenndd ooff tthhee
     lliinnee iimmmmeeddiiaatteellyy bbeeffoorree iitt..

     Line:    Set to the line containing  the  beginning  of
              the sentence.
     Column:  Set  to  the  first  nonblank character of the
              sentence.
     Options: Affected by the lliisspp option.

[[ccoouunntt]] ,,
     Reverse find character count ttiimmeess..  RReevveerrssee  tthhee  llaasstt
     FF,,  ff,,  TT  oorr tt ccoommmmaanndd,, sseeaarrcchhiinngg tthhee ootthheerr wwaayy iinn tthhee
     lliinnee,, ccoouunntt ttiimmeess..  IItt iiss aann eerrrroorr iiff aa FF,, ff,,  TT  oorr  tt
     ccoommmmaanndd hhaass nnoott bbeeeenn ppeerrffoorrmmeedd yyeett..

     TThhee  ,,  ccoommmmaanndd  mmaayy bbee uusseedd aass tthhee mmoottiioonn ccoommppoonneenntt ooff
     ootthheerr vvii ccoommmmaannddss,, iinn wwhhiicchh ccaassee aannyy tteexxtt ccooppiieedd iinnttoo aa
     bbuuffffeerr iiss cchhaarraacctteerr oorriieenntteedd..

     Line:    Unchanged.
     Column:  Set  to  the  searched-for character for the FF
              and ff commands, before the character for the tt
              command and after the character for the TT com-
              mand.
     Options: None.

[[ccoouunntt]] --
     Move to the first nonblank of the previous line,  count
     ttiimmeess..

     IItt iiss aann eerrrroorr iiff tthhee mmoovveemmeenntt iiss ppaasstt tthhee bbeeggiinnnniinngg ooff
     tthhee ffiillee..

     TThhee -- ccoommmmaanndd mmaayy bbee uusseedd aass tthhee  mmoottiioonn  ccoommppoonneenntt  ooff
     ootthheerr vvii ccoommmmaannddss,, iinn wwhhiicchh ccaassee aannyy tteexxtt ccooppiieedd iinnttoo aa
     bbuuffffeerr iiss lliinnee oorriieenntteedd..

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












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]] ..
     Repeat  the  last  vvii  command that modified text.  The
     repeated command may be a command and motion  component
     combination.   If  count iiss ssppeecciiffiieedd,, iitt rreeppllaacceess _b_o_t_h
     tthhee ccoouunntt ssppeecciiffiieedd ffoorr tthhee rreeppeeaatteedd ccoommmmaanndd,,  aanndd,,  iiff
     aapppplliiccaabbllee,,  ffoorr  tthhee  rreeppeeaatteedd  mmoottiioonn  ccoommppoonneenntt..  IIff
     ccoouunntt _i_s _n_o_t _s_p_e_c_i_f_i_e_d_, _t_h_e _c_o_u_n_t_s _o_r_i_g_i_n_a_l_l_y _s_p_e_c_i_f_i_e_d
     _t_o _t_h_e _c_o_m_m_a_n_d _b_e_i_n_g _r_e_p_e_a_t_e_d _a_r_e _u_s_e_d _a_g_a_i_n_.

     _A_s  _a _s_p_e_c_i_a_l _c_a_s_e_, _i_f _t_h_e ..  _c_o_m_m_a_n_d _i_s _e_x_e_c_u_t_e_d _i_m_m_e_-
     _d_i_a_t_e_l_y _a_f_t_e_r _t_h_e uu _c_o_m_m_a_n_d_, _t_h_e _c_h_a_n_g_e _l_o_g  _i_s  _r_o_l_l_e_d
     _f_o_r_w_a_r_d  _o_r  _b_a_c_k_w_a_r_d_, _d_e_p_e_n_d_i_n_g _o_n _t_h_e _a_c_t_i_o_n _o_f _t_h_e uu
     _c_o_m_m_a_n_d_.

     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 ("/"")) cchhaarraacctteerr aarree
     ffoorrwwaarrdd sseeaarrcchheess,, tthhee ccoommmmaannddss bbeeggiinnnniinngg wwiitthh  aa  qquueess--
     ttiioonn  mmaarrkk  ((""??")   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
     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  "/"" oorr ""??"  character is followed by a signed
     offset), the buffer will always be line oriented  (e.g.
     "/string/+0"" wwiillll aallwwaayyss gguuaarraanntteeee aa lliinnee oorriieennttaattiioonn))..

     TThhee NN ccoommmmaanndd rreeppeeaattss tthhee pprreevviioouuss sseeaarrcchh,, bbuutt  iinn  tthhee
     rreevveerrssee  ddiirreeccttiioonn..  TThhee nn ccoommmmaanndd rreeppeeaattss tthhee pprreevviioouuss










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


     sseeaarrcchh..  IIff eeiitthheerr tthhee NN oorr  nn  ccoommmmaannddss  aarree  uusseedd  aass
     mmoottiioonn  ccoommppoonneennttss  ffoorr tthhee !!  ccoommmmaanndd,, yyoouu wwiillll nnoott bbee
     pprroommpptteedd ffoorr tthhee tteexxtt ooff tthhee bbaanngg ccoommmmaanndd,, iinnsstteeaadd  tthhee
     pprreevviioouuss bbaanngg ccoommmmaanndd wwiillll bbee eexxeeccuutteedd..

     MMiissssiinngg RREE''ss ((ee..g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>>"",,   oorr    ""??<<ccaarrrriiaaggee--
     rreettuurrnn>>""  sseeaarrcchh  ffoorr  tthhee llaasstt sseeaarrcchh RREE,, iinn tthhee iinnddii--
     ccaatteedd ddiirreeccttiioonn..

     SSeeaarrcchheess mmaayy bbee iinntteerrrruupptteedd uussiinngg tthhee <<iinntteerrrruupptt>> cchhaarr--
     aacctteerr..

     MMuullttiippllee  sseeaarrcchh  ppaatttteerrnnss  mmaayy  bbee ggrroouuppeedd ttooggeetthheerr bbyy
     ddeelliimmiittiinngg  tthheemm  wwiitthh  sseemmiiccoolloonnss  aanndd  zzeerroo  oorr  mmoorree
     wwhhiitteessppaaccee  cchhaarraacctteerrss,,  ee..gg..   //ffoooo// ;; ??bbaarr??  sseeaarrcchheess
     ffoorrwwaarrdd ffoorr ffoooo aanndd tthheenn,, ffrroomm tthhaatt llooccaattiioonn,, bbaacckkwwaarrddss
     ffoorr  bbaarr..  WWhheenn sseeaarrcchh ppaatttteerrnnss aarree ggrroouuppeedd ttooggeetthheerr iinn
     tthhiiss mmaannnneerr,, tthhee sseeaarrcchh ppaatttteerrnnss aarree eevvaalluuaatteedd lleefftt  ttoo
     rriigghhtt  wwiitthh tthhee ffiinnaall ccuurrssoorr ppoossiittiioonn ddeetteerrmmiinneedd bbyy tthhee
     llaasstt sseeaarrcchh ppaatttteerrnn..

     IItt iiss aallssoo ppeerrmmiissssiibbllee ttoo aappppeenndd aa  zz  ccoommmmaanndd  ttoo  tthhee
     sseeaarrcchh  ssttrriinnggss,,  ee..gg..   //ffoooo// zz..  sseeaarrcchheess ffoorrwwaarrdd ffoorr
     tthhee nneexxtt ooccccuurrrreennccee ooff ffoooo,,  aanndd  tthheenn  ppoossiittiioonnss  tthhaatt
     lliinnee iinn tthhee mmiiddddllee ooff ssccrreeeenn..

     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, and any
     text copied into a buffer is character oriented.

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

::
     Execute an eexx command.  VVii prompts for an eexx command on
     the  last line of the screen, using a colon (":"")) cchhaarr--
     aacctteerr..  TThhee  ccoommmmaanndd  iiss  tteerrmmiinnaatteedd  bbyy  aa  <<ccaarrrriiaaggee--
     rreettuurrnn>>,  <newline> oorr <<eessccaappee>> character; all of these
     characters may be escaped  by  using  a  <literal-next>










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))


     cchhaarraacctteerr..  TThhee ccoommmmaanndd iiss tthheenn eexxeeccuutteedd..

     IIff  tthhee eexx ccoommmmaanndd wwrriitteess ttoo tthhee ssccrreeeenn,, vvii wwiillll pprroommpptt
     tthhee uusseerr ffoorr aa <<ccaarrrriiaaggee--rreettuurrnn>> bbeeffoorree ccoonnttiinnuuiinngg wwhheenn
     tthhee  eexx ccoommmmaanndd ffiinniisshheess..  LLaarrggee aammoouunnttss ooff oouuttppuutt ffrroomm
     tthhee eexx ccoommmmaanndd wwiillll bbee ppaaggeedd ffoorr tthhee uusseerr,, aanndd tthhee uusseerr
     pprroommpptteedd ffoorr aa <<ccaarrrriiaaggee--rreettuurrnn>> oorr <<ssppaaccee>> kkeeyy ttoo ccoonn--
     ttiinnuuee..  IInn ssoommee ccaasseess,, aa qquuiitt ((nnoorrmmaallllyy aa  ""qq""  cchhaarraacc--
     tteerr))  oorr <<iinntteerrrruupptt>> mmaayy bbee eenntteerreedd ttoo iinntteerrrruupptt tthhee eexx
     ccoommmmaanndd..

     WWhheenn tthhee eexx ccoommmmaanndd ffiinniisshheess,, aanndd tthhee uusseerr iiss  pprroommpptteedd
     ttoo  rreessuummee  vviissuuaall  mmooddee,,  iitt iiss aallssoo ppoossssiibbllee ttoo eenntteerr
     aannootthheerr ""::"" cchhaarraacctteerr ffoolllloowweedd bbyy aannootthheerr eexx ccoommmmaanndd..

     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: Affected as described for the eexx command.

[[ccoouunntt]] ;;
     Repeat the last character find count ttiimmeess..   TThhee  llaasstt
     cchhaarraacctteerr ffiinndd iiss oonnee ooff tthhee FF,, ff,, TT oorr tt ccoommmmaannddss..  IItt
     iiss aann eerrrroorr iiff aa FF,, ff,, TT oorr tt ccoommmmaanndd hhaass nnoott bbeeeenn ppeerr--
     ffoorrmmeedd yyeett..

     TThhee  ;;  ccoommmmaanndd  mmaayy bbee uusseedd aass tthhee mmoottiioonn ccoommppoonneenntt ooff
     ootthheerr vvii ccoommmmaannddss,, iinn wwhhiicchh ccaassee aannyy tteexxtt ccooppiieedd iinnttoo aa
     bbuuffffeerr iiss cchhaarraacctteerr oorriieenntteedd..

     Line:    Unchanged.
     Column:  Set  to  the  searched-for character for the FF
              and ff commands, before the character for the tt
              command and after the character for the TT com-
              mand.
     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 count aanndd mmoottiioonn 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 no longer
     contains a whitespace character, the command will  suc-
     ceed, but the line will not be modified.

     Line:    Unchanged.
     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--3399


     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,  <newline> cchhaarraacctteerrss aarree llooggiiccaallllyy
     aappppeennddeedd ttoo eeaacchh lliinnee ooff tthhee bbuuffffeerr..  IIff tthhee bbuuffffeerr  iiss
     cchhaarraacctteerr  oorriieenntteedd,, <<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 "@"",, oorr ""**", then the last buffer
     executed shall be used.  It is an error to specify "@@""
     oorr ""@@**" if there were no  previous  buffer  executions.
     The text of a buffer may contain a @@ command, and it is
     possible to create infinite loops in this manner.  (The
     <interrupt>  cchhaarraacctteerr  mmaayy  bbee  uusseedd  ttoo iinntteerrrruupptt tthhee
     lloooopp..))

     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 count iiss ssppeecciiffiieedd,, tthhee tteexxtt iiss rreeppeeaatt--
     eeddllyy iinnppuutt 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 count bbiiggwwoorrddss..  MMoovvee tthhee ccuurrssoorr bbaacckkwwaarrdd
     ttoo  tthhee bbeeggiinnnniinngg ooff aa bbiiggwwoorrdd bbyy rreeppeeaattiinngg tthhee ffoollllooww--
     iinngg aallggoorriitthhmm:: iiff tthhee ccuurrrreenntt ppoossiittiioonn iiss aatt tthhee bbeeggiinn--
     nniinngg ooff aa bbiiggwwoorrdd oorr tthhee cchhaarraacctteerr aatt tthhee ccuurrrreenntt ppoossii--
     ttiioonn ccaannnnoott bbee ppaarrtt ooff aa bbiiggwwoorrdd,,  mmoovvee  ttoo  tthhee  ffiirrsstt
     cchhaarraacctteerr ooff tthhee pprreecceeddiinngg bbiiggwwoorrdd..  OOtthheerrwwiissee,, mmoovvee ttoo
     tthhee ffiirrsstt cchhaarraacctteerr ooff tthhee bbiiggwwoorrdd aatt tthhee ccuurrrreenntt ppoossii--
     ttiioonn..   IIff  nnoo  pprreecceeddiinngg bbiiggwwoorrdd eexxiissttss oonn tthhee ccuurrrreenntt
     lliinnee,, mmoovvee ttoo tthhee ffiirrsstt cchhaarraacctteerr ooff tthhee  llaasstt  bbiiggwwoorrdd
     oonn tthhee ffiirrsstt pprreecceeddiinngg lliinnee tthhaatt ccoonnttaaiinnss aa bbiiggwwoorrdd..

     TThhee  BB  ccoommmmaanndd  mmaayy bbee uusseedd aass tthhee mmoottiioonn ccoommppoonneenntt ooff
     ootthheerr vvii ccoommmmaannddss,, iinn wwhhiicchh ccaassee aannyy tteexxtt ccooppiieedd iinnttoo aa
     bbuuffffeerr iiss cchhaarraacctteerr oorriieenntteedd..










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))


     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-
     line.  If count iiss ssppeecciiffiieedd,, tthhee iinnppuutt  tteexxtt  rreeppllaacceess
     ffrroomm  tthhee  ccuurrrreenntt  ppoossiittiioonn  ttoo  tthhee eenndd--ooff--lliinnee,, pplluuss
     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  count  eenndd--ooff--bbiiggwwoorrddss..  MMoovvee tthhee ccuurrssoorr
     ffoorrwwaarrdd ttoo tthhee eenndd ooff aa bbiiggwwoorrdd bbyy rreeppeeaattiinngg  tthhee  ffooll--
     lloowwiinngg aallggoorriitthhmm:: iiff tthhee ccuurrrreenntt ppoossiittiioonn iiss tthhee eenndd ooff
     aa bbiiggwwoorrdd oorr tthhee cchhaarraacctteerr aatt tthhaatt ppoossiittiioonn  ccaannnnoott  bbee
     ppaarrtt  ooff  aa  bbiiggwwoorrdd,, mmoovvee ttoo tthhee llaasstt cchhaarraacctteerr ooff tthhee
     ffoolllloowwiinngg bbiiggwwoorrdd..  OOtthheerrwwiissee,, mmoovvee ttoo tthhee llaasstt cchhaarraacc--
     tteerr ooff tthhee bbiiggwwoorrdd aatt tthhee ccuurrrreenntt ppoossiittiioonn..  IIff nnoo ssuucc--
     cceeeeddiinngg bbiiggwwoorrdd eexxiissttss oonn tthhee ccuurrrreenntt lliinnee,, mmoovvee ttoo tthhee
     llaasstt cchhaarraacctteerr ooff tthhee ffiirrsstt bbiiggwwoorrdd oonn tthhee nneexxtt ffoollllooww--
     iinngg lliinnee tthhaatt ccoonnttaaiinnss aa bbiiggwwoorrdd..

     TThhee EE ccoommmmaanndd mmaayy bbee uusseedd aass tthhee  mmoottiioonn  ccoommppoonneenntt  ooff
     ootthheerr vvii ccoommmmaannddss,, iinn wwhhiicchh ccaassee aannyy tteexxtt ccooppiieedd iinnttoo aa
     bbuuffffeerr iiss cchhaarraacctteerr oorriieenntteedd..

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












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


[[ccoouunntt]] FF <<cchhaarraacctteerr>>
     Search count ttiimmeess bbaacckkwwaarrdd tthhrroouugghh  tthhee  ccuurrrreenntt  lliinnee
     ffoorr <<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]] GG
     Move  to  line  count,,  oorr tthhee llaasstt lliinnee ooff tthhee ffiillee iiff
     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  count,  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 count - 1 lliinneess bbeellooww tthhee ttoopp
     ooff tthhee ssccrreeeenn..

     TThhee HH ccoommmmaanndd iiss aann aabbssoolluuttee mmoovveemmeenntt..  TThhee  HH  ccoommmmaanndd
     mmaayy  bbee  uusseedd  aass tthhee mmoottiioonn ccoommppoonneenntt ooff ootthheerr vvii ccoomm--
     mmaannddss,, iinn wwhhiicchh ccaassee aannyy tteexxtt ccooppiieedd iinnttoo aa  bbuuffffeerr  iiss
     lliinnee oorriieenntteedd..

     Line:    Set  to the line count - 1 lliinneess bbeellooww tthhee ttoopp
              ooff tthhee ssccrreeeenn..
     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 count iiss ssppeecciiffiieedd,, tthhee tteexxtt iinnppuutt  iiss
     rreeppeeaatteeddllyy iinnppuutt 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.












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))


[[ccoouunntt]] JJ
     Join lines.  If count iiss  ssppeecciiffiieedd,,  ccoouunntt  lines  are
     joined;  a  minimum  of  two  lines  are always joined,
     regardless of the value of count..

     IIff tthhee ccuurrrreenntt lliinnee eennddss wwiitthh aa  wwhhiitteessppaaccee  cchhaarraacctteerr,,
     aallll  wwhhiitteessppaaccee iiss ssttrriippppeedd ffrroomm tthhee nneexxtt lliinnee..  OOtthheerr--
     wwiissee,, iiff tthhee nneexxtt lliinnee ssttaarrttss wwiitthh aa  ooppeenn  ppaarreenntthheessiiss
     ((""((")  do nothing.  Otherwise, if the current line ends
     with a question mark ("?"")),, ppeerriioodd ((""..")   or  exclama-
     tion point ("!"")),, iinnsseerrtt ttwwoo ssppaacceess..  OOtthheerrwwiissee,, iinnsseerrtt
     aa ssiinnggllee ssppaaccee..

     IItt iiss nnoott aann eerrrroorr ttoo jjooiinn lliinneess ppaasstt tthhee  eenndd  ooff  tthhee
     ffiillee,, ii..ee.. lliinneess tthhaatt ddoo nnoott eexxiisstt..

     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 count - 1 lliinneess aabboovvee tthhee  bboott--
     ttoomm ooff tthhee ssccrreeeenn..

     TThhee  LL  ccoommmmaanndd iiss aann aabbssoolluuttee mmoovveemmeenntt..  TThhee LL ccoommmmaanndd
     mmaayy bbee uusseedd aass tthhee mmoottiioonn ccoommppoonneenntt ooff  ootthheerr  vvii  ccoomm--
     mmaannddss,,  iinn  wwhhiicchh ccaassee aannyy tteexxtt ccooppiieedd iinnttoo aa bbuuffffeerr iiss
     lliinnee oorriieenntteedd..

     Line:    Set to the line count - 1 lliinneess aabboovvee tthhee bboott--
              ttoomm ooff tthhee ssccrreeeenn..
     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 count ssppeecciiffiieedd ttoo tthhee MM ccoommmmaanndd wwaass
     iiggnnoorreedd..

     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.












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


[[ccoouunntt]] OO
     Enter  input  mode,  appending text in a new line above
     the current line.  If  count  iiss  ssppeecciiffiieedd,,  tthhee  tteexxtt
     iinnppuutt iiss rreeppeeaatteeddllyy iinnppuutt ccoouunntt -- 11 more times.

     Historically,  any count ssppeecciiffiieedd ttoo tthhee OO ccoommmmaanndd wwaass
     iiggnnoorreedd..

     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
     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 count iiss ssppeecciiffiieedd,, tthhee  tteexxtt  iinnppuutt  iiss
     rreeppeeaatteeddllyy iinnppuutt 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.












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))


[[bbuuffffeerr]] [[ccoouunntt]] SS
     Substitute count lliinneess..

     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  backward, count ttiimmeess,, tthhrroouugghh tthhee ccuurrrreenntt lliinnee
     ffoorr tthhee cchhaarraacctteerr _a_f_t_e_r tthhee ssppeecciiffiieedd <<cchhaarraacctteerr>>_.

     _T_h_e TT _c_o_m_m_a_n_d _m_a_y _b_e _u_s_e_d _a_s _t_h_e  _m_o_t_i_o_n  _c_o_m_p_o_n_e_n_t  _o_f
     _o_t_h_e_r vvii _c_o_m_m_a_n_d_s_, _i_n _w_h_i_c_h _c_a_s_e _a_n_y _t_e_x_t _c_o_p_i_e_d _i_n_t_o _a
     _b_u_f_f_e_r _i_s _c_h_a_r_a_c_t_e_r _o_r_i_e_n_t_e_d_.

     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 count bbiiggwwoorrddss..  MMoovvee tthhee  ccuurrssoorr  ffoorrwwaarrdd
     ttoo  tthhee bbeeggiinnnniinngg ooff aa bbiiggwwoorrdd bbyy rreeppeeaattiinngg tthhee ffoollllooww--
     iinngg aallggoorriitthhmm:: iiff tthhee ccuurrrreenntt ppoossiittiioonn iiss wwiitthhiinn aa bbiigg--
     wwoorrdd  oorr  tthhee cchhaarraacctteerr aatt tthhaatt ppoossiittiioonn ccaannnnoott bbee ppaarrtt
     ooff aa bbiiggwwoorrdd,, mmoovvee ttoo tthhee ffiirrsstt cchhaarraacctteerr ooff  tthhee  nneexxtt
     bbiiggwwoorrdd..   IIff  nnoo ssuubbsseeqquueenntt bbiiggwwoorrdd eexxiissttss oonn tthhee ccuurr--
     rreenntt lliinnee,, mmoovvee ttoo tthhee ffiirrsstt  cchhaarraacctteerr  ooff  tthhee  ffiirrsstt
     bbiiggwwoorrdd  oonn  tthhee  ffiirrsstt  ffoolllloowwiinngg lliinnee tthhaatt ccoonnttaaiinnss aa
     bbiiggwwoorrdd..

     TThhee WW ccoommmmaanndd mmaayy bbee uusseedd aass tthhee  mmoottiioonn  ccoommppoonneenntt  ooff
     ootthheerr vvii ccoommmmaannddss,, iinn wwhhiicchh ccaassee aannyy tteexxtt ccooppiieedd iinnttoo aa
     bbuuffffeerr iiss cchhaarraacctteerr oorriieenntteedd..

     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 count cchhaarraacctteerrss bbeeffoorree tthhee ccuurrssoorr..  IIff tthhee nnuumm--
     bbeerr  ooff  cchhaarraacctteerrss  ttoo  bbee  ddeelleetteedd iiss ggrreeaatteerr tthhaann oorr










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


     eeqquuaall ttoo tthhee nnuummbbeerr ooff cchhaarraacctteerrss ttoo tthhee  bbeeggiinnnniinngg  ooff
     tthhee lliinnee,, aallll ooff tthhee cchhaarraacctteerrss bbeeffoorree tthhee ccuurrrreenntt ccuurr--
     ssoorr  ppoossiittiioonn,,  ttoo  tthhee  bbeeggiinnnniinngg  ooff  tthhee  lliinnee,,  aarree
     ddeelleetteedd..

     Line:    Unchanged.
     Column:  Set  to  the current character minus count, or
              the first character if count is  greater  than
              the  number  of  characters in the line before
              the cursor.
     Options: None.

[[bbuuffffeerr]] [[ccoouunntt]] YY
     Copy (or "yank") count lliinneess iinnttoo tthhee ssppeecciiffiieedd bbuuffffeerr..

     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 count sseeccttiioonn bboouunnddaarriieess..

     TThhee [[[[ ccoommmmaanndd iiss aann aabbssoolluuttee mmoovveemmeenntt..  TThhee [[[[ ccoommmmaanndd
     mmaayy bbee uusseedd aass tthhee mmoottiioonn ccoommppoonneenntt ooff  ootthheerr  vvii  ccoomm--
     mmaannddss,,  iinn  wwhhiicchh ccaassee aannyy tteexxtt ccooppiieedd iinnttoo aa bbuuffffeerr iiss
     cchhaarraacctteerr oorriieenntteedd,, uunnlleessss  tthhee  ssttaarrttiinngg  ppoossiittiioonn  iiss
     ccoolluummnn 00,, iinn wwhhiicchh ccaassee iitt iiss lliinnee oorriieenntteedd..

     IItt iiss aann eerrrroorr iiff tthhee mmoovveemmeenntt iiss ppaasstt tthhee bbeeggiinnnniinngg ooff
     tthhee ffiillee..

     Line:    Set to the previous line that is count sseeccttiioonn
              bboouunnddaarriieess bbaacckk,, oorr tthhee ffiirrsstt lliinnee ooff tthhee ffiillee
              iiff nnoo mmoorree sseeccttiioonn bboouunnddaarriieess eexxiisstt  pprreecceeddiinngg
              tthhee ccuurrrreenntt lliinnee..
     Column:  Set  to  the  first  nonblank character in the
              line.











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))


     Options: Affected by the sseeccttiioonnss option.

[[ccoouunntt]] ]]]]
     Move forward count sseeccttiioonn bboouunnddaarriieess..

     TThhee ]]]] ccoommmmaanndd iiss aann aabbssoolluuttee mmoovveemmeenntt..  TThhee ]]]] ccoommmmaanndd
     mmaayy  bbee  uusseedd  aass tthhee mmoottiioonn ccoommppoonneenntt ooff ootthheerr vvii ccoomm--
     mmaannddss,, iinn wwhhiicchh ccaassee aannyy tteexxtt ccooppiieedd iinnttoo aa  bbuuffffeerr  iiss
     cchhaarraacctteerr  oorriieenntteedd,,  uunnlleessss  tthhee  ssttaarrttiinngg ppoossiittiioonn iiss
     ccoolluummnn 00,, iinn wwhhiicchh ccaassee iitt iiss lliinnee oorriieenntteedd..

     IItt iiss aann eerrrroorr iiff tthhee mmoovveemmeenntt iiss ppaasstt tthhee eenndd  ooff  tthhee
     ffiillee..

     Line:    Set  to  the line that is count sseeccttiioonn bboouunndd--
              aarriieess ffoorrwwaarrdd,, oorr ttoo tthhee llaasstt lliinnee ooff tthhee ffiillee
              iiff  nnoo mmoorree sseeccttiioonn bboouunnddaarriieess eexxiisstt ffoolllloowwiinngg
              tthhee ccuurrrreenntt lliinnee..
     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 count - 1 lliinneess,, ttoo tthhee ffiirrsstt nnoonnbbllaannkk  cchhaarr--
     aacctteerr..   TThhee __ ccoommmmaanndd mmaayy bbee uusseedd aass tthhee mmoottiioonn ccoommppoo--
     nneenntt ooff ootthheerr vvii  ccoommmmaannddss,,  iinn  wwhhiicchh  ccaassee  aannyy  tteexxtt
     ccooppiieedd iinnttoo aa bbuuffffeerr iiss lliinnee oorriieenntteedd..

     IItt  iiss  nnoott  aann eerrrroorr ttoo eexxeeccuuttee tthhee __ ccoommmmaanndd wwhheenn tthhee
     ccuurrssoorr iiss oonn tthhee ffiirrsstt cchhaarraacctteerr iinn tthhee lliinnee..

     Line:    The current line plus count - 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  count  iiss  ssppeecciiffiieedd,,  tthhee tteexxtt iinnppuutt iiss rreeppeeaatteeddllyy
     iinnppuutt ccoouunntt -- 11 more times.












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


     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 count wwoorrddss..  MMoovvee tthhee ccuurrssoorr bbaacckkwwaarrdd ttoo
     tthhee bbeeggiinnnniinngg ooff aa  wwoorrdd  bbyy  rreeppeeaattiinngg  tthhee  ffoolllloowwiinngg
     aallggoorriitthhmm::  iiff tthhee ccuurrrreenntt ppoossiittiioonn iiss aatt tthhee bbeeggiinnnniinngg
     ooff aa wwoorrdd,, mmoovvee ttoo tthhee ffiirrsstt cchhaarraacctteerr ooff tthhee pprreecceeddiinngg
     wwoorrdd..   OOtthheerrwwiissee,,  tthhee  ccuurrrreenntt  ppoossiittiioonn mmoovveess ttoo tthhee
     ffiirrsstt cchhaarraacctteerr ooff tthhee wwoorrdd aatt  tthhee  ccuurrrreenntt  ppoossiittiioonn..
     IIff  nnoo  pprreecceeddiinngg wwoorrdd eexxiissttss oonn tthhee ccuurrrreenntt lliinnee,, mmoovvee
     ttoo tthhee ffiirrsstt cchhaarraacctteerr ooff tthhee llaasstt wwoorrdd  oonn  tthhee  ffiirrsstt
     pprreecceeddiinngg lliinnee tthhaatt ccoonnttaaiinnss aa wwoorrdd..

     TThhee  bb  ccoommmmaanndd  mmaayy bbee uusseedd aass tthhee mmoottiioonn ccoommppoonneenntt ooff
     ootthheerr vvii ccoommmmaannddss,, iinn wwhhiicchh ccaassee aannyy tteexxtt ccooppiieedd iinnttoo aa
     bbuuffffeerr iiss cchhaarraacctteerr oorriieenntteedd..

     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  the  region  of text specified by the count aanndd
     mmoottiioonn.  If only part of a  single  line  is  affected,
     then  the last character being changed is marked with a
     "$""..  OOtthheerrwwiissee,, tthhee rreeggiioonn ooff  tteexxtt  iiss  ddeelleetteedd,,  aanndd
     iinnppuutt mmooddee iiss eenntteerreedd..

     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 the region of text specified by  the  count  aanndd
     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.












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))


[[ccoouunntt]] ee
     Move forward count eenndd--ooff--wwoorrddss..  MMoovvee tthhee ccuurrssoorr  ffoorr--
     wwaarrdd  ttoo  tthhee  eenndd ooff aa wwoorrdd bbyy rreeppeeaattiinngg tthhee ffoolllloowwiinngg
     aallggoorriitthhmm:: iiff tthhee ccuurrrreenntt ppoossiittiioonn  iiss  tthhee  eenndd  ooff  aa
     wwoorrdd,, mmoovvee ttoo tthhee llaasstt cchhaarraacctteerr ooff tthhee ffoolllloowwiinngg wwoorrdd..
     OOtthheerrwwiissee,, mmoovvee ttoo tthhee llaasstt cchhaarraacctteerr ooff  tthhee  wwoorrdd  aatt
     tthhee  ccuurrrreenntt ppoossiittiioonn..  IIff nnoo ssuucccceeeeddiinngg wwoorrdd eexxiissttss oonn
     tthhee ccuurrrreenntt lliinnee,, mmoovvee ttoo tthhee  llaasstt  cchhaarraacctteerr  ooff  tthhee
     ffiirrsstt  wwoorrdd  oonn tthhee nneexxtt ffoolllloowwiinngg lliinnee tthhaatt ccoonnttaaiinnss aa
     wwoorrdd..

     TThhee ee ccoommmmaanndd mmaayy bbee uusseedd aass tthhee  mmoottiioonn  ccoommppoonneenntt  ooff
     ootthheerr vvii ccoommmmaannddss,, iinn wwhhiicchh ccaassee aannyy tteexxtt ccooppiieedd iinnttoo aa
     bbuuffffeerr iiss cchhaarraacctteerr oorriieenntteedd..

     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, count ttiimmeess,, tthhrroouugghh tthhee  rreesstt  ooff  tthhee
     ccuurrrreenntt lliinnee ffoorr <<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 count iiss ssppeecciiffiieedd,, tthhee  tteexxtt  iinnppuutt  iiss  rreeppeeaatteeddllyy
     iinnppuutt 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  <charac-
     ter>..   TThhee eexxaacctt ppoossiittiioonn iiss rreeffeerrrreedd ttoo bbyy ""``<<cchhaarraacc--
     tteerr>>".  The line is referred to by "'<character>""..

     HHiissttoorriiccaallllyy,, <<cchhaarraacctteerr>> was restricted to  lower-case
     letters.  NNvvii permits the use of any character.












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499


     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  count  iiss  ssppeecciiffiieedd,,  tthhee  tteexxtt
     iinnppuutt iiss rreeppeeaatteeddllyy iinnppuutt ccoouunntt -- 11 more times.

     Historically,  any count ssppeecciiffiieedd ttoo tthhee oo ccoommmmaanndd wwaass
     iiggnnoorreedd..

     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 count cchhaarraacctteerrss  iinn  tthhee
     lliinnee  aarree rreeppllaacceedd wwiitthh <<cchhaarraacctteerr>>.  Replacing charac-
     ters with <newline> cchhaarraacctteerrss rreessuullttss iinn ccrreeaattiinngg nneeww,,
     eemmppttyy lliinneess iinnttoo tthhee ffiillee..

     IIff <<cchhaarraacctteerr>> is <escape>,, tthhee ccoommmmaanndd iiss ccaanncceelllleedd..

     Line:    Unchanged  unless the replacement character is
              a <newline>,, iinn wwhhiicchh ccaassee iitt iiss  sseett  ttoo  tthhee
              ccuurrrreenntt lliinnee pplluuss ccoouunntt -- 11.
     Column:  Set to the last character replaced, unless the
              replacement character is a <newline>, 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 count cchhaarraacctteerrss iinn tthhee ccuurrrreenntt lliinnee  ssttaarrtt--
     iinngg wwiitthh tthhee ccuurrrreenntt cchhaarraacctteerr..










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 ((VVii CCoommmmaannddss))


     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, count ttiimmeess,, tthhrroouugghh tthhee  ccuurrrreenntt  lliinnee
     ffoorr tthhee cchhaarraacctteerr iimmmmeeddiiaatteellyy _b_e_f_o_r_e <<cchhaarraacctteerr>>_.

     _T_h_e  tt  _c_o_m_m_a_n_d  _m_a_y _b_e _u_s_e_d _a_s _t_h_e _m_o_t_i_o_n _c_o_m_p_o_n_e_n_t _o_f
     _o_t_h_e_r vvii _c_o_m_m_a_n_d_s_, _i_n _w_h_i_c_h _c_a_s_e _a_n_y _t_e_x_t _c_o_p_i_e_d _i_n_t_o _a
     _b_u_f_f_e_r _i_s _c_h_a_r_a_c_t_e_r _o_r_i_e_n_t_e_d_.

     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 count wwoorrddss..  MMoovvee tthhee ccuurrssoorr  ffoorrwwaarrdd  ttoo
     tthhee  bbeeggiinnnniinngg  ooff  aa  wwoorrdd  bbyy rreeppeeaattiinngg tthhee ffoolllloowwiinngg
     aallggoorriitthhmm:: iiff tthhee ccuurrrreenntt ppoossiittiioonn iiss aatt tthhee  bbeeggiinnnniinngg
     ooff  aa  wwoorrdd,,  mmoovvee  ttoo  tthhee ffiirrsstt cchhaarraacctteerr ooff tthhee nneexxtt
     wwoorrdd..  IIff nnoo ssuubbsseeqquueenntt  wwoorrdd  eexxiissttss  oonn  tthhee  ccuurrrreenntt
     lliinnee,,  mmoovvee ttoo tthhee ffiirrsstt cchhaarraacctteerr ooff tthhee ffiirrsstt wwoorrdd oonn
     tthhee ffiirrsstt ffoolllloowwiinngg lliinnee tthhaatt ccoonnttaaiinnss aa wwoorrdd..

     TThhee ww ccoommmmaanndd mmaayy bbee uusseedd aass tthhee  mmoottiioonn  ccoommppoonneenntt  ooff
     ootthheerr vvii ccoommmmaannddss,, iinn wwhhiicchh ccaassee aannyy tteexxtt ccooppiieedd iinnttoo aa
     bbuuffffeerr iiss cchhaarraacctteerr oorriieenntteedd..












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--5511


     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 count cchhaarraacctteerrss..  TThhee ddeelleettiioonn iiss aatt  tthhee  ccuurr--
     rreenntt  cchhaarraacctteerr  ppoossiittiioonn..  IIff tthhee nnuummbbeerr ooff cchhaarraacctteerrss
     ttoo bbee ddeelleetteedd iiss ggrreeaatteerr tthhaann oorr eeqquuaall ttoo tthhee nnuummbbeerr ooff
     cchhaarraacctteerrss  ttoo  tthhee eenndd ooff tthhee lliinnee,, aallll ooff tthhee cchhaarraacc--
     tteerrss ffrroomm tthhee ccuurrrreenntt ccuurrssoorr ppoossiittiioonn ttoo tthhee eenndd ooff tthhee
     lliinnee aarree ddeelleetteedd..

     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") the text region specified by the count
     aanndd mmoottiioonn, into a buffer.

     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 count2 lliinneess lloonngg,, wwiitthh
     lliinnee ccoouunntt11 placed as specified by the type  cchhaarraacctteerr..
     IIff  ccoouunntt11 is not specified, it defaults to the current
     line.  If count2 iiss nnoott ssppeecciiffiieedd,, iitt ddeeffaauullttss  ttoo  tthhee
     ccuurrrreenntt wwiinnddooww ssiizzee..

     TThhee ffoolllloowwiinngg ttyyppee characters may be used:

     +        If  count1 is specified, place the line count1
              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  count1  at  the  top  of  the
              screen.
     .        Place  the  line  count1  in the center of the
              screen.
     -        Place the line count1 at  the  bottom  of  the
              screen.











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 ((VVii CCoommmmaannddss))


     ^        If count1 is specified, place the line that is
              at the top of the screen when count1 is at the
              bottom  of  the  screen,  at the bottom of the
              screen, i.e. display  the  screen  before  the
              screen  before count1.  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  count1 unless count1 is not specified
              and the type 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,
              respectively.
     Column:  Set to the first  nonblank  character  in  the
              line.
     Options: None.

[[ccoouunntt]] {{
     Move backward count ppaarraaggrraapphhss..

     TThhee  {{  ccoommmmaanndd iiss aann aabbssoolluuttee mmoovveemmeenntt..  TThhee {{ ccoommmmaanndd
     mmaayy bbee uusseedd aass tthhee mmoottiioonn ccoommppoonneenntt ooff  ootthheerr  vvii  ccoomm--
     mmaannddss,,  iinn  wwhhiicchh ccaassee aannyy tteexxtt ccooppiieedd iinnttoo aa bbuuffffeerr iiss
     cchhaarraacctteerr oorriieenntteedd,, uunnlleessss tthhee  ssttaarrttiinngg  cchhaarraacctteerr  iiss
     tthhee  ffiirrsstt  cchhaarraacctteerr  oonn iittss lliinnee,, iinn wwhhiicchh ccaassee iitt iiss
     lliinnee oorriieenntteedd..

     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 count, if the  position
              exists  in  the line.  If the column length of
              the current line is less than count, the  cur-
              sor  is  moved  to  the  last character in the
              line.
     Options: None.












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--5533


[[ccoouunntt]] }}
     Move forward count ppaarraaggrraapphhss..

     TThhee }} ccoommmmaanndd iiss aann aabbssoolluuttee mmoovveemmeenntt..  TThhee  }}  ccoommmmaanndd
     mmaayy  bbee  uusseedd  aass tthhee mmoottiioonn ccoommppoonneenntt ooff ootthheerr vvii ccoomm--
     mmaannddss,, iinn wwhhiicchh ccaassee aannyy tteexxtt ccooppiieedd iinnttoo aa  bbuuffffeerr  iiss
     cchhaarraacctteerr oorriieenntteedd,, uunnlleessss tthhee ssttaarrttiinngg cchhaarraacctteerr iiss aatt
     oorr bbeeffoorree aannyy nnoonnbbllaannkk cchhaarraacctteerrss iinn iittss lliinnee,, iinn wwhhiicchh
     ccaassee iitt iiss lliinnee oorriieenntteedd..

     Line:    Set  to  the  line containing the beginning of
              the next 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]] ~~
     Reverse  the case of the next count cchhaarraacctteerr((ss))..  TThhiiss
     iiss tthhee hhiissttoorriicc sseemmaannttiicc ffoorr tthhee ~~ ccoommmmaanndd  aanndd  iitt  iiss
     oonnllyy iinn eeffffeecctt iiff tthhee ttiillddeeoopp ooppttiioonn iiss nnoott sseett..

     LLoowweerrccaassee  aallpphhaabbeettiicc  cchhaarraacctteerrss aarree cchhaannggeedd ttoo uuppppeerr--
     ccaassee,, aanndd uuppppeerrccaassee cchhaarraacctteerrss aarree  cchhaannggeedd  ttoo  lloowweerr--
     ccaassee..  NNoo ootthheerr cchhaarraacctteerrss aarree aaffffeecctteedd..

     HHiissttoorriiccaallllyy,,  tthhee ~~ ccoommmmaanndd ddiidd nnoott ttaakkee aann aassssoocciiaatteedd
     ccoouunntt,, nnoorr ddiidd iitt mmoovvee ppaasstt  tthhee  eenndd  ooff  tthhee  ccuurrrreenntt
     lliinnee..   AAss iitt hhaadd nnoo aassssoocciiaatteedd mmoottiioonn iitt wwaass ddiiffffiiccuulltt
     ttoo cchhaannggee tthhee ccaassee ooff llaarrggee bblloocckkss ooff tteexxtt..  IInn nnvvii,, iiff
     tthhee  ccuurrssoorr  iiss  oonn  tthhee  llaasstt cchhaarraacctteerr ooff aa lliinnee,, aanndd
     tthheerree aarree mmoorree lliinneess iinn tthhee ffiillee,, tthhee ccuurrssoorr  mmoovveess  ttoo
     tthhee nneexxtt lliinnee..

     IItt  iiss  nnoott aann eerrrroorr ttoo ssppeecciiffyy aa ccoouunntt llaarrggeerr tthhaann tthhee
     nnuummbbeerr ooff cchhaarraacctteerrss bbeettwweeeenn tthhee ccuurrssoorr aanndd tthhee eenndd  ooff
     tthhee ffiillee..

     Line:    Set  to  the line of the character after count
              cchhaarraacctteerrss,, oorr,, eenndd ooff ffiillee..
     Column:  Set to the character after  count  cchhaarraacctteerrss,,
              oorr,, eenndd--ooff--ffiillee..
     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 count aanndd 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.












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 ((VVii CCoommmmaannddss))


     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 <interrupt> cchhaarraacctteerr iiss uusseedd ttoo iinntteerrrruupptt wwhhiillee
     eenntteerriinngg  aann  eexx  ccoommmmaanndd,,  tthhee ccoommmmaanndd iiss aabboorrtteedd,, tthhee
     ccuurrssoorr rreettuurrnnss ttoo iittss pprreevviioouuss ppoossiittiioonn,, aanndd vvii rreemmaaiinnss
     iinn ccoommmmaanndd mmooddee..

     GGeenneerraallllyy,,  iiff  tthhee  <<iinntteerrrruupptt>>  cchhaarraacctteerr  iiss uusseedd ttoo
     iinntteerrrruupptt aannyy ooppeerraattiioonn,, aannyy cchhaannggeess  mmaaddee  bbeeffoorree  tthhee
     iinntteerrrruupptt aarree lleefftt iinn ppllaaccee..

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

     1144..  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 <control-D> eerraassee  cchhaarr--
     aacctteerr  aanndd  tthhee ""00<<ccoonnttrrooll--DD>>" and "^<control-D>"" eerraassee
     ssttrriinnggss ccoouulldd eerraassee aauuttooiinnddeenntt cchhaarraacctteerrss..  ((AAuuttooiinnddeenntt
     cchhaarraacctteerrss  iinncclluuddee  bbootthh tthhee cchhaarraacctteerrss iinnsseerrtteedd aauuttoo--
     mmaattiiccaallllyy aatt tthhee bbeeggiinnnniinngg ooff aann iinnppuutt lliinnee aass wweellll  aass
     cchhaarraacctteerrss  iinnsseerrtteedd  uussiinngg  tthhee  <<ccoonnttrrooll--TT>> command.)
     This implementation permits erasure  to  continue  past
     the  beginning  of  the current line, and back to where
     text input mode was entered.  In  addition,  autoindent
     characters may be erased using the standard erase char-
     acters.  For the line and word erase characters, reach-
     ing  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 <control-H> aanndd <<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.










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--5555


     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 <nul>,,
          tthhee  pprreevviioouuss  iinnppuutt  iiss  rreeppllaayyeedd,,  aass  iiff   jjuusstt
          eenntteerreedd..

     <<ccoonnttrrooll--DD>>
          If  the  previous  character  on  the  line was an
          autoindent character, erase characters to move the
          cursor  back  to  the column immediately after the
          previous (1-based) column which is a  multiple  of
          the  sshhiiffttwwiiddtthh  edit  option.  This may result in
          any number of <tab> aanndd <<ssppaaccee>> characters preced-
          ing the cursor being changed.

          Otherwise, if the aauuttooiinnddeenntt option is set and the
          user is entering the first character in the  line,
          <control-D>  iiss  iiggnnoorreedd..   OOtthheerrwwiissee,,  aa  lliitteerraall
          <<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
          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.  The autoindent level is
          not altered.

     <<ccoonnttrrooll--TT>>
          Insert sufficient <tab> aanndd <<ssppaaccee>> characters  to
          move  the cursor forward to the column immediately
          after the next (1-based) column which is a  multi-
          ple  of  the  sshhiiffttwwiiddtthh  edit  option.   This may
          result in any number of <tab> aanndd <<ssppaaccee>>  charac-
          ters preceding the cursor being changed.

          Historically,  vvii  did  not permit the <control-T>
          ccoommmmaanndd ttoo bbee uusseedd uunnlleessss tthhee ccuurrssoorr  wwaass  aatt  tthhee
          ffiirrsstt ccoolluummnn ooff aa nneeww lliinnee oorr iitt wwaass pprreecceeddeedd oonnllyy
          bbyy aauuttooiinnddeenntt cchhaarraacctteerrss..  NNvvii ppeerrmmiittss  iitt  ttoo  bbee
          uusseedd aatt aannyy ttiimmee dduurriinngg iinnsseerrtt mmooddee..

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











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 ((VVii CCoommmmaannddss))


     <<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 ("^""))
          cchhaarraacctteerr  wwiillll  bbee  ddiissppllaayyeedd  iimmmmeeddiiaatteellyy  aass  aa
          ppllaacceehhoollddeerr,,  bbuutt  wwiillll  bbee  rreeppllaacceedd  bbyy tthhee nneexxtt
          cchhaarraacctteerr..

     <<eessccaappee>>
          If on the colon command line, and the  ffiilleecc  edit
          option  is  set,  behave  as  described  for  that
          option.  Otherwise, if on the colon command  line,
          execute  the  command.   Otherwise,  if not on the
          colon command line, 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.  The value  is  delimited  by
          any  non-hexadecimal character or the input of the
          maximum number of characters that  can  be  trans-
          lated into a single character value.

     <<iinntteerrrruupptt>>
          Interrupt  text  input  mode, returning to command
          mode.  If the <interrupt>  cchhaarraacctteerr  iiss  uusseedd  ttoo
          iinntteerrrruupptt  iinnsseerrttiinngg  tteexxtt iinnttoo tthhee ffiillee,, iitt iiss aass
          iiff tthhee <<eessccaappee>> character was used; all text input
          up  to the interruption is resolved into the file.

     1155..  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.












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577


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

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

      (4)   The  address  "'<character>"  or  "`<character>"
            refers to the line marked with the name <charac-
            ter>.  (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 "//_"_,
            _t_h_e  _l_a_s_t  _R_E _u_s_e_d _i_n _a_n_y _c_o_m_m_a_n_d _i_s _u_s_e_d _i_n _t_h_e
            _s_e_a_r_c_h_.

            _I_f _t_h_e eexxtteennddeedd _o_p_t_i_o_n _i_s _s_e_t_, _t_h_e _R_E _i_s _h_a_n_d_l_e_d
            _a_s _a_n _e_x_t_e_n_d_e_d _R_E_, _n_o_t _a _b_a_s_i_c _R_E_.  _I_f _t_h_e wwrraapp--
            ssccaann _o_p_t_i_o_n _i_s _s_e_t_, _t_h_e _s_e_a_r_c_h _w_r_a_p_s  _a_r_o_u_n_d  _t_o
            _t_h_e  _b_e_g_i_n_n_i_n_g  _o_f  _t_h_e _f_i_l_e _a_n_d _c_o_n_t_i_n_u_e_s _u_p _t_o
            _a_n_d _i_n_c_l_u_d_i_n_g _t_h_e  _c_u_r_r_e_n_t  _l_i_n_e_,  _s_o  _t_h_a_t  _t_h_e
            _e_n_t_i_r_e _f_i_l_e _i_s _s_e_a_r_c_h_e_d_.

            _T_h_e  _f_o_r_m _"_\_/"" iiss aacccceepptteedd ffoorr hhiissttoorriicc rreeaassoonnss,,
            aanndd iiss iiddeennttiiccaall ttoo ""////_"_.

      (6)   An  RE  enclosed   in   question   marks   ("?_"_)
            _a_d_d_r_e_s_s_e_s  _t_h_e  _f_i_r_s_t  _l_i_n_e  _f_o_u_n_d  _b_y _s_e_a_r_c_h_i_n_g
            _b_a_c_k_w_a_r_d _f_r_o_m _t_h_e  _l_i_n_e  _p_r_e_c_e_d_i_n_g  _t_h_e  _c_u_r_r_e_n_t
            _l_i_n_e_, _t_o_w_a_r_d _t_h_e _b_e_g_i_n_n_i_n_g _o_f _t_h_e _f_i_l_e _a_n_d _s_t_o_p_-
            _p_i_n_g _a_t  _t_h_e  _f_i_r_s_t  _l_i_n_e  _c_o_n_t_a_i_n_i_n_g  _a  _s_t_r_i_n_g
            _m_a_t_c_h_i_n_g  _t_h_e  _R_E_.   _(_T_h_e _t_r_a_i_l_i_n_g _q_u_e_s_t_i_o_n _m_a_r_k
            _c_a_n _b_e _o_m_i_t_t_e_d _a_t _t_h_e _e_n_d _o_f _a _c_o_m_m_a_n_d _l_i_n_e_._)

            _I_f _n_o _R_E _i_s _s_p_e_c_i_f_i_e_d_, _i_._e_. _t_h_e _p_a_t_t_e_r_n _i_s _"_?_?_"_,
            _t_h_e  _l_a_s_t  _R_E _u_s_e_d _i_n _a_n_y _c_o_m_m_a_n_d _i_s _u_s_e_d _i_n _t_h_e
            _s_e_a_r_c_h_.

            _I_f _t_h_e eexxtteennddeedd _o_p_t_i_o_n _i_s _s_e_t_, _t_h_e _R_E _i_s _h_a_n_d_l_e_d
            _a_s _a_n _e_x_t_e_n_d_e_d _R_E_, _n_o_t _a _b_a_s_i_c _R_E_.  _I_f _t_h_e wwrraapp--
            ssccaann _o_p_t_i_o_n _i_s _s_e_t_,  _t_h_e  _s_e_a_r_c_h   _w_r_a_p_s  _a_r_o_u_n_d
            _f_r_o_m _t_h_e _b_e_g_i_n_n_i_n_g _o_f _t_h_e _f_i_l_e _t_o _t_h_e _e_n_d _o_f _t_h_e
            _f_i_l_e _a_n_d _c_o_n_t_i_n_u_e_s _u_p _t_o _a_n_d _i_n_c_l_u_d_i_n_g _t_h_e  _c_u_r_-
            _r_e_n_t  _l_i_n_e_, _s_o _t_h_a_t _t_h_e _e_n_t_i_r_e _f_i_l_e _i_s _s_e_a_r_c_h_e_d_.

            _T_h_e _f_o_r_m _"_\_?""  iiss aacccceepptteedd ffoorr hhiissttoorriicc rreeaassoonnss,,










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


            aanndd iiss iiddeennttiiccaall ttoo ""????_"_.

      (7)   An  address  followed  by a plus sign ("+_"_) _o_r _a
            _m_i_n_u_s _s_i_g_n _(_"_-") 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" is the same as ".-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,$".

          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,2,3,5""pprriinntt
     pprriinnttss  lliinneess  33  tthhrroouugghh  55,, bbeeccaauussee tthhee pprriinntt ccoommmmaanndd
     oonnllyy ttaakkeess ttwwoo aaddddrreesssseess..

          The addresses in a range are separated  from  each
     other  by  a  comma (","")) oorr aa sseemmiiccoolloonn (("";;").  In the
     latter case, the current line  (".""))   iiss  sseett  ttoo  tthhee
     ffiirrsstt aaddddrreessss,, aanndd oonnllyy tthheenn iiss tthhee sseeccoonndd aaddddrreessss ccaall--
     ccuullaatteedd..  TThhiiss ffeeaattuurree ccaann bbee  uusseedd  ttoo  ddeetteerrmmiinnee  tthhee
     ssttaarrttiinngg  lliinnee  ffoorr  ffoorrwwaarrdd aanndd bbaacckkwwaarrdd sseeaarrcchheess ((sseeee
     rruulleess ((55)) aanndd ((66)) aabboovvee))..  TThhee sseeccoonndd  aaddddrreessss  ooff  aannyy
     ttwwoo--aaddddrreessss  sseeqquueennccee  ccoorrrreessppoonnddss  ttoo aa lliinnee tthhaatt ffooll--
     lloowwss,, iinn tthhee ffiillee,, tthhee lliinnee ccoorrrreessppoonnddiinngg ttoo tthhee  ffiirrsstt
     aaddddrreessss..   TThhee ffiirrsstt aaddddrreessss mmuusstt bbee lleessss tthhaann oorr eeqquuaall
     ttoo tthhee sseeccoonndd  aaddddrreessss..   TThhee  ffiirrsstt  aaddddrreessss  mmuusstt  bbee
     ggrreeaatteerr  tthhaann  oorr  eeqquuaall ttoo tthhee ffiirrsstt lliinnee ooff tthhee ffiillee,,
     aanndd tthhee llaasstt aaddddrreessss mmuusstt bbee lleessss tthhaann oorr eeqquuaall ttoo  tthhee
     llaasstt lliinnee ooff tthhee 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599


     1166..  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enndd--ooff--ffiillee>>
          The end-of-file character is used  to  scroll  the
          screen  in  the eexx editor.  This character is nor-
          mally <control-D>..  HHoowweevveerr,, wwhhaatteevveerr cchhaarraacctteerr iiss
          sseett  ffoorr tthhee ccuurrrreenntt tteerrmmiinnaall iiss ssuuppppoorrtteedd aass wweellll
          aass <<ccoonnttrrooll--DD>>.

     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 line iiss tthhee ccuurrrreenntt lliinnee..

     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 _p_e_r_c_e_n_t _s_i_g_n _(_"_%") stands for the  range
          "1,$_"_.  _T_h_e _s_t_a_r_t_i_n_g _a_d_d_r_e_s_s _m_u_s_t _b_e _l_e_s_s _t_h_a_n_, _o_r
          _e_q_u_a_l _t_o_, _t_h_e _e_n_d_i_n_g _a_d_d_r_e_s_s_.

     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 3000"" iinn aa 1100 lliinnee
          ffiillee iiss aacccceeppttaabbllee,, aanndd wwiillll pprriinntt ffrroomm  tthhee  ccuurr--
          rreenntt lliinnee tthhrroouugghh tthhee llaasstt lliinnee iinn tthhee ffiillee..

     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,
          any  number of "+"" oorr ""--" 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 flags iiss nnoonnee..

     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 "/tmp".  This will be










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))


     replaced with a temporary file name which can  be  used
     for temporary work, e.g.  ":e /tmp" 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
     count_-  _s_u_b_s_e_q_u_e_n_t  _l_i_n_e_s  _a_r_e _a_f_f_e_c_t_e_d _b_y _t_h_e _c_o_m_m_a_n_d_,
     _e_._g_. _t_h_e _c_o_m_m_a_n_d _"_2_,_3_p_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  <carriage-return>,  "%"
     and  "#"  retain their literal value when preceded by a
     backslash.

     1177..  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.

          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 "ar[gs]"  in  the  synopsis)  can  be
     entered as "ar", "arg" or "args".

          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










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


          double-quote character (""""))  aarree  iiggnnoorreedd..   TThhiiss
          ppeerrmmiittss  ccoommmmeennttss  iinn  eeddiittoorr  ssccrriippttss aanndd ssttaarrttuupp
          ffiilleess..

     <<ccoonnttrrooll--DD>>

     <<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 <control-D> kkeeyy..

          HHiissttoorriiccaallllyy,, tthhee eeooff ccoommmmaanndd iiggnnoorreedd aannyy  pprreecceedd--
          iinngg  ccoouunntt,,  aanndd  tthhee  <<eenndd--ooff--ffiillee>> cchhaarraacctteerr wwaass
          iiggnnoorreedd uunnlleessss iitt wwaass eenntteerreedd aass tthhee ffiirrsstt cchhaarraacc--
          tteerr ooff tthhee ccoommmmaanndd..  TThhiiss iimmpplleemmeennttaattiioonn ttrreeaattss iitt
          aass aa ccoommmmaanndd _o_n_l_y iiff eenntteerreedd aass tthhee ffiirrsstt  cchhaarraacc--
          tteerr  ooff  tthhee ccoommmmaanndd lliinnee,, aanndd ootthheerrwwiissee ttrreeaattss iitt
          aass aannyy ootthheerr cchhaarraacctteerr..

          Line:    Set to the last line written.
          Options: Affected by the ssccrroollll option.

     !! 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 "!""  cchhaarraacctteerr iiss ppaasssseedd
          ttoo  tthhee  pprrooggrraamm  nnaammeedd  bbyy tthhee sshheellll ooppttiioonn,, aass aa
          ssiinnggllee aarrgguummeenntt..

          WWiitthhiinn tthhee rreesstt ooff  tthhee  lliinnee,,  ""%%""  aanndd  ""##""  aarree
          eexxppaannddeedd iinnttoo tthhee ccuurrrreenntt aanndd aalltteerrnnaattee ppaatthhnnaammeess,,
          rreessppeeccttiivveellyy..  TThhee cchhaarraacctteerr ""!!""  iiss eexxppaannddeedd wwiitthh
          tthhee  ccoommmmaanndd  tteexxtt  ooff  tthhee  pprreevviioouuss  !!  ccoommmmaanndd..
          ((TThheerreeffoorree,, tthhee ccoommmmaanndd !!!!  rreeppeeaattss tthhee pprreevviioouuss !!
          ccoommmmaanndd..))   TThhee  ssppeecciiaall mmeeaanniinnggss ooff ""%%"",, ""##"",, aanndd
          ""!!""  ccaann bbee oovveerrrriiddddeenn bbyy  eessccaappiinngg  tthheemm  wwiitthh  aa
          bbaacckkssllaasshh..   IIff  nnoo !!  oorr ::!!  ccoommmmaanndd hhaass yyeett bbeeeenn
          eexxeeccuutteedd,, iitt iiss aann eerrrroorr ttoo uussee aann  uunneessccaappeedd  ""!!""
          cchhaarraacctteerr..   TThhee  !!   ccoommmmaanndd  ddooeess  _n_o_t  ddoo sshheellll
          eexxppaannssiioonn oonn tthhee ssttrriinnggss  pprroovviiddeedd  aass  aarrgguummeennttss..
          IIff  aannyy ooff tthhee aabboovvee eexxppaannssiioonnss cchhaannggee tthhee ccoommmmaanndd
          tthhee uusseerr eenntteerreedd,, tthhee ccoommmmaanndd  iiss  rreeddiissppllaayyeedd  aatt
          tthhee bboottttoomm ooff tthhee ssccrreeeenn..

          EExx  tthheenn  eexxeeccuutteess  tthhee pprrooggrraamm nnaammeedd bbyy tthhee sshheellll
          ooppttiioonn,, wwiitthh aa --cc ffllaagg ffoolllloowweedd bbyy  tthhee  aarrgguummeennttss
          ((wwhhiicchh aarree bbuunnddlleedd iinnttoo aa ssiinnggllee aarrgguummeenntt))..

          TThhee !!  ccoommmmaanndd iiss ppeerrmmiitttteedd iinn aann eemmppttyy ffiillee..











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))


          IIff  tthhee  ffiillee  hhaass bbeeeenn mmooddiiffiieedd ssiinnccee iitt wwaass llaasstt
          ccoommpplleetteellyy wwrriitttteenn,, tthhee ccoommmmaanndd wwiillll wwaarrnn yyoouu..

          AA ssiinnggllee ""!!""  cchhaarraacctteerr iiss ddiissppllaayyeedd wwhheenn tthhee ccoomm--
          mmaanndd ccoommpplleetteess..

          IInn  tthhee sseeccoonndd ffoorrmm ooff tthhee !!  ccoommmmaanndd,, tthhee rreemmaaiinn--
          ddeerr ooff tthhee lliinnee aafftteerr tthhee ""!!""  iiss  ppaasssseedd  ttoo  tthhee
          pprrooggrraamm  nnaammeedd  bbyy  tthhee sshheellll ooppttiioonn,, aass ddeessccrriibbeedd
          aabboovvee..  TThhee ssppeecciiffiieedd lliinneess aarree ppaasssseedd ttoo tthhee pprroo--
          ggrraamm aass ssttaannddaarrdd iinnppuutt,, aanndd tthhee ssttaannddaarrdd aanndd ssttaann--
          ddaarrdd eerrrroorr oouuttppuutt ooff tthhee pprrooggrraamm rreeppllaaccee tthhee oorriigg--
          iinnaall lliinneess..

          Line:    Unchanged if no range was specified, oth-
                   erwise set  to  the  first  line  of  the
                   range.
          Options: Affected by the sshheellll and wwaarrnn options.

     [[rraannggee]] ## [[ccoouunntt]] [[ffllaaggss]]
     [[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]]
          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: Affected by the lliisstt option.

     @@ 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 "@"" oorr
          ""**", 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
          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,










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


                   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 of line ((wwhhiicchh ddeeffaauullttss ttoo
          tthhee llaasstt lliinnee iinn tthhee ffiillee))..

          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 ">"" iiss rreeppeeaatteedd mmoorree tthhaann
          oonnccee,, tthhee ccoommmmaanndd iiss rreeppeeaatteedd oonnccee ffoorr eeaacchh  aaddddii--
          ttiioonnaall ccoommmmaanndd cchhaarraacctteerr..

          Line:    Set to the last line modified by the com-
                   mand.
          Options: Affected by the sshhiiffttwwiiddtthh option.

     aabb[[bbrreevv]] llhhss rrhhss
          Add an abbreviation to  the  current  abbreviation
          list.  When inserting text in vvii, each time a non-
          word character is entered after a word  character,
          a  set  of characters ending at the word character
          are checked for a match with lhs..  IIff aa  mmaattcchh  iiss
          ffoouunndd,,  tthheeyy  aarree  rreeppllaacceedd  wwiitthh rrhhss.  The set of
          characters  that  are  checked  for  a  match  are
          defined  as  follows,  for inexplicable historical
          reasons.  If  only  one  or  two  characters  were
          entered  before  the non-word character that trig-
          gered the check, and after the  beginning  of  the
          insertion,  or  the  beginning  of the line or the
          file, or  the  last  <blank>  cchhaarraacctteerr  tthhaatt  wwaass
          eenntteerreedd,,  tthheenn  tthhee oonnee oorr tthhee bbootthh cchhaarraacctteerrss aarree
          cchheecckkeedd ffoorr aa mmaattcchh..  OOtthheerrwwiissee,, tthhee sseett  iinncclluuddeess
          bbootthh  cchhaarraacctteerrss,,  aass  wweellll aass tthhee cchhaarraacctteerrss tthhaatt
          pprreecceeddee tthheemm tthhaatt aarree tthhee ssaammee  wwoorrdd  ccllaassss  ((ii..ee..
          wwoorrdd  oorr nnoonn--wwoorrdd)) aass tthhee sseeccoonndd ttoo llaasstt cchhaarraacctteerr
          eenntteerreedd bbeeffoorree tthhee nnoonn--wwoorrdd cchhaarraacctteerr  tthhaatt  ttrriigg--
          ggeerreedd  tthhee cchheecckk,, bbaacckk ttoo tthhee ffiirrsstt <<bbllaannkk>>cchhaarraacc--
          tteerr,, tthhee bbeeggiinnnniinngg ooff tthhee iinnsseerrttiioonn,, oorr tthhee bbeeggiinn--
          nniinngg ooff tthhee lliinnee oorr tthhee ffiillee..

          FFoorr eexxaammppllee,, tthhee aabbbbrreevviiaattiioonnss::












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))


          ::aabbbbrreevviiaattee   aabbcc    AABBCC
          ::aabbbbrreevviiaattee   ##ii     ##iinncclluuddee
          ::aabbbbrreevviiaattee   //**##ii   //**##iinncclluuddee

          will all work, while the abbreviations:


          :abbreviate   a#i   A#include
          :abbreviate   /*    /********************

          will not work, and are not permitted by nnvvii.

          To keep the abbreviation expansion from happening,
          the character immediately following the lhs  cchhaarr--
          aacctteerrss  sshhoouulldd  bbee  qquuootteedd  wwiitthh  aa <<lliitteerraall--nneexxtt>>
          character.

          The replacement rhs iiss iittsseellff ssuubbjjeecctt ttoo bbootthh ffuurr--
          tthheerr aabbbbrreevviiaattiioonn eexxppaannssiioonn aanndd ffuurrtthheerr mmaapp eexxppaann--
          ssiioonn..

          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
          input.   If  no lines are input, then set to line,,
          oorr ttoo tthhee ffiirrsstt lliinnee ooff tthhee ffiillee iiff aa  lliinnee  of  0
          was  specified.  Following the command name with a
          "!""  cchhaarraacctteerr ccaauusseess tthhee aauuttooiinnddeenntt ooppttiioonn ttoo  bbee
          ttoogggglleedd ffoorr tthhee dduurraattiioonn ooff tthhee ccoommmmaanndd..

          Line:    Unchanged.
          Options: Affected  by  the  aauuttooiinnddeenntt  and nnuummbbeerr
                   options.

     aarr[[ggss]]
          Display the argument list.  The  current  argument
          is  displayed  inside  of  "["" aanndd ""]]" 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.  The
          screen  is  unchanged, but is no longer accessible
          and disappears  from  the  display.   Use  the  ffgg











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


          command  to  bring  the screen back to the display
          foreground.

          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  "!""   cchhaarraacctteerr  ccaauusseess  tthhee
          aauuttooiinnddeenntt  ooppttiioonn  ttoo bbee ttoogggglleedd ffoorr tthhee dduurraattiioonn
          ooff tthhee ccoommmmaanndd..

          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auuttooiinnddeenntt  and  nnuummbbeerr
                   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 direc-
          tory aarrgguummeenntt iiss ssuubbjjeecctteedd ttoo  _s_h((11))  wwoorrdd  eexxppaann--
          ssiioonnss..   WWhheenn  iinnvvookkeedd  wwiitthh nnoo ddiirreeccttoorryy aarrgguummeenntt
          aanndd tthhee HHOOMMEE  _e_n_v_i_r_o_n_m_e_n_t  _v_a_r_i_a_b_l_e  _i_s  _s_e_t_,  _t_h_e
          _d_i_r_e_c_t_o_r_y  _n_a_m_e_d  _b_y _t_h_e _H_O_M_E eennvviirroonnmmeenntt vvaarriiaabbllee
          bbeeccoommeess tthhee nneeww ccuurrrreenntt ddiirreeccttoorryy..  OOtthheerrwwiissee,, tthhee
          nneeww   ccuurrrreenntt   ddiirreeccttoorryy  bbeeccoommeess  tthhee  ddiirreeccttoorryy
          rreettuurrnneedd bbyy tthhee _g_e_t_p_w_e_n_t((33)) rroouuttiinnee..

          TThhee cchhddiirr ccoommmmaanndd wwiillll ffaaiill iiff tthhee ffiillee  hhaass  bbeeeenn
          mmooddiiffiieedd  ssiinnccee  tthhee  llaasstt  ccoommpplleettee  wwrriittee ooff tthhee
          ffiillee..  YYoouu ccaann oovveerrrriiddee tthhiiss cchheecckk bbyy aappppeennddiinngg  aa
          ""!!""  cchhaarraacctteerr ttoo tthhee ccoommmmaanndd..

          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










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 is followed by a letter that could be
          interpreted  as  either  a  buffer  name or a flag
          value (because neither a  count  oorr  ffllaaggss  values
          were given), eexx treats the letter as a flags vvaalluuee
          iiff tthhee  lleetttteerr  iimmmmeeddiiaatteellyy  ffoolllloowwss  tthhee  ccoommmmaanndd
          nnaammee,,  wwiitthhoouutt  aannyy wwhhiitteessppaaccee sseeppaarraattiioonn..  IIff tthhee
          lleetttteerr iiss pprreecceeddeedd bbyy  wwhhiitteessppaaccee  cchhaarraacctteerrss,,  iitt
          ttrreeaattss iitt aass aa bbuuffffeerr nnaammee..

          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]] || cc[[oonnnneeccttiioonnss]] || ss[[ccrreeeennss]] ||
          tt[[aaggss]]
          Display buffers, ccssccooppee  connections,  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.
          c[onnections]
                   Display the source  directories  for  all
                   attached ccssccooppee databases.
          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]]
     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 "!""  cchhaarraacctteerr ttoo tthhee ccoommmmaanndd nnaammee..

          IIff tthhee ""++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.

          Capitalizing the first letter of the command, i.e.
          EEddiitt  or  EExx, while in vvii mode, will edit the file
          in a new screen.  In this case, any  modifications
          to the current file are ignored.












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


          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: None.

     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  command  iiss
          ssppeecciiffiieedd,,  aa  uussaaggee ssttaatteemmeenntt ffoorr tthhaatt ccoommmmaanndd iiss
          ddiissppllaayyeedd..  OOtthheerrwwiissee,, uussaaggee ssttaatteemmeennttss ffoorr aallll eexx
          ccoommmmaannddss aarree ddiissppllaayyeedd..

          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.
          If the argument name  doesn't  exactly  match  the
          name  of  a file displayed by a background screen,
          it is compared against the last component of  each
          of  the  file  names.   If no background screen is
          specified, the first background  screen  is  fore-
          grounded.

          By   default,  foregrounding  causes  the  current
          screen to be swapped with the backgrounded screen.
          Capitalizing the first letter of the command, i.e.
          FFgg, will foreground the backgrounded screen  in  a
          new screen instead of swapping it with the current
          screen.

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

     [[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










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))


          match  ("g[lobal]"")),,  oorr  ddoo  nnoott  mmaattcchh ((""vv") the
          given pattern are selected.  Then,  the  specified
          eexx  command(s)  are executed with the current line
          (".""))  sseett ttoo eeaacchh sseelleecctteedd lliinnee..  IIff nnoo rraannggee  iiss
          ssppeecciiffiieedd,,  tthhee eennttiirree ffiillee iiss sseeaarrcchheedd ffoorr mmaattcchh--
          iinngg,, oorr nnoott mmaattcchhiinngg,, lliinneess..

          MMuullttiippllee ccoommmmaannddss ccaann bbee ssppeecciiffiieedd,, oonnee ppeerr  lliinnee,,
          bbyy  eessccaappiinngg eeaacchh <<nneewwlliinnee>> character with a back-
          slash, or by separating commands with a "|""  cchhaarr--
          aacctteerr..   IIff nnoo ccoommmmaannddss aarree ssppeecciiffiieedd,, tthhee ccoommmmaanndd
          ddeeffaauullttss ttoo tthhee pprriinntt ccoommmmaanndd..

          FFoorr tthhee aappppeenndd,, cchhaannggee aanndd  iinnsseerrtt  ccoommmmaannddss,,  tthhee
          iinnppuutt  tteexxtt  mmuusstt  bbee  ppaarrtt  ooff tthhee gglloobbaall ccoommmmaanndd
          lliinnee..  IInn tthhiiss ccaassee,, tthhee tteerrmmiinnaattiinngg ppeerriioodd ccaann bbee
          oommiitttteedd iiff iitt eennddss tthhee ccoommmmaannddss..

          TThhee vviissuuaall ccoommmmaanndd mmaayy aallssoo bbee ssppeecciiffiieedd aass oonnee ooff
          tthhee eexx ccoommmmaannddss..  IInn tthhiiss  mmooddee,,  iinnppuutt  iiss  ttaakkeenn
          ffrroomm  tthhee  tteerrmmiinnaall..   EEnntteerriinngg  aa QQ ccoommmmaanndd iinn vvii
          mmooddee ccaauusseess tthhee nneexxtt lliinnee mmaattcchhiinngg tthhee ppaatttteerrnn  ttoo
          bbee sseelleecctteedd aanndd vvii ttoo bbee rreeeenntteerreedd,, uunnttiill tthhee lliisstt
          iiss eexxhhaauusstteedd..

          TThhee gglloobbaall,, vv aanndd uunnddoo ccoommmmaannddss ccaannnnoott bbee uusseedd  aass
          ppaarrtt ooff tthheessee ccoommmmaannddss..

          TThhee   eeddiittoorr  ooppttiioonnss  aauuttooiinnddeenntt,,  aauuttoopprriinntt  aanndd
          rreeppoorrtt aarree ttuurrnneedd ooffff  ffoorr  tthhee  dduurraattiioonn  ooff  tthhee
          gglloobbaall aanndd vv ccoommmmaannddss..

          Line:    The last line modified.
          Options: Affected  by  the  iiggnnoorreeccaassee  and  mmaaggiicc
                   options.  Turns off the aauuttooiinnddeenntt, aauuttoo--
                   pprriinntt and rreeppoorrtt options.

     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  "!""
          cchhaarraacctteerr  ccaauusseess tthhee aauuttooiinnddeenntt ooppttiioonn sseettttiinngg ttoo
          bbee ttoogggglleedd ffoorr tthhee dduurraattiioonn ooff tthhiiss ccoommmmaanndd..

          Line:    Set to the last line input; 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










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


                   target line.  Affected by the  aauuttooiinnddeenntt
                   and nnuummbbeerr 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  count  ssppeecciiffiieedd  ttoo tthhee ccoommmmaanndd ssppeecciiffiieess tthhaatt
          tthhee llaasstt lliinnee ooff tthhee rraannggee plus  count  ssuubbsseeqquueenntt
          lliinneess  wwiillll bbee jjooiinneedd..  ((NNoottee,, tthhiiss ddiiffffeerrss bbyy oonnee
          ffrroomm tthhee ggeenneerraall rruullee wwhheerree oonnllyy 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 ("("")),, ddoo nnootthhiinngg..  OOtthheerrwwiissee,, iiff
          tthhee  ccuurrrreenntt lliinnee eennddss wwiitthh aa qquueessttiioonn mmaarrkk ((""??"),
          period (".""))  oorr eexxccllaammaattiioonn ppooiinntt  ((""!!"),  insert
          two spaces.  Otherwise, insert a single space.

          Appending  a  "!""   cchhaarraacctteerr  ttoo tthhee ccoommmmaanndd nnaammee
          ccaauusseess aa ssiimmpplleerr jjooiinn wwiitthh nnoo wwhhiittee--ssppaaccee pprroocceessss--
          iinngg..

          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"",, aanndd tthhee eenndd ooff tthhee lliinnee iiss  mmaarrkkeedd
          wwiitthh aa ""$$" character.

          Line:    Set to the last line displayed.
          Options: Affected by the nnuummbbeerr option.

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

          If  "lhs"" aanndd ""rrhhss" are not specified, the current
          set of command mode maps are displayed.  If a  "!""
          cchhaarraacctteerr  iiss aappppeennddeedd ttoo ttoo tthhee ccoommmmaanndd,, tthhee tteexxtt
          iinnppuutt mmooddee mmaappss aarree ddiissppllaayyeedd..

          OOtthheerrwwiissee,, wwhheenn tthhee ""llhhss"  character  sequence  is
          entered in vvii, the action is as if the correspond-
          ing "rhs"" hhaadd bbeeeenn eenntteerreedd..  IIff a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 "lhs""
          ttoo hhaavvee ttwwoo ddiiffffeerreenntt  mmaaccrroo  ddeeffiinniittiioonnss  aatt  tthhee
          ssaammee  ttiimmee:: oonnee ffoorr ccoommmmaanndd mmooddee aanndd oonnee ffoorr iinnppuutt
          mmooddee..











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 ((EExx CCoommmmaannddss))


          WWhhiitteessppaaccee  cchhaarraacctteerrss  rreeqquuiirree  eessccaappiinngg  wwiitthh  aa
          <<lliitteerraall--nneexxtt>>  character to be entered in the lhs
          ssttrriinngg iinn vviissuuaall mmooddee..

          NNoorrmmaallllyy,, kkeeyyss iinn tthhee 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  ":map  n  nz.""  mmaappss tthhee ""nn" key to the nn
          and zz commands.

          To exit an infinitely looping map, use the  termi-
          nal <interrupt> cchhaarraacctteerr..

          Line:    Unchanged.
          Options: Affected by the rreemmaapp option.

     [[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 <character>..  TThhee
          eexxpprreessssiioonnss ""''<<cchhaarraacctteerr>>" and "`<character>""  ccaann
          tthheenn  bbee  uusseedd  aass  aann aaddddrreessss iinn aannyy ccoommmmaanndd tthhaatt
          uusseess oonnee..

          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 file aallrreeaaddyy eexxiissttss,, tthhee
          mmkkeexxrrcc ccoommmmaanndd wwiillll ffaaiill..  TThhiiss cchheecckk ccaann bbee oovveerr--
          rriiddddeenn  bbyy  aappppeennddiinngg aa ""!!""  cchhaarraacctteerr ttoo tthhee ccoomm--
          mmaanndd..

          Line:    Unchanged.
          Options: None.

     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 "!""  cchhaarraacctteerr










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--7711


          ttoo  tthhee  ccoommmmaanndd  nnaammee..   TThhee  aarrgguummeenntt  lliisstt  ccaann
          ooppttiioonnaallllyy  bbee rreeppllaacceedd bbyy ssppeecciiffyyiinngg aa nneeww oonnee aass
          aarrgguummeennttss ttoo tthhiiss ccoommmmaanndd..  IInn tthhiiss ccaassee,,  eeddiittiinngg
          ssttaarrttss wwiitthh tthhee ffiirrsstt ffiillee oonn tthhee nneeww lliisstt..

          CCaappiittaalliizziinngg tthhee ffiirrsstt lleetttteerr ooff tthhee ccoommmmaanndd,, ii..ee..
          NNeexxtt,, wwhhiillee iinn vvii mmooddee,, wwiillll sseett tthhee aarrgguummeenntt lliisstt
          aanndd  eeddiitt tthhee ffiillee iinn aa nneeww ssccrreeeenn..  IInn tthhiiss ccaassee,,
          aannyy mmooddiiffiiccaattiioonnss ttoo tthhee ccuurrrreenntt ffiillee aarree iiggnnoorreedd..

          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  "!""
          cchhaarraacctteerr ttoo tthhee ccoommmmaanndd nnaammee..

          CCaappiittaalliizziinngg tthhee ffiirrsstt lleetttteerr ooff tthhee ccoommmmaanndd,, ii..ee..
          PPrreevviioouuss,, wwhhiillee iinn vvii mmooddee,, wwiillll eeddiitt tthhee ffiillee  iinn
          aa  nneeww ssccrreeeenn..  IInn tthhiiss ccaassee,, aannyy mmooddiiffiiccaattiioonnss ttoo
          tthhee ccuurrrreenntt ffiillee aarree iiggnnoorreedd..

          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.












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 ((EExx CCoommmmaannddss))


     [[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: Affected by the lliisstt and nnuummbbeerr option.

     [[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 "!""  cchhaarraacctteerr ttoo tthhee ccoommmmaanndd..

          IIff  tthheerree aarree mmoorree ffiilleess ttoo eeddiitt,, tthhee qquuiitt ccoommmmaanndd
          wwiillll ffaaiill..  AAppppeennddiinngg aa ""!!""  cchhaarraacctteerr ttoo tthhee ccoomm--
          mmaanndd nnaammee oorr eenntteerriinngg ttwwoo qquuiitt ccoommmmaannddss ((ii..ee..  wwqq,,
          qquuiitt,, xxiitt oorr ZZZZ)) iinn  aa  rrooww))  wwiillll  oovveerrrriiddee  tthhiiss
          cchheecckk aanndd tthhee eeddiittoorr wwiillll eexxiitt..

          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 line iiss 00,, tthhee  ccooppyy  iiss
          iinnsseerrtteedd aatt tthhee bbeeggiinnnniinngg ooff tthhee ffiillee..  IIff nnoo ffiillee
          iiss ssppeecciiffiieedd,, tthhee ccuurrrreenntt ffiillee iiss rreeaadd;;  iiff  tthheerree
          iiss  nnoo ccuurrrreenntt ffiillee,, tthheenn ffiillee becomes the current
          file.  If there is no current file and no file  iiss
          ssppeecciiffiieedd,, tthheenn tthhee rreeaadd ccoommmmaanndd wwiillll ffaaiill..

          IIff  ffiillee  iiss pprreecceeddeedd bbyy aa ""!!""  cchhaarraacctteerr,, ffiillee iiss
          ttrreeaatteedd aass iiff iitt wweerree aa sshheellll ccoommmmaanndd,, aanndd  ppaasssseedd
          ttoo  tthhee  pprrooggrraamm  nnaammeedd  bbyy tthhee sshheellll eeddiitt ooppttiioonn..
          TThhee ssttaannddaarrdd aanndd ssttaannddaarrdd eerrrroorr  oouuttppuuttss  ooff  tthhaatt
          ccoommmmaanndd aarree rreeaadd iinnttoo tthhee ffiillee aafftteerr tthhee ssppeecciiffiieedd
          lliinnee..  TThhee ssppeecciiaall mmeeaanniinngg ooff tthhee  ""!!""   cchhaarraacctteerr
          ccaann  bbee oovveerrrriiddddeenn bbyy eessccaappiinngg iitt wwiitthh aa bbaacckkssllaasshh
          ((""\\"")) cchhaarraacctteerr..

          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.











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--7733


          Options: None.

     rreecc[[oovveerr]] ffiillee
          Recover  file  iiff  iitt wwaass pprreevviioouussllyy ssaavveedd..  IIff nnoo
          ssaavveedd ffiillee bbyy tthhaatt nnaammee eexxiissttss,, tthhee  rreeccoovveerr  ccoomm--
          mmaanndd bbeehhaavveess eeqquuiivvaalleennttllyy ttoo tthhee eeddiitt ccoommmmaanndd..

          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 size iiss aa ppoossiittiivvee,, ssiiggnneedd nnuummbbeerr,, tthhee  ccuurrrreenntt
          ssccrreeeenn  iiss ggrroowwnn bbyy tthhaatt mmaannyy lliinneess..  IIff ssiizzee is a
          negative, signed number,  the  current  screen  is
          shrunk by that many lines.  If size iiss nnoott ssiiggnneedd,,
          tthhee ccuurrrreenntt ssccrreeeenn iiss sseett ttoo tthhee  ssppeecciiffiieedd  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 "!""  cchhaarraacctteerr ttoo tthhee ccoomm--
          mmaanndd..

          OOtthheerrwwiissee,,  tthhee  ccuurrrreenntt  ffiillee iiss sseett ttoo tthhee ffiirrsstt
          ffiillee iinn tthhee aarrgguummeenntt lliisstt..

          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.

          [[aallll]]
     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??
          ......]]
          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 all iiss ssppeecciiffiieedd,, tthhee vvaalluueess ooff aallll ooff eeddiittoorr
          ooppttiioonnss aarree ddiissppllaayyeedd..

          SSppeecciiffyyiinngg aann ooppttiioonn nnaammee ffoolllloowweedd bbyy tthhee  cchhaarraacc--
          tteerr  ""??"   causes the current value of that option
          to be displayed.  The "?""  ccaann bbee  sseeppaarraatteedd  ffrroomm
          tthhee ooppttiioonn nnaammee bbyy wwhhiitteessppaaccee cchhaarraacctteerrss..  TThhee ""??"
          is necessary  only  for  Boolean  valued  options.
          Boolean  options  can  be given values by the form
          "set option"" ttoo ttuurrnn tthheemm oonn,, oorr ""sseett nnooooppttiioonn" to










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 ((EExx CCoommmmaannddss))


          turn  them off.  String and numeric options can be
          assigned by  the  form  "set  option=value""..   AAnnyy
          wwhhiitteessppaaccee  cchhaarraacctteerrss  iinn ssttrriinnggss ccaann bbee iinncclluuddeedd
          lliitteerraallllyy bbyy  pprreecceeddiinngg  eeaacchh  wwiitthh  aa  bbaacckkssllaasshh..
          MMoorree  tthhaann  oonnee  ooppttiioonn  ccaann bbee sseett oorr lliisstteedd bbyy aa
          ssiinnggllee sseett ccoommmmaanndd,, bbyy ssppeecciiffyyiinngg  mmuullttiippllee  aarrgguu--
          mmeennttss,,  eeaacchh sseeppaarraatteedd ffrroomm tthhee nneexxtt bbyy wwhhiitteessppaaccee
          cchhaarraacctteerrss..

          Line:    Unchanged.
          Options: None.

     sshh[[eellll]]
          Run the 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: Affected by the sshheellll option.

     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.

          [[ffllaaggss]]
     [[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]]
     [[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
          pattern  wwiitthh  tthhee ssttrriinngg rreeppllaaccee on the specified
          line(s).  If the "/pattern/repl/"" aarrgguummeenntt iiss  nnoott
          ssppeecciiffiieedd,,  tthhee ""//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.  Any  character  other
          than  an alphabetic, numeric, <blank> or backslash
          character may be used as the delimiter.

          If options iinncclluuddeess tthhee lleetttteerr ""cc" (confirm),  you
          will  be  prompted  for  confirmation  before each
          replacement is done.  An affirmative response  (in
          English,  a  "y"" cchhaarraacctteerr)) ccaauusseess tthhee rreeppllaacceemmeenntt
          ttoo bbee mmaaddee..  AA qquuiitt rreessppoonnssee ((iinn  EEnngglliisshh,,  a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 options iinncclluuddeess tthhee lleetttteerr
          ""gg" (global), all nonoverlapping instances of pat-
          tern iinn tthhee lliinnee aarree rreeppllaacceedd..

          TThhee && vveerrssiioonn ooff tthhee ccoommmmaanndd iiss tthhee  ssaammee  aass  nnoott










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--7755


          ssppeecciiffyyiinngg  aa ppaatttteerrnn oorr rreeppllaacceemmeenntt ssttrriinngg ttoo tthhee
          ssuubbssttiittuuttee ccoommmmaanndd,, aanndd tthhee ""&&"" iiss rreeppllaacceedd bbyy tthhee
          ppaatttteerrnn  aanndd rreeppllaacceemmeenntt iinnffoorrmmaattiioonn ffrroomm tthhee pprree--
          vviioouuss ssuubbssttiittuuttee ccoommmmaanndd..

          TThhee ~~ vveerrssiioonn ooff tthhee ccoommmmaanndd iiss tthhee ssaammee aass &&  aanndd
          ss,, eexxcceepptt tthhaatt tthhee sseeaarrcchh ppaatttteerrnn uusseedd iiss tthhee llaasstt
          RREE uusseedd iinn _a_n_y ccoommmmaanndd,, nnoott  nneecceessssaarriillyy  tthhee  oonnee
          uusseedd iinn tthhee llaasstt ssuubbssttiittuuttee ccoommmmaanndd..

          FFoorr eexxaammppllee,, iinn tthhee sseeqquueennccee

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

          the "~"" iiss eeqquuiivvaalleenntt ttoo ""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: Affected  by  the  iiggnnoorreeccaassee  and  mmaaggiicc
                   option.

     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 "!""   cchhaarr--
          aacctteerr  ttoo  tthheessee  ccoommmmaannddss ttuurrnnss ooffff tthhee aauuttoowwrriittee
          ooppttiioonn ffoorr tthhee ccoommmmaanndd..

          Line:    Unchanged.
          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a[[gg]][[!!]] ttaaggssttrriinngg
          Edit  the  file  containing the specified tag.  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 "!""  cchhaarraacctteerr ttoo tthhee ccoommmmaanndd  nnaammee..

          TThhee ttaagg ccoommmmaanndd sseeaarrcchheess ffoorr ttaaggssttrriinngg iinn tthhee ttaaggss
          ffiillee((ss)) ssppeecciiffiieedd bbyy tthhee  ooppttiioonn..   ((SSeeee  _c_t_a_g_s((11))
          ffoorr mmoorree iinnffoorrmmaattiioonn oonn ttaaggss ffiilleess..))

          CCaappiittaalliizziinngg tthhee ffiirrsstt lleetttteerr ooff tthhee ccoommmmaanndd,, ii..ee..
          TTaagg,, wwhhiillee iinn vvii mmooddee,, wwiillll eeddiitt tthhee ffiillee iinn aa nneeww
          ssccrreeeenn..   IInn  tthhiiss  ccaassee,, aannyy mmooddiiffiiccaattiioonnss ttoo tthhee










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 ((EExx CCoommmmaannddss))


          ccuurrrreenntt ffiillee aarree iiggnnoorreedd..

          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gnn[[eexxtt]][[!!]]
          Edit  the file containing the next context for the
          current tag.  If the context  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gnneexxtt command will fail.  This check
          can be overridden by appending the "!""   cchhaarraacctteerr
          ttoo tthhee ccoommmmaanndd nnaammee..

          CCaappiittaalliizziinngg tthhee ffiirrsstt lleetttteerr ooff tthhee ccoommmmaanndd,, ii..ee..
          TTaaggnneexxtt,, wwhhiillee iinn vvii mmooddee,, wwiillll eeddiitt tthhee ffiillee iinn aa
          nneeww  ssccrreeeenn..   IInn  tthhiiss ccaassee,, aannyy mmooddiiffiiccaattiioonnss ttoo
          tthhee ccuurrrreenntt ffiillee aarree iiggnnoorreedd..

          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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 file oorr 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 file oorr 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 "!""   cchhaarr--
          aacctteerr ttoo tthhee ccoommmmaanndd nnaammee..

          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gpp[[rreevv]][[!!]]
          Edit the file containing the previous context  for
          the current tag.  If the context 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gpprreevv command will fail.  This  check
          can  be overridden by appending the "!""  cchhaarraacctteerr
          ttoo tthhee ccoommmmaanndd nnaammee..

          CCaappiittaalliizziinngg tthhee ffiirrsstt lleetttteerr ooff tthhee ccoommmmaanndd,, ii..e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--7777


          TTaaggpprreevv,, wwhhiillee iinn vvii mmooddee,, wwiillll eeddiitt tthhee ffiillee iinn aa
          nneeww ssccrreeeenn..  IInn tthhiiss ccaassee,,  aannyy  mmooddiiffiiccaattiioonnss  ttoo
          tthhee ccuurrrreenntt ffiillee aarree iiggnnoorreedd..

          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gttoopp command will  fail.   This
          check  may be overridden by appending a "!""  cchhaarr--
          aacctteerr ttoo tthhee ccoommmmaanndd nnaammee..

          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 lhs ffrroomm tthhee ccuurr--
          rreenntt lliisstt ooff aabbbbrreevviiaattiioonnss..

          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
          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 lhs..  IIff a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  type  iiss  ooppttiioonnaall,,










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 ((EExx CCoommmmaannddss))


          aanndd  ccaann  bbee  ""--", "+"" oorr ""^^", as in the eexx zz com-
          mand, to specify 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  count  ssppeecciiffiieess  tthhee nnuummbbeerr ooff lliinneess tthhaatt wwiillll
          iinniittiiaallllyy bbee ddiissppllaayyeedd..  ((TThhee ddeeffaauulltt iiss tthhee vvaalluuee
          ooff tthhee wwiinnddooww eeddiittoorr ooppttiioonn..))

          Line:    Unchanged  unless  line  iiss ssppeecciiffiieedd,, iinn
                   wwhhiicchh ccaassee iitt iiss sseett ttoo tthhaatt lliinnee..
          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
          "edit[!] [+cmd] [file]"" ccoommmmaanndd..

          CCaappiittaalliizziinngg tthhee ffiirrsstt lleetttteerr ooff tthhee ccoommmmaanndd,, ii..ee..
          VViissuuaall,, wwiillll eeddiitt tthhee ffiillee iinn aa  nneeww  ssccrreeeenn..   IInn
          tthhiiss  ccaassee,,  aannyy mmooddiiffiiccaattiioonnss ttoo tthhee ccuurrrreenntt ffiillee
          aarree iiggnnoorreedd..

     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  command  iiss
          ssppeecciiffiieedd,,  aa  uussaaggee ssttaatteemmeenntt ffoorr tthhaatt ccoommmmaanndd iiss
          ddiissppllaayyeedd..  OOtthheerrwwiissee,, uussaaggee ssttaatteemmeennttss ffoorr aallll vvii
          ccoommmmaannddss aarree ddiissppllaayyeedd..

          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  file..
          IIff  ffiillee is not specified, the current pathname is
          used.  If file iiss ssppeecciiffiieedd,, aanndd iitt eexxiissttss,, oorr  iiff
          tthhee  ccuurrrreenntt  ppaatthhnnaammee wwaass sseett uussiinngg tthhee ffiillee ccoomm--
          mmaanndd,, aanndd tthhee ffiillee aallrreeaaddyy eexxiissttss,, tthheessee  ccoommmmaannddss
          wwiillll ffaaiill..  AAppppeennddiinngg aa ""!!""  cchhaarraacctteerr ttoo tthhee ccoomm--
          mmaanndd nnaammee wwiillll oovveerrrriiddee tthhiiss cchheecckk aanndd  tthhee  wwrriittee
          wwiillll bbee aatttteemmpptteedd,, rreeggaarrddlleessss..

          SSppeecciiffyyiinngg tthhee ooppttiioonnaall "">>>>"" ssttrriinngg wwiillll ccaauussee tthhee
          wwrriittee ttoo bbee aappppeennddeedd ttoo tthhee ffiillee,, iinn wwhhiicchh ccaassee nnoo
          tteessttss aarree mmaaddee ffoorr tthhee ffiillee aallrreeaaddyy eexxiissttiinngg..

          IIff  tthhee  ffiillee iiss pprreecceeddeedd bbyy aa ""!!""  cchhaarraacctteerr,, tthhee
          pprrooggrraamm nnaammeedd bbyy tthhee sshheellll eeddiitt ooppttiioonn iiss  iinnvvookkeedd
          wwiitthh  ffiillee  aass iittss sseeccoonndd aarrgguummeenntt,, aanndd tthhee ssppeeccii--
          ffiieedd lliinneess aarree ppaasssseedd aass ssttaannddaarrdd  iinnppuutt  ttoo  tthhaatt
          ccoommmmaanndd..  TThhee ""!!""  iinn tthhiiss uussaaggee mmuusstt bbee sseeppaarraatteedd










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--7799


          ffrroomm ccoommmmaanndd nnaammee bbyy aatt lleeaasstt oonnee wwhhiitteessppaaccee cchhaarr--
          aacctteerr..   TThhee  ssppeecciiaall  mmeeaanniinngg  ooff tthhee ""!!""  mmaayy bbee
          oovveerrrriiddddeenn bbyy eessccaappiinngg iitt wwiitthh aa  bbaacckkssllaasshh  ((""\\""))
          cchhaarraacctteerr..

          TThhee  wwqq vveerrssiioonn ooff tthhee wwrriittee ccoommmmaanndd wwiillll eexxiitt tthhee
          eeddiittoorr aafftteerr wwrriittiinngg tthhee ffiillee,,  iiff  tthheerree  aarree  nnoo
          ffuurrtthheerr ffiilleess ttoo eeddiitt..  AAppppeennddiinngg aa ""!!""  cchhaarraacctteerr
          ttoo tthhee ccoommmmaanndd nnaammee oorr eenntteerriinngg  ttwwoo  ""qquuiitt""  ccoomm--
          mmaannddss  ((ii..ee..   wwqq,, qquuiitt,, xxiitt oorr ZZZZ)) iinn aa rrooww)) wwiillll
          oovveerrrriiddee tthhiiss cchheecckk  aanndd  tthhee  eeddiittoorr  wwiillll  eexxiitt,,
          iiggnnoorriinngg  aannyy ffiilleess tthhaatt hhaavvee nnoott yyeett bbeeeenn eeddiitteedd..

          TThhee wwnn vveerrssiioonn ooff tthhee wwrriittee ccoommmmaanndd wwiillll  mmoovvee  ttoo
          tthhee  nneexxtt  ffiillee aafftteerr wwrriittiinngg tthhee ffiillee,, uunnlleessss tthhee
          wwrriittee ffaaiillss..

          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 file,, iiff tthhee  ffiillee  hhaass
          bbeeeenn mmooddiiffiieedd ssiinnccee tthhee llaasstt ccoommpplleettee wwrriittee ttoo aannyy
          ffiillee..  IIff nnoo 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 "!""  cchhaarraacctteerr ttoo tthhee ccoommmmaanndd nnaammee oorr
          eenntteerriinngg ttwwoo ""qquuiitt"" ccoommmmaannddss ((ii..ee..  wwqq,, qquuiitt,,  xxiitt
          oorr  ZZZZ)) iinn aa rrooww)) wwiillll oovveerrrriiddee tthhiiss cchheecckk aanndd tthhee
          eeddiittoorr wwiillll eexxiitt,, iiggnnoorriinngg aannyy ffiilleess tthhaatt hhaavvee nnoott
          yyeett bbeeeenn eeddiitteedd..

          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 type iiss ssppeecciiffiieedd,, tthheenn
          ccoouunntt lines following the specified line are  dis-
          played.   The  default  count  iiss tthhee vvaalluuee ooff tthhee
          wwiinnddooww ooppttiioonn..   TThhee  ttyyppee  aarrgguummeenntt  cchhaannggeess  tthhee
          ppoossiittiioonn  aatt wwhhiicchh lliinnee iiss ddiissppllaayyeedd oonn tthhee ssccrreeeenn










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 ((EExx CCoommmmaannddss))


          bbyy cchhaannggiinngg tthhee nnuummbbeerr ooff lliinneess  ddiissppllaayyeedd  bbeeffoorree
          aanndd aafftteerr lliinnee..  TThhee ffoolllloowwiinngg ttyyppee cchhaarraacctteerrss mmaayy
          bbee uusseedd::

          -        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 count * 2
                   lines before line; the net effect of this
                   is that a "z^" command following a zz com-
                   mand writes the previous page.
          =        Center line 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 type, where the current
                   line is set to the line specified by  the
                   command.
          Options: Affected by the ssccrroollll option.

     1188..  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
     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.

          With a few exceptions, all  options  are  settable
     per screen, i.e. the ttaaggss option can be set differently
     in each screen.  The exceptions are the ccoolluummnnss, lliinneess,
     sseeccuurree   and  tteerrmm  options.   Changing  these  options










NNvvii//NNeexx RReeffeerreennccee ((OOppttiioonnss))                        UUSSDD::1133--8811


     modifies the respective information for all screens.

          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 <escape>,, tthhee iinnddeenntt cchhaarraacctteerr wwiillll bbee ddeelleetteedd
          aanndd  tthhee  lliinnee wwiillll bbee eemmppttyy..  FFoorr eexxaammppllee,, iiff yyoouu
          eenntteerr <<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 <carriage-return> wwiillll
          nnoott hhaavvee aannyy cchhaarraacctteerrss iinn iitt,, rreeggaarrddlleessss  ooff  tthhee
          iinnddeennttaattiioonn ooff tthhee pprreevviioouuss oorr ssuubbsseeqquueenntt lliinnee..

          IInnddeenntt  cchhaarraacctteerrss  aallssoo  rreeqquuiirree  tthhaatt  yyoouu eenntteerr
          aaddddiittiioonnaall eerraassee cchhaarraacctteerrss ttoo ddeelleettee  tthheemm..   FFoorr
          eexxaammppllee,,  iiff yyoouu hhaavvee aann iinnddeenntteedd lliinnee,, ccoonnttaaiinniinngg
          oonnllyy bbllaannkkss,, tthhee ffiirrsstt <<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 <con-
          trol-D> kkeeyy wwoouulldd  eerraassee  tthhee  iinnddeenntt  cchhaarraacctteerrss..
          BBootthh  tthhee <<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










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 ((OOppttiioonnss))


          positioned  at  the  end of the indent characters,
          the keys "0<control-D>""  wwiillll  eerraassee  aallll  ooff  tthhee
          iinnddeenntt  cchhaarraacctteerrss ffoorr tthhee ccuurrrreenntt lliinnee,, rreesseettttiinngg
          tthhee iinnddeennttaattiioonn lleevveell ttoo 00..  SSiimmiillaarrllyy,,  tthhee  kkeeyyss
          ""^^<<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v  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  "!""
          ttoo  tthhee  eexx  ccoommmmaannddss 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,, aanndd ttaaggttoopp ssttooppss tthhee aauuttoommaattiicc  wwrriittee
          ffrroomm bbeeiinngg aatttteemmpptteedd..

          ((HHiissttoorriiccaallllyy,,   tthhee   nneexxtt  ccoommmmaanndd  iiggnnoorreedd  tthhee
          ooppttiioonnaall ffoorrccee ffllaagg..))  NNoottee,, tthhee eexx ccoommmmaannddss eeddiitt,,
          qquuiitt,,  sshheellll,,  aanndd  xxiitt  aarree  _n_o_t  aaffffeecctteedd bbyy tthhee
          aauuttoowwrriittee ooppttiioonn..

          TThhee aauuttoowwrriittee ooppttiioonn iiss iiggnnoorreedd  iiff  tthhee  ffiillee  iiss
          ccoonnssiiddeerreedd rreeaadd--oonnllyy ffoorr aannyy rreeaassoonn..

     bbaacckkuupp [[""""]]
          If  this  option  is  set, it specifies a pathname
          used as a backup file, and,  whenever  a  file  is
          written, the file's current contents are copied to
          it.  The pathname is "#"",, ""%%" and "!""  eexxppaannddeedd..

          IIff tthhee ffiirrsstt cchhaarraacctteerr ooff tthhee ppaatthhnnaammee iiss  ""NN",  a
          version  number  is  appended to the pathname (and
          the "N"" cchhaarraacctteerr  iiss  tthheenn  ddiissccaarrddeedd))..   VVeerrssiioonn
          nnuummbbeerrss  aarree  aallwwaayyss  iinnccrreemmeenntteedd,, aanndd eeaacchh bbaacckkuupp










NNvvii//NNeexx RReeffeerreennccee ((OOppttiioonnss))                        UUSSDD::1133--8833


          ffiillee wwiillll hhaavvee aa vveerrssiioonn nnuummbbeerr oonnee  ggrreeaatteerr  tthhaann
          tthhee  hhiigghheesstt vveerrssiioonn nnuummbbeerr ccuurrrreennttllyy ffoouunndd iinn tthhee
          ddiirreeccttoorryy..

          BBaacckkuupp ffiilleess mmuusstt bbee rreegguullaarr ffiilleess,, oowwnneedd  bbyy  tthhee
          rreeaall  uusseerr  IIDD ooff tthhee uusseerr rruunnnniinngg tthhee eeddiittoorr,, aanndd
          nnoott aacccceessssiibbllee bbyy aannyy ootthheerr uusseerr..

     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
          are  not  currently  being  specially interpreted,
          other than <tab>,, <<nneewwlliinnee>>, and <form-feed>,,  aarree
          ddiissccaarrddeedd ffrroomm ccoommmmaannddss rreeaadd iinn bbyy eexx ffrroomm ccoommmmaanndd
          ffiilleess,, aanndd ffrroomm iinnppuutt tteexxtt eenntteerreedd ttoo  vvii  ((eeiitthheerr
          iinnttoo tthhee ffiillee oorr ttoo tthhee ccoolloonn ccoommmmaanndd lliinnee))..  TTeexxtt
          ffiilleess rreeaadd bbyy eexx//vvii aarree _n_o_t aaffffeecctteedd bbyy tthhee  bbeeaauu--
          ttiiffyy ooppttiioonn..

     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  CDPATH  iiff  iitt  iiss sseett,, ootthheerrwwiissee ttoo tthhee
          ccuurrrreenntt ddiirreeccttoorryy..   FFoorr  ccoommppaattiibbiilliittyy  wwiitthh  tthhee
          PPOOSSIIXX  11000033..22 sshheellll,, tthhee ccdd ccoommmmaanndd ddooeess _n_o_t cchheecckk
          tthhee ccuurrrreenntt ddiirreeccttoorryy aass aa ppaatthh pprreeffiixx  ffoorr  rreellaa--
          ttiivvee ppaatthh nnaammeess uunnlleessss iitt iiss eexxpplliicciittllyy ssppeecciiffiieedd..
          IItt mmaayy bbee ssoo ssppeecciiffiieedd bbyy eenntteerriinngg aann eemmppttyy ssttrriinngg
          oorr  aa  "".._"   _c_h_a_r_a_c_t_e_r _i_n_t_o _t_h_e _C_D_P_A_T_H vvaarriiaabbllee oorr
          tthhee ooppttiioonn vvaalluuee..

     cceeddiitt [[nnoo ddeeffaauulltt]]
          This option adds the ability  to  edit  the  colon
          command-line  history.   This  option  is set to a
          string.  Whenever  the  first  character  of  that
          string  is  entered on the colon command line, you
          will enter a normal editing  window  on  the  col-
          lected  commands  that  you've  entered  on the vvii
          colon command-line.  You may  then  modify  and/or
          execute  the commands.  All normal text editing is
          available, except that you cannot use  <<ccoonnttrrooll--WW>>
          to  switch  to  an  alternate  screen.  Entering a
          <<ccaarrrriiaaggee--rreettuurrnn>> will execute the current line of
          the  screen window as an ex command in the context
          of the screen from which  you  created  the  colon
          command-line  screen,  and you will then return to
          that screen.

          Because of vvii's parsing rules, it can be difficult
          to  set  the  colon command-line edit character to










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 ((OOppttiioonnss))


          the <escape> cchhaarraacctteerr..  TToo sseett  iitt  ttoo  <<eessccaappee>>,
          use "set cedit=<literal-next><escape>""..

          IIff  tthhee cceeddiitt eeddiitt ooppttiioonn iiss sseett ttoo tthhee ssaammee cchhaarr--
          aacctteerr aass tthhee ffiilleecc eeddiitt ooppttiioonn,,  vvii  wwiillll  ppeerrffoorrmm
          ccoolloonn  ccoommmmaanndd--lliinnee  eeddiittiinngg  iiff  tthhee cchhaarraacctteerr iiss
          eenntteerreedd aass tthhee ffiirrsstt cchhaarraacctteerr ooff tthhee lliinnee,, ootthheerr--
          wwiissee,, vvii wwiillll ppeerrffoorrmm ffiillee nnaammee eexxppaannssiioonn..

     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 COLUMNS..  SSeeee tthhee sseeccttiioonn eennttiittlleedd
          ""SSiizziinngg tthhee SSccrreeeenn"" mmoorree iinnffoorrmmaattiioonn..

     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 "/*"" oorr ""##", this option
          causes vvii to skip to the end of that C-language or
          shell  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 TMPDIR iiss uusseedd aass tthhee
          ddeeffaauulltt vvaalluuee iiff  iitt  eexxiissttss,,  ootthheerrwwiissee  //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" suffixes 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" suffixes as well.

     eessccaappeettiimmee [[11]]
          The  10th's  of  a second eexx/vvii waits for a subse-
          quent key to complete an <escape> kkeeyy mmaappppiinngg..

     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
          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 on in the EXINIT environ-
          ment  variables,  or  the  system or $HOME startup
          files, the local startup files  are  read,  unless
          they  are  the same as the system or $HOME startup
          files or fail  to  pass  the  standard  permission
          checks.    See   the   section  entitled  "SSttaarrttuupp










NNvvii//NNeexx RReeffeerreennccee ((OOppttiioonnss))                        UUSSDD::1133--8855


          IInnffoorrmmaattiioonn" for more information.

     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fiilleecc [[nnoo ddeeffaauulltt]]
          This option adds the ability to do shell expansion
          when entering input on  the  colon  command  line.
          This  option  is  set  to  a string.  Whenever the
          first character of that string is entered  on  the
          colon  command  line, the <blank> delimited string
          immediately before the cursor is expanded as if it
          were  followed  by  a  *  cchhaarraacctteerr,, aanndd ffiillee nnaammee
          eexxppaannssiioonn ffoorr tthhee eexx eeddiitt ccoommmmaanndd wwaass ddoonnee..  IIff nnoo
          mmaattcchh  iiss  ffoouunndd,,  tthhee  ssccrreeeenn iiss ffllaasshheedd aanndd tteexxtt
          iinnppuutt rreessuummeedd..  IIff aa ssiinnggllee  mmaattcchh  rreessuullttss,,  tthhaatt
          mmaattcchh rreeppllaacceess tthhee eexxppaannddeedd tteexxtt..  IInn aaddddiittiioonn,, iiff
          tthhee ssiinnggllee mmaattcchh iiss ffoorr aa ddiirreeccttoorryy,, aa // cchhaarraacctteerr
          iiss  aappppeennddeedd  aanndd ffiillee ccoommpplleettiioonn iiss rreeppeeaatteedd..  IIff
          mmoorree tthhaann aa ssiinnggllee mmaattcchh rreessuullttss,, aannyy uunniiqquuee  pprree--
          ffiixx  sshhaarreedd  bbyy  tthhee mmaattcchheess rreeppllaacceess tthhee eexxppaannddeedd
          tteexxtt,, tthhee mmaattcchheess aarree ddiissppllaayyeedd,,  aanndd  tteexxtt  iinnppuutt
          rreessuummeedd..

          BBeeccaauussee ooff vvii''ss ppaarrssiinngg rruulleess,, iitt ccaann bbee ddiiffffiiccuulltt
          ttoo sseett tthhee ppaatthh ccoommpplleettiioonn cchhaarraacctteerr ttoo  ttwwoo  ccoomm--
          mmaanndd  vvaalluueess,,  <<eessccaappee>>  aanndd  <<ttaabb>>..  TToo sseett iitt ttoo
          <<eessccaappee>>,, uussee ""sseett  ffiilleecc==<<lliitteerraall--nneexxtt>><<eessccaappee>>""..
          TToo sseett iitt ttoo <<ttaabb>>,, uussee ""sseett ffiilleecc==\\<<ttaabb>>""..

          IIff  tthhee cceeddiitt eeddiitt ooppttiioonn iiss sseett ttoo tthhee ssaammee cchhaarr--
          aacctteerr aass tthhee ffiilleecc eeddiitt ooppttiioonn,,  vvii  wwiillll  ppeerrffoorrmm
          ccoolloonn  ccoommmmaanndd--lliinnee  eeddiittiinngg  iiff  tthhee cchhaarraacctteerr iiss
          eenntteerreedd aass tthhee ffiirrsstt cchhaarraacctteerr ooff tthhee lliinnee,, ootthheerr--
          wwiissee,, vvii wwiillll ppeerrffoorrmm ffiillee nnaammee eexxppaannssiioonn..

     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 <tab> cchhaarraacctteerrss ttoo tthhee  tteerr--
          mmiinnaall,,  uunnlliikkee  hhiissttoorriicc  vveerrssiioonnss  ooff eexx//vvii,, tthhiiss
          ooppttiioonn ddooeess nnoott ccuurrrreennttllyy hhaavvee aannyy aaffffeecctt..












UUSSDD::1133--8866                        NNvvii//NNeexx RReeffeerreennccee ((OOppttiioonnss))


     iicclloowweerr [[ooffff]]
          The iicclloowweerr edit option makes all Regular  Expres-
          sions  case-insensitive,  as long as an upper-case
          letter does not appear in the search string.

     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 LINES..  SSeeee tthhee sseeccttiioonn
          eennttiittlleedd ""SSiizziinngg tthhee SSccrreeeenn"" ffoorr mmoorree iinnffoorrmmaattiioonn..

     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"",, aanndd  tthhee
          eennddss ooff lliinneess aarree mmaarrkkeedd wwiitthh aa ""$$" character.

     lloocckk [[oonn]]
          This option causes the editor to attempt to get an
          exclusive lock on any file being edited,  read  or
          written.  Reading or writing a file that cannot be
          locked produces a warning message,  but  no  other
          effect.   Editing  a  file  that  cannot be locked
          results in a read only edit  session,  as  if  the
          rreeaaddoonnllyy edit option were set.

     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










NNvvii//NNeexx RReeffeerreennccee ((OOppttiioonnss))                        UUSSDD::1133--8877


          characters  except  for "^"" aanndd ""$$", 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 "\"" cchhaarraacctteerr..  SSeeee tthhee
          sseeccttiioonn eennttiittlleedd ""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"" ffoorr mmoorree iinnffoorrmmaattiioonn..

     mmaattcchhttiimmee [[77]]
          VVii only.  The 10th's of a second 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mssggccaatt [[..//]]
          This  option  selects a message catalog to be used
          to display error and informational messages  in  a
          specified  language.   If the value of this option
          ends with a '/', it is treated as the  name  of  a
          directory   that   contains   a   message  catalog
          "vi_XXXX"",, wwhheerree ""XXXXXXXX" is the value of  the  LANG
          eennvviirroonnmmeennttaall  vvaarriiaabbllee,, iiff iitt''ss sseett,, oorr tthhee vvaalluuee
          ooff tthhee LLCC__MMEESSSSAAGGEESS environmental variable if  it's
          not.   If neither of those environmental variables
          are set, or if the option doesn't end  in  a  '/',
          the option is treated as the full path name of the
          message catalog to use.

          If any messages are missing from the catalog,  the
          backup text (English) is used instead.

          See the distribution file catalog/README ffoorr aaddddii--
          ttiioonnaall iinnffoorrmmaattiioonn oonn bbuuiillddiinngg aanndd iinnssttaalllliinngg mmeess--
          ssaaggee ccaattaallooggss..

     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.











UUSSDD::1133--8888                        NNvvii//NNeexx RReeffeerreennccee ((OOppttiioonnss))


          Commands were recognized by the letters "e" or "v"
          followed by "x" or "i", at the beginning of a line
          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noopprriinntt [[""""]]
          Characters  that  are  never  handled as printable
          characters.  By default, the  C  library  function
          _i_s_p_r_i_n_t(3)  is used to determine if a character is
          printable or not.  This edit option overrides that
          decision.

     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
          ("\###"")),,   iinnsstteeaadd  ooff  tthhee  ddeeffaauulltt  hheexxaaddeecciimmaall
          ((""\\xx####").

     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
          <newline>.<char-pair>,, ((wwhheerree <<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 LaA<space>##,, tthheenn aallll ooff tthhee
          ffoolllloowwiinngg aaddddiittiioonnaall ppaarraaggrraapphh bboouunnddaarriieess wwoouulldd bbee










NNvvii//NNeexx RReeffeerreennccee ((OOppttiioonnss))                        UUSSDD::1133--8899


          rreeccooggnniizzeedd::


              <<nneewwlliinnee>>..LLaa
              <<nneewwlliinnee>>..AA<<ssppaaccee>>
              <<nneewwlliinnee>>..####


     pprriinntt [[""""]]
          Characters  that  are  always handled as printable
          characters.  By default, the  C  library  function
          _i_s_p_r_i_n_t(3)  is used to determine if a character is
          printable or not.  This edit option overrides that
          decision.

     pprroommpptt [[oonn]]
          EExx only.  This option causes eexx to prompt for com-
          mand input with a ":"" cchhaarraacctteerr;; wwhheenn  iitt  iiss  nnoott
          sseett,, nnoo pprroommpptt iiss ddiissppllaayyeedd..

     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.  Setting this option is
          equivalent to using the --RR command line option, or
          executing the vvii program using the name vviieeww.

          The rreeaaddoonnllyy edit option is  not  usually  persis-
          tent,  like other edit options.  If the --RR command
          line option is set, vvii is executed as vviieeww, or the
          rreeaaddoonnllyy  edit option is explicitly set, all files
          edited in the screen will be marked readonly,  and
          the  force  flag  will  be required to write them.
          However, if none of these conditions are true,  or
          the rreeaaddoonnllyy edit option is explicitly unset, then
          the rreeaaddoonnllyy edit option will toggle based on  the
          write  permissions  of  the  file  currently being
          edited as of when  it  is  loaded  into  the  edit
          buffer.   In other words, the rreeaaddoonnllyy edit option
          will be set if the current file lacks  write  per-
          missions,  and  will  not  be  set if the user has
          write permissions for the file.

     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 /tmp,, oonn mmoosstt ssyyss--
          tteemmss,, aass  tthheeiirr  ccoonntteennttss  aarree  rreemmoovveedd  wwhheenn  tthhee
          mmaacchhiinnee iiss rreebbooootteedd..

          PPuubblliicc  ddiirreeccttoorriieess lliikkee //uussrr//ttmmpp and /var/tmp aarree










UUSSDD::1133--9900                        NNvvii//NNeexx RReeffeerreennccee ((OOppttiioonnss))


          uussuuaallllyy ssaaffee,,  aalltthhoouugghh  ssoommee  ssiitteess  ppeerriiooddiiccaallllyy
          pprruunnee  oolldd  ffiilleess ffrroomm tthheemm..  TThheerree iiss nnoo rreeqquuiirree--
          mmeenntt tthhaatt yyoouu uussee aa ppuubblliicc ddiirreeccttoorryy,, ee..gg.. aa  ssuubb--
          ddiirreeccttoorryy ooff yyoouurr hhoommee ddiirreeccttoorryy wwiillll wwoorrkk ffiinnee..

          FFiinnaallllyy,,  iiff  yyoouu  cchhaannggee tthhee vvaalluuee ooff rreeccddiirr,, yyoouu
          mmuusstt mmooddiiffyy tthhee rreeccoovveerryy ssccrriipptt ttoo ooppeerraattee iinn yyoouurr
          cchhoosseenn rreeccoovveerryy aarreeaa..

          SSeeee  tthhee  sseeccttiioonn  eennttiittlleedd ""RReeccoovveerryy"" ffoorr ffuurrtthheerr
          iinnffoorrmmaattiioonn..

     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"" iiss mmaappppeedd ttoo ""BB", and "B"" iiss mmaappppeedd ttoo ""CC",
          The keystroke "A"" wwiillll bbee mmaappppeedd  ttoo  ""CC"  if  the
          rreemmaapp  option is set, and to "B"" iiff iitt iiss nnoott sseett..

     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
          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 [[((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 -- 11)) // 22]]
          Set  the  number of lines scrolled by the eexx <<ccoonn--
          ttrrooll--DD>> and <<eenndd--ooff--ffiillee>> 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.











NNvvii//NNeexx RReeffeerreennccee ((OOppttiioonnss))                        UUSSDD::1133--9911


     sseeaarrcchhiinnccrr [[ooffff]]
          The  sseeaarrcchhiinnccrr  edit option makes the search com-
          mands // and ??  incremental,  i.e.  the  screen  is
          updated  and the cursor moves to the matching text
          as the search pattern is entered.  If  the  search
          pattern is not found, the screen is beeped and the
          cursor remains on the colon-command line.  Erasing
          characters  from the search pattern backs the cur-
          sor up to the previous matching text.

     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   <newline>.<char-
          pair>,,  ((wwhheerree <<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seeccuurree [[ooffff]]
          The sseeccuurree edit option turns  off  all  access  to
          external  programs.   This means that the versions
          of the rreeaadd and wwrriittee commands  that  filter  text
          through  other programs, the vvii !!  and <<ccoonnttrrooll--ZZ>>
          commands, the eexx !!, ssccrriipptt, sshheellll, ssttoopp  and  ssuuss--
          ppeenndd  commands and file name expansion will not be
          permitted.  Once set, the sseeccuurree edit  option  may
          not be unset.

     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heellllmmeettaa [[~~{{[[**??$$``''""\\]]
          The  set  of  characters  that  eexx checks for when
          doing file name expansion.  If any of  the  speci-
          fied  characters  are found in the file name argu-
          ments  to  the  eexx  commands,  the  arguments  are
          expanded  using  the  program defined by the sshheellll
          option.  The default set of characters is a  union
          of  meta  characters  from  the  Version 7 and the
          Berkeley C shell.

     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.











UUSSDD::1133--9922                        NNvvii//NNeexx RReeffeerreennccee ((OOppttiioonnss))


     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 "}"" oorr ""))"
          is  entered, to briefly move the cursor the match-
          ing "{"" oorr ""((".  See the mmaattcchhttiimmee option for more
          information.

     sshhoowwmmooddee,, ssmmdd [[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.  The string is preceded by an
          asterisk (``*'') if the  file  has  been  modified
          since it was last completely written,

     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.











NNvvii//NNeexx RReeffeerreennccee ((OOppttiioonnss))                        UUSSDD::1133--9933


     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
          TERM..

     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 implemen-
          tation.  See the vveerrbboossee option for more  informa-
          tion.

     ttiillddeeoopp [[ooffff]]
          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










UUSSDD::1133--9944                        NNvvii//NNeexx RReeffeerreennccee ((OOppttiioonnss))


          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 -- 11]]
          This option determines the default number of lines
          in a screenful, as displayed 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--BB>> and  <<ccoonnttrrooll--FF>>,  and
          the  default  number  of  lines scrolled by the vvii
          commands <<ccoonnttrrooll--DD>> and <<ccoonnttrrooll--UU>>.   The  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.  Setting
          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.

          Resetting the  window  size  does  not  reset  the
          default  number of lines scrolled by the <<ccoonnttrrooll--
          DD>> and <<ccoonnttrrooll--UU>> commands.

     wwiinnddoowwnnaammee [[ooffff]]
          VVii changes the name of the editor's icon/window to
          the  current  file name when it's possible and not
          destructive, i.e., when the editor can restore  it
          to   its  original  value  on  exit  or  when  the
          icon/window will be discarded as the editor exits.
          If  the  wwiinnddoowwnnaammee  edit  option  is set, vvii will
          change  the  icon/window  name  even   when   it's
          destructive  and  the icon/window name will remain
          after the editor exits.  (This  is  the  case  for
          _x_t_e_r_m(1)).

     wwrraapplleenn,, wwll [[00]]
          This option is identical to the wwrraappmmaarrggiinn option,
          with the exception that it specifies the number of
          columns  from  the  _l_e_f_t  margin  before  the line
          splits, not the right margin.

          If both wwrraapplleenn and wwrraappmmaarrggiinn are set, the  wwrraapp--
          mmaarrggiinn value is used.












NNvvii//NNeexx RReeffeerreennccee ((OOppttiioonnss))                        UUSSDD::1133--9955


     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 columns before the right-hand
          margin of the screen.  (Note, the value  of  wwrraapp--
          mmaarrggiinn  is _n_o_t a text length.  In a screen that is
          80 columns wide, the command  ":set  wrapmargin=8_"
          _a_t_t_e_m_p_t_s  _t_o  _k_e_e_p _t_h_e _l_i_n_e_s _l_e_s_s _t_h_a_n _o_r _e_q_u_a_l _t_o
          _7_2 _c_o_l_u_m_n_s _w_i_d_e_._)

          _L_i_n_e_s _a_r_e _s_p_l_i_t _a_t _t_h_e _p_r_e_v_i_o_u_s _w_h_i_t_e_s_p_a_c_e _c_h_a_r_a_c_-
          _t_e_r  _c_l_o_s_e_s_t  _t_o _t_h_e _n_u_m_b_e_r_.  _A_n_y _t_r_a_i_l_i_n_g _w_h_i_t_e_s_-
          _p_a_c_e _c_h_a_r_a_c_t_e_r_s _b_e_f_o_r_e _t_h_a_t _c_h_a_r_a_c_t_e_r _a_r_e _d_e_l_e_t_e_d_.
          _I_f  _t_h_e  _l_i_n_e  _i_s  _s_p_l_i_t  _b_e_c_a_u_s_e  _o_f  _a_n _i_n_s_e_r_t_e_d
          _<_s_p_a_c_e_> or <tab> _c_h_a_r_a_c_t_e_r_,  _a_n_d  _y_o_u  _t_h_e_n  _e_n_t_e_r
          _a_n_o_t_h_e_r _<_s_p_a_c_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.

          If  both wwrraapplleenn and wwrraappmmaarrggiinn are set, the wwrraapp--
          mmaarrggiinn value is used.

     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.


























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


     1199..  IInnddeexx

     !       22, 43         ?RE?        25         cedit       58
     ""          42         @       27, 43         change      45
     #       22, 43         A           27         chdir       45
     $           23         B           27         columns     58
     %           23         C           28         comment     58
     &       23, 52         D           28         copy        46
     (           24         E           28         count   16, 41
     )           24         F           28         current pathname 13
     *           43         G           29         d           33
     +           20         H           29         delete      46
     ,           24         I           29         directory   58
     /RE/        25         J           29         display     46
     0           26         L           29         e           34
     0<control-D>39         M           30         edcompatible58
     :           26         N           25         edit        46
     ;           27         O           30         errorbells  59
     <       27, 43         P           30         escapetime  59
     <carriage-return> 14   Q           30         exrc        59
     <control-A> 18         R           30         extended    59
     <control-B> 18         S           31         exusage     47
     <cont1r8o,l-3D9>, 42         T           31         f           34
     <control-E> 18         U           31         fg          47
     <control-F> 18         W           31         file    41, 47
     <control-G> 19         X           31         filec       59
     <control-1H9>, 39         Y           32         flags       41
     <control-J> 19         ZZ          32         flash       59
     <control-L> 19         [[          32         global      47
     <control-M> 19         -           25         hardtabs    59
     <control-N> 19         ]]          32         help        48
     <control-P> 20         ^           32         i           34
     <control-R> 19         ^<control-D>39         iclower     59
     <control-2T0>, 39         _           33         ignorecase  60
     <control-U> 20         `<character>24         insert      48
     <control-2W0>, 39         a           33         j           19
     <control-X> 39         abbrev      44         join        48
     <control-Y> 20         alternate pathname 13  k       20, 49
     <control-2Z1>, 53         altwerase   56         keytime     60
     <control-]> 21         append      45         l           21
     <control-^> 21         args        45         leftright   60
     <end-of-file> 41, 42   autoindent  56         line        41
     <erase>     39         autoprint   57         lines       60
     <escape>21, 39         autowrite   57         lisp        60
     <inte1r3r,up3t8>, 40         b           33         list    48, 60
     <line erase>39         backup      57         lock        60
     <literal-next> 13, 39  beautify    58         m           34
     <newline>   15         bg          45         magic       60
     <nul>       39         bigword     17         map         48
     <space>     21         buffer      13         mark        49
     <word erase>39         c           33         matchtime   60
     =           44         cd          45         mesg        60
     >       27, 44         cdpath      58         mkexrc      49










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977


     modelines   61         suspend     53
     motion      16         t       35, 46
     move        49         tabstop     64
     msgcat      60         tag         53
     n           25         taglength   64
     next        49         tagnext     53
     noprint     61         tagpop      53
     number  43, 61         tagprev     53
     o           34         tags        64
     octal       61         tagtop      54
     open    49, 61         term        64
     optimize    61         terse       64
     p           35         tildeop     64
     paragraph   17         timeout     65
     paragraphs  61         ttywerase   65
     preserve    50         u           35
     previous    50         unabbrev    54
     previous context 16    undo        54
     print   50, 62         unmap       54
     prompt      62         unnamed buffer 14
     put         50         v           47
     quit        50         verbose     65
     r           35         version     54
     range       41         visual      54
     read        51         viusage     55
     readonly    62         w           36
     recdir      62         w1200       65
     recover     51         w300        65
     redraw      62         w9600       65
     remap       63         warn        65
     report      63         whitespace  14
     resize      51         window      65
     rewind      51         windowname  65
     ruler       63         wn          55
     s           35         word        17
     scroll      63         wq          55
     searchincr  63         wraplen     66
     section     17         wrapmargin  66
     sections    63         wrapscan    66
     secure      63         write       55
     sentence    17         writeany    66
     set         51         x           36
     shell   52, 63         xit         55
     shellmeta   63         y           36
     shiftwidth  64         yank        56
     showmatch   64         z       36, 56
     showmode    64         {           37
     sidescroll  64         |           37
     slowopen    64         }           37
     source      52         ~   37, 38, 52
     sourceany   64
     stop        53
     substitute  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
     Additional Features in Nex/Nvi ...................    3
     Startup Information ..............................    5
     Recovery .........................................    6
     Sizing the Screen ................................   10
     Character Display ................................   10
     Multiple Screens .................................   11
     Tags, Tag Stacks, and Cscope .....................   12
     Regular Expressions and Replacement Strings ......   14
     Scripting Languages ..............................   16
     General Editor Description .......................   17
     Vi Description ...................................   21
     Vi Commands ......................................   25
     Vi Text Input Commands ...........................   54
     Ex Addressing
               ........................................   56
     Ex Description ...................................   58
     Ex Commands ......................................   60
     Set Options ......................................   80
     Index ............................................   96





































