summaryrefslogtreecommitdiff
path: root/usr.bin/vi
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin/vi')
-rw-r--r--usr.bin/vi/Makefile3
-rw-r--r--usr.bin/vi/README19
-rw-r--r--usr.bin/vi/build/Makefile4
-rw-r--r--usr.bin/vi/build/README47
-rw-r--r--usr.bin/vi/build/config.h58
-rw-r--r--usr.bin/vi/build/pathnames.h2
-rw-r--r--usr.bin/vi/build/port.h7
-rw-r--r--usr.bin/vi/catalog/Makefile16
-rw-r--r--usr.bin/vi/catalog/dutch44
-rw-r--r--usr.bin/vi/catalog/dutch.base32
-rw-r--r--usr.bin/vi/catalog/dutch.check42
-rw-r--r--usr.bin/vi/catalog/english12
-rw-r--r--usr.bin/vi/catalog/english.base11
-rw-r--r--usr.bin/vi/catalog/english.check6
-rw-r--r--usr.bin/vi/catalog/german46
-rw-r--r--usr.bin/vi/catalog/german.base35
-rw-r--r--usr.bin/vi/catalog/german.check42
-rw-r--r--usr.bin/vi/catalog/ru_SU.KOI8-R4
-rw-r--r--usr.bin/vi/catalog/ru_SU.KOI8-R.base2
-rw-r--r--usr.bin/vi/catalog/ru_SU.KOI8-R.check12
-rw-r--r--usr.bin/vi/catalog/swedish11
-rw-r--r--usr.bin/vi/catalog/swedish.base10
-rw-r--r--usr.bin/vi/catalog/swedish.check7
-rw-r--r--usr.bin/vi/cl/cl.h18
-rw-r--r--usr.bin/vi/cl/cl_bsd.c37
-rw-r--r--usr.bin/vi/cl/cl_funcs.c97
-rw-r--r--usr.bin/vi/cl/cl_main.c113
-rw-r--r--usr.bin/vi/cl/cl_read.c4
-rw-r--r--usr.bin/vi/cl/cl_screen.c40
-rw-r--r--usr.bin/vi/cl/cl_term.c4
-rw-r--r--usr.bin/vi/common/api.c2
-rw-r--r--usr.bin/vi/common/common.h4
-rw-r--r--usr.bin/vi/common/exf.c84
-rw-r--r--usr.bin/vi/common/gs.h16
-rw-r--r--usr.bin/vi/common/key.c8
-rw-r--r--usr.bin/vi/common/key.h8
-rw-r--r--usr.bin/vi/common/mem.h2
-rw-r--r--usr.bin/vi/common/msg.c14
-rw-r--r--usr.bin/vi/common/options.c5
-rw-r--r--usr.bin/vi/common/options_f.c29
-rw-r--r--usr.bin/vi/common/recover.c16
-rw-r--r--usr.bin/vi/common/screen.h39
-rw-r--r--usr.bin/vi/common/search.c90
-rw-r--r--usr.bin/vi/common/signal.c569
-rw-r--r--usr.bin/vi/docs/TODO3
-rw-r--r--usr.bin/vi/docs/USD.doc/edit/Makefile2
-rw-r--r--usr.bin/vi/docs/USD.doc/edit/edittut.ms64
-rw-r--r--usr.bin/vi/docs/USD.doc/exref/Makefile2
-rw-r--r--usr.bin/vi/docs/USD.doc/exref/ex.rm29
-rw-r--r--usr.bin/vi/docs/USD.doc/exref/ex.summary6
-rw-r--r--usr.bin/vi/docs/USD.doc/vi.man/vi.01518
-rw-r--r--usr.bin/vi/docs/USD.doc/vi.man/vi.0.ps1172
-rw-r--r--usr.bin/vi/docs/USD.doc/vi.man/vi.128
-rw-r--r--usr.bin/vi/docs/USD.doc/vi.ref/ex.cmd.roff22
-rw-r--r--usr.bin/vi/docs/USD.doc/vi.ref/ref.so4
-rw-r--r--usr.bin/vi/docs/USD.doc/vi.ref/set.opt.roff29
-rw-r--r--usr.bin/vi/docs/USD.doc/vi.ref/spell.ok3
-rw-r--r--usr.bin/vi/docs/USD.doc/vi.ref/vi.ref26
-rw-r--r--usr.bin/vi/docs/USD.doc/vi.ref/vi.ref.ps5557
-rw-r--r--usr.bin/vi/docs/USD.doc/vi.ref/vi.ref.txt6402
-rw-r--r--usr.bin/vi/docs/USD.doc/vitut/Makefile2
-rw-r--r--usr.bin/vi/docs/USD.doc/vitut/vi.chars5
-rw-r--r--usr.bin/vi/docs/USD.doc/vitut/vi.in44
-rw-r--r--usr.bin/vi/docs/USD.doc/vitut/vi.summary4
-rw-r--r--usr.bin/vi/docs/changelog88
-rw-r--r--usr.bin/vi/docs/features20
-rw-r--r--usr.bin/vi/docs/help206
-rw-r--r--usr.bin/vi/docs/spell.ok93
-rw-r--r--usr.bin/vi/ex/ex.c39
-rw-r--r--usr.bin/vi/ex/ex.h18
-rw-r--r--usr.bin/vi/ex/ex_append.c6
-rw-r--r--usr.bin/vi/ex/ex_argv.c2
-rw-r--r--usr.bin/vi/ex/ex_at.c7
-rw-r--r--usr.bin/vi/ex/ex_cmd.c10
-rw-r--r--usr.bin/vi/ex/ex_cscope.c10
-rw-r--r--usr.bin/vi/ex/ex_global.c17
-rw-r--r--usr.bin/vi/ex/ex_init.c10
-rw-r--r--usr.bin/vi/ex/ex_read.c25
-rw-r--r--usr.bin/vi/ex/ex_screen.c16
-rw-r--r--usr.bin/vi/ex/ex_shell.c10
-rw-r--r--usr.bin/vi/ex/ex_source.c5
-rw-r--r--usr.bin/vi/ex/ex_subst.c336
-rw-r--r--usr.bin/vi/ex/ex_tag.c36
-rw-r--r--usr.bin/vi/ex/ex_txt.c3
-rw-r--r--usr.bin/vi/ex/ex_util.c16
-rw-r--r--usr.bin/vi/ex/ex_version.c22
-rw-r--r--usr.bin/vi/ex/ex_visual.c4
-rw-r--r--usr.bin/vi/ex/ex_write.c25
-rw-r--r--usr.bin/vi/ex/version.h2
-rw-r--r--usr.bin/vi/include/cl_extern.h6
-rw-r--r--usr.bin/vi/include/common_extern.h67
-rw-r--r--usr.bin/vi/include/ex_extern.h2
-rw-r--r--usr.bin/vi/include/ip_extern.h23
-rw-r--r--usr.bin/vi/include/options_def.h11
-rw-r--r--usr.bin/vi/include/vi_extern.h4
-rw-r--r--usr.bin/vi/vi/v_ex.c22
-rw-r--r--usr.bin/vi/vi/v_replace.c6
-rw-r--r--usr.bin/vi/vi/v_search.c63
-rw-r--r--usr.bin/vi/vi/v_txt.c100
-rw-r--r--usr.bin/vi/vi/v_util.c5
-rw-r--r--usr.bin/vi/vi/vi.c37
-rw-r--r--usr.bin/vi/vi/vi.h6
-rw-r--r--usr.bin/vi/vi/vs_msg.c170
-rw-r--r--usr.bin/vi/vi/vs_refresh.c56
-rw-r--r--usr.bin/vi/vi/vs_split.c202
105 files changed, 2089 insertions, 16310 deletions
diff --git a/usr.bin/vi/Makefile b/usr.bin/vi/Makefile
index 9a2227f0770..c02f1093dbd 100644
--- a/usr.bin/vi/Makefile
+++ b/usr.bin/vi/Makefile
@@ -1,9 +1,6 @@
# $NetBSD: Makefile,v 1.7 1996/05/20 03:47:00 mrg Exp $
SUBDIR= build
-
-.if make(install)
SUBDIR+=docs/USD.doc/edit docs/USD.doc/exref docs/USD.doc/vi.ref docs/USD.doc/vitut
-.endif
.include <bsd.subdir.mk>
diff --git a/usr.bin/vi/README b/usr.bin/vi/README
index b18c09413eb..328cd52e7df 100644
--- a/usr.bin/vi/README
+++ b/usr.bin/vi/README
@@ -1,4 +1,4 @@
-# @(#)README 8.135 (Berkeley) 5/18/96
+# @(#)README 8.142 (Berkeley) 6/30/96
This is the README for nex/nvi, a freely redistributable replacement for
the ex/vi text editors originally distributed as part of the Fourth
@@ -9,15 +9,16 @@ The source code for nex/nvi can be retrieved by using anonymous ftp to
ftp.cs.berkeley.edu. The files ucb/4bsd/nvi.tar.Z and ucb/4bsd/nvi.tar.gz
are the compressed and gzip'd archives, respectively, of version 1.34 of
nex/nvi. This version is believed to be stable and reasonably problem
-free. The file ucb/4bsd/nvi.ALPHA.1.66.tar.gz is a gzip'd archive of the
-current alpha-test release of nex/nvi, version 1.66. This version reflects
-the current development tree, and is more likely to have unanticipated
-problems.
+free. The file ucb/4bsd/nvi.ALPHA.###.tar.gz is a gzip'd archive of the
+current alpha-test release of nex/nvi. This version reflects the current
+development tree, and is more likely to have unanticipated problems.
See the file build/README for information on building nvi.
See the file LAYOUT for a description of where everything is.
+See the file COPYRIGHT for the nex/nvi copyright and redistribution terms.
+
If you have any questions about nex/nvi, or problems making it work,
please contact me by electronic mail at one of the following addresses:
@@ -66,16 +67,16 @@ o Status:
This software is in beta test, and it's pretty stable. Almost all of the
historic functionality in ex/vi is there, the only major missing pieces
-are open mode and the lisp option. (Also, the options hardtabs, optimize,
-redraw, and slowopen are recognized, but ignored.)
+are open mode and the lisp option.
Nvi is largely 8-bit clean. This isn't difficult to fix, and was left in
during initial development to keep things simple. Wide character support
will be integrated at the same time that it is made fully 8-bit clean.
There aren't a lot of new features in nex/nvi, but there are a few things
-you might like. The "Additional Features" section of the reference page
-(USD.doc/vi.ref/vi.ref.txt, USD.doc/vi.ref/vi.ref.ps) has more information.
+you might like. The "Additional Features" section of the reference work
+(docs/USD.doc/vi.ref/vi.ref.txt, docs/USD.doc/vi.ref/vi.ref.ps) has more
+information.
=-=-=-=-=-=-=-=-=-=-=
o Debugging:
diff --git a/usr.bin/vi/build/Makefile b/usr.bin/vi/build/Makefile
index 2253b637980..8e9a75a3b3a 100644
--- a/usr.bin/vi/build/Makefile
+++ b/usr.bin/vi/build/Makefile
@@ -1,6 +1,6 @@
-# $NetBSD: Makefile,v 1.2 1996/05/20 05:01:36 mrg Exp $
+# $OpenBSD: Makefile,v 1.4 1996/07/24 16:15:02 mickey Exp $
#
-# from: @(#)Makefile.in 8.56 (Berkeley) 5/18/96
+# From @(#)Makefile.in 8.63 (Berkeley) 6/19/96
CFLAGS+=-I${.CURDIR} -I${.CURDIR}/../include
diff --git a/usr.bin/vi/build/README b/usr.bin/vi/build/README
index b6e59e0c82d..2d0447faea2 100644
--- a/usr.bin/vi/build/README
+++ b/usr.bin/vi/build/README
@@ -1,4 +1,4 @@
-# @(#)README 8.20 (Berkeley) 5/12/96
+# @(#)README 8.24 (Berkeley) 6/20/96
Nvi uses the GNU autoconf program for configuration and compilation. You
should enter:
@@ -8,25 +8,20 @@ should enter:
and nvi will configure the system and build one or two binaries: nvi and
tknvi. You can use any path to the configure script, e.g., to build for
-an x86 architecture, you might do:
+an x86 architecture, I suggest that you do:
mkdir build.x86
cd build.x86
../build/configure
make
-If you're only building nvi for a single architecture, you can just use
-the path ./configure, and build it in this directory.
-
There are options that you can specify to the configure command. See
the next section for a description of these options.
If you want to rebuild or reconfigure nvi, for example, because you change
-your mind as to the curses library that you want to use, enter:
-
- make distclean
-
-and then reconfigure using "configure" and whatever options you choose.
+your mind as to the curses library that you want to use, create a new
+directory and reconfigure it using "configure" and whatever options you
+choose, don't try to selectively edit the files.
By default, nvi is installed as "vi", with hard links to "ex" and "view".
To install them using different names, use the configure program options.
@@ -36,6 +31,10 @@ For example, to install them as "nvi", "nex" and "nview", use:
See the section below on installation for details.
+Note, if you're building nvi on a LynxOS system, you should read the
+README.LynxOS file in this directory for additional build instructions
+that are specific to that operating system.
+
If you have trouble with this procedure, send email to the addresses
listed in ../README. In that email, please provide a complete script
of the output for all of the above commands that you entered.
@@ -134,13 +133,21 @@ enable-tknvi:
see the next section of this README file for more information.
=-=-=-=-=-=-=
-ADDING OR CHANGING COMPILE OR LOAD LINE FLAGS
+ADDING OR CHANGING COMPILERS, OR COMPILE OR LOAD LINE FLAGS
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+If you want to use a specific compiler, specify the CC environment
+variable before running configure. For example:
+
+ env CC=gcc configure
+
+Using anything other than the native compiler will almost certainly
+mean that you'll want to check the compile and load line flags, too.
+
If you want to specify additional load line flags, specify the ADDLDFLAGS
environment variable before running configure. For example:
- env ADDLDFLAGS="-Q" ./configure
+ env ADDLDFLAGS="-Q" configure
would specify the -Q flag in the load line when the nvi programs are
loaded.
@@ -149,7 +156,7 @@ If you don't want configure to use the default load line flags for the
system, specify the LDFLAGS environment variable before running configure.
For example:
- env LDFLAGS="-32" ./configure
+ env LDFLAGS="-32" configure
will cause configure to set the load line flags to "-32", and not set
them based on the current system.
@@ -157,7 +164,7 @@ them based on the current system.
If you want to specify additional compile line flags, specify the
ADDCPPFLAGS environment variable before running configure. For example:
- env ADDCPPFLAGS="-I../foo" ./configure
+ env ADDCPPFLAGS="-I../foo" configure
would cause the compiler to be passed the -I../foo flag when compiling
test programs during configuration as well as when building nvi object
@@ -167,7 +174,7 @@ If you don't want configure to use the default compile line flags for the
system, specify the CPPFLAGS environment variable before running configure.
For example:
- env CPPFLAGS="-I.." ./configure
+ env CPPFLAGS="-I.." configure
will cause configure to use "-I.." as the compile line flags instead of
the default values.
@@ -183,7 +190,7 @@ they can be found.
If you want to specify additional library paths, set the ADDLIBS environment
variable before running configure. For example:
- env ADDLIBS="-L/a/b -L/e/f -ldb" ./configure
+ env ADDLIBS="-L/a/b -L/e/f -ldb" configure
would specify two additional directories to search for libraries, /a/b
and /e/f, and one additional library to load, "db".
@@ -191,7 +198,7 @@ and /e/f, and one additional library to load, "db".
If you want to specify additional include paths, specify the ADDCPPFLAGS
environment variable before running configure. For example:
- env ADDCPPFLAGS="-I/usr/local/include" LIBS="-ldb" ./configure
+ env ADDCPPFLAGS="-I/usr/local/include" LIBS="-ldb" configure
would search /usr/local/include for include files, as well as load the db
library as described above.
@@ -201,7 +208,7 @@ and you've built it in a directory named ncurses which is at the same
level in the filesystem hierarchy as nvi. You would enter something like:
env ADDCPPFLAGS="-I../../ncurses/include" \
- ADDLIBS="-L../../ncurses/libraries" ./configure
+ ADDLIBS="-L../../ncurses/libraries" configure
to cause nvi to look for the curses include files and the curses library
in the ncurses environment.
@@ -248,12 +255,12 @@ Notes:
variables in your shell before running configure. For example,
in sh or ksh, you could do:
- ADDLIBS="-L/a/b -L/e/f -ldb" ./configure
+ ADDLIBS="-L/a/b -L/e/f -ldb" configure
and in csh or tcsh, you could do:
setenv ADDLIBS "-L/a/b -L/e/f -ldb"
- ./configure
+ configure
See your shell manual page for further information.
diff --git a/usr.bin/vi/build/config.h b/usr.bin/vi/build/config.h
index 3ca1a5a70dc..37b919a2af0 100644
--- a/usr.bin/vi/build/config.h
+++ b/usr.bin/vi/build/config.h
@@ -4,11 +4,8 @@
/* Define to empty if the keyword does not work. */
/* #undef const */
-/* Define if you don't have vprintf but do have _doprnt. */
-/* #undef HAVE_DOPRNT */
-
/* Define if you have a working `mmap' system call. */
-/* #define HAVE_MMAP 1 */
+#define HAVE_MMAP 1
/* Define if your struct stat has st_blksize. */
#define HAVE_ST_BLKSIZE 1
@@ -16,9 +13,6 @@
/* Define if you have <vfork.h>. */
/* #undef HAVE_VFORK_H */
-/* Define if you have the vprintf function. */
-#define HAVE_VPRINTF 1
-
/* Define to `int' if <sys/types.h> doesn't define. */
/* #undef mode_t */
@@ -42,7 +36,7 @@
/* Define if your processor stores words with the most significant
byte first (like Motorola and SPARC, unlike Intel and VAX). */
-#define WORDS_BIGENDIAN 1
+/* #undef WORDS_BIGENDIAN */
/* Define to `int' if <sys/types.h> doesn't define. */
/* #undef ssize_t */
@@ -119,20 +113,68 @@
/* Define if your sprintf returns a pointer, not a length. */
/* #undef SPRINTF_RET_CHARPNT */
+/* Define if you have the bsearch function. */
+#define HAVE_BSEARCH 1
+
+/* Define if you have the gethostname function. */
+#define HAVE_GETHOSTNAME 1
+
+/* Define if you have the getopt function. */
+#define HAVE_GETOPT 1
+
/* Define if you have the getpagesize function. */
#define HAVE_GETPAGESIZE 1
+/* Define if you have the memchr function. */
+#define HAVE_MEMCHR 1
+
+/* Define if you have the memcpy function. */
+#define HAVE_MEMCPY 1
+
+/* Define if you have the memmove function. */
+#define HAVE_MEMMOVE 1
+
+/* Define if you have the memset function. */
+#define HAVE_MEMSET 1
+
+/* Define if you have the mkstemp function. */
+#define HAVE_MKSTEMP 1
+
+/* Define if you have the mmap function. */
+#define HAVE_MMAP 1
+
/* Define if you have the select function. */
#define HAVE_SELECT 1
/* Define if you have the setenv function. */
#define HAVE_SETENV 1
+/* Define if you have the snprintf function. */
+#define HAVE_SNPRINTF 1
+
+/* Define if you have the strdup function. */
+#define HAVE_STRDUP 1
+
+/* Define if you have the strerror function. */
+#define HAVE_STRERROR 1
+
+/* Define if you have the strpbrk function. */
+#define HAVE_STRPBRK 1
+
/* Define if you have the strsep function. */
#define HAVE_STRSEP 1
+/* Define if you have the strtol function. */
+#define HAVE_STRTOL 1
+
+/* Define if you have the strtoul function. */
+#define HAVE_STRTOUL 1
+
/* Define if you have the unsetenv function. */
#define HAVE_UNSETENV 1
/* Define if you have the valloc function. */
#define HAVE_VALLOC 1
+
+/* Define if you have the vsnprintf function. */
+#define HAVE_VSNPRINTF 1
diff --git a/usr.bin/vi/build/pathnames.h b/usr.bin/vi/build/pathnames.h
index f2d5ec309bc..5a4f5a93856 100644
--- a/usr.bin/vi/build/pathnames.h
+++ b/usr.bin/vi/build/pathnames.h
@@ -1,4 +1,4 @@
-/* @(#)pathnames.h.in 8.3 (Berkeley) 4/22/96 */
+/* @(#)pathnames.h.in 8.4 (Berkeley) 6/26/96 */
#ifndef _PATH_BSHELL
#define _PATH_BSHELL "/bin/sh"
diff --git a/usr.bin/vi/build/port.h b/usr.bin/vi/build/port.h
index ed7116f8543..21f16c93902 100644
--- a/usr.bin/vi/build/port.h
+++ b/usr.bin/vi/build/port.h
@@ -1,4 +1,4 @@
-/* @(#)port.h.in 8.12 (Berkeley) 5/16/96 */
+/* @(#)port.h.in 8.13 (Berkeley) 6/12/96 */
/*
* Declare the basic types, if they aren't already declared. Named and
@@ -13,6 +13,11 @@
#endif
+
+
+
+
+
/*
* XXX
* Handle function prototypes. This steps on name space that vi doesn't
diff --git a/usr.bin/vi/catalog/Makefile b/usr.bin/vi/catalog/Makefile
index 1f5c5e68292..5d8fc4e5c27 100644
--- a/usr.bin/vi/catalog/Makefile
+++ b/usr.bin/vi/catalog/Makefile
@@ -1,4 +1,5 @@
-# @(#)Makefile 8.23 (Berkeley) 5/2/96
+# $OpenBSD: Makefile,v 1.2 1996/07/24 16:15:04 mickey Exp $
+# @(#)Makefile 8.24 (Berkeley) 6/12/96
CAT= dutch english german ru_SU.KOI8-R swedish
FILES= ../cl/*.c ../common/*.c ../ex/*.c ../perl_api/*.c ../tcl_api/*.c \
@@ -46,16 +47,15 @@ ${CHK}: ${CAT}
printf "%03d\n", nline; \
}' < $$f.base; \
echo =========================; \
- echo "MISSING ERROR MESSAGES (FIX!!!):"; \
- awk '{print $$1}' < $$f.base > __ck1; \
- awk '{print $$1}' < english.base > __ck2; \
- join -v 2 __ck1 __ck2; \
+ echo "MISSING ERROR MESSAGES (Please add!):"; \
+ awk '{print $$1}' < $$f.base | sort -u > __ck1; \
+ awk '{print $$1}' < english.base | sort -u > __ck2; \
+ comm -13 __ck1 __ck2; \
echo =========================; \
echo "Extra error messages (just delete them):"; \
- join -v 1 __ck1 __ck2; \
- rm -f __ck1 __ck2; \
+ comm -23 __ck1 __ck2; \
echo =========================; \
- echo "MESSAGES WITH THE SAME MESSAGE ID's (FIX!!!):"; \
+ echo "MESSAGES WITH THE SAME MESSAGE ID's (FIX!):"; \
for j in \
`sed '/^$$/d' < $$f.base | sort -u | \
awk '{print $$1}' | uniq -d`; do \
diff --git a/usr.bin/vi/catalog/dutch b/usr.bin/vi/catalog/dutch
index e3890bea848..5e37397420a 100644
--- a/usr.bin/vi/catalog/dutch
+++ b/usr.bin/vi/catalog/dutch
@@ -44,12 +44,12 @@ Aantal regels te groot, meer dan %dX
De lisp optie is niet ondersteundX
messages niet uitgeschakeld: %sX
messages niet geactiveerd: %sX
-De modeline(s) optie mag niet gebruikt wordenX
+
De paragraph optie moet karakter paren bevattenX
De section optie moet karakter paren bevattenX
-De shiftwidth kan niet op 0 gezet wordenX
-De sourceany optie mag niet gebruikt wordenX
-Tabulator afstand kan niet op 0 gezet wordenX
+
+
+
De standaard buffer is leegX
Buffer %s is leegX
Bestanden met newlines in de naam kunnen niet hersteld wordenX
@@ -142,7 +142,7 @@ Het open commando is nog niet ondersteundX
Kan dit bestand niet veilig stellenX
Bestand veilig gesteldX
%s resulteert in te veel bestandsnamenX
-Alleen normale bestanden kunnen gelezen wordenX
+Alleen echte bestanden en named pipes kunnen gelezen wordenX
%s: lees beveiliging niet beschikbaarX
Bezig met lezen...X
%s: %lu regels, %lu karaktersX
@@ -158,13 +158,13 @@ Geen match gevondenX
Geen voorafgaande tag aanwezigX
Minder dan %s elementen op de tags stapel; gebruik :display t[ags]X
Geen bestand genaamd %s op de tags stapel; gebruik :display t[ags]X
-
+Kies Enter om door te gaan: X
%s: tag niet gevondenX
%s: verminkte tag in %sX
-%s: het regelnummer van deze tag bestaat nietX
+%s: Het regel nummer van deze tag is voorbij het einde van het bestandX
De tags stapel is leegX
%s: zoek patroon niet gevondenX
-Meer bestanden te bewerken; gebruik n[ext] om naar het volgende bestand te gaan, q[uit]! om te stoppenX
+%d andere bestanden te wijzigenX
Buffer %s is leegX
Bevestig wijziging? [n]X
OnderbrokenX
@@ -173,7 +173,7 @@ Geen vorige reguliere expressieX
Het %s commando vereist dat er een bestand geladen isX
Gebruik: %sX
Het visual commando vereist dat de open optie actief isX
-%s resulteert in te veel bestandsnamenX
+
Leeg bestandX
Geen voorafgaand F, f, T of t zoek commandoX
%s niet gevondenX
@@ -219,7 +219,7 @@ InvoegenX
VervangenX
Verplaatsing voorbij het eind van het schermX
Verplaatsing voorbij het begin van het schermX
-
+Scherm moet meer dan %d regels hebben om het te kunnen splitsenX
Er zijn geen achtergrond schermenX
Er is geen achtergrond scherm waarin U bestand %s aan het bewerken bentX
U kan uw enige scherm niet in de achtergrond zettenX
@@ -252,9 +252,9 @@ Bestand incompleet, niet weggeschrevenX
%s: schrijf beveiliging niet beschikbaarX
Bezig met schrijven...X
%s: WAARSCHUWING: BESTAND INCOMPLEETX
-
+Reeds op de eerste tag van deze groepX
%s: nieuw bestand: %lu regels, %lu karaktersX
-%s: %s%lu regels, %lu karaktersX
+%s: %lu regels, %lu karaktersX
%s resulteert in te veel bestandsnamenX
%s: geen normaal bestandX
%s: U bent niet de eigenaarX
@@ -275,21 +275,21 @@ Commando mislukt, nog geen bestand geladen.X
doorgaan?X
Onverwacht character eventX
Onverwacht end-of-file eventX
-
+Geen match gevonden voor dit patroonX
Onverwacht interrupt eventX
Onverwacht quit eventX
Onverwacht repaint eventX
-
+Reeds op de laatste tag van deze groepX
Het %s command vereist de ex terminal interfaceX
Deze vorm van %s is niet ondersteund als de secure edit optie actief isX
Onverwacht string eventX
Onverwacht timeout eventX
Onverwacht write eventX
-Onverwacht write-and-quit eventX
+
Shell expansies zijn niet ondersteund als de secure edit optie actief isX
Het %s commando is niet ondersteund als de secure edit optie actief isX
set: %s mag niet uitgezet wordenX
-
+Scherm te klein.X
toegevoegdX
gewijzigdX
verwijderdX
@@ -301,3 +301,15 @@ regelX
regelsX
Vi was niet geladen met een Tcl interpreterX
Bestand gewijzigd sinds het de laatste keer weg is geschreven.X
+Shell expansie misluktX
+Geen %s edit optie opgegevenX
+Vi was niet geladen met een Perl interpreterX
+Geen ex commando om uit te voerenX
+Kies <CR> om commando uit te voeren, :q om te stoppenX
+Gebruik \"cscope help\" voor uitlegX
+Nog geen cscope connectie aanwezigX
+%s: onbekend zoek type: gebruik een van %sX
+%d: onbekende cscope sessieX
+set: de %s optie mag nooit aangezet wordenX
+set: de %s optie mag nooit op 0 gezet wordenX
+%s: toegevoegd: %lu regels, %lu karaktersX
diff --git a/usr.bin/vi/catalog/dutch.base b/usr.bin/vi/catalog/dutch.base
index 4722d7573b5..9747668e899 100644
--- a/usr.bin/vi/catalog/dutch.base
+++ b/usr.bin/vi/catalog/dutch.base
@@ -43,12 +43,8 @@
044 "De lisp optie is niet ondersteund"
045 "messages niet uitgeschakeld: %s"
046 "messages niet geactiveerd: %s"
-047 "De modeline(s) optie mag niet gebruikt worden"
048 "De paragraph optie moet karakter paren bevatten"
049 "De section optie moet karakter paren bevatten"
-050 "De shiftwidth kan niet op 0 gezet worden"
-051 "De sourceany optie mag niet gebruikt worden"
-052 "Tabulator afstand kan niet op 0 gezet worden"
053 "De standaard buffer is leeg"
054 "Buffer %s is leeg"
055 "Bestanden met newlines in de naam kunnen niet hersteld worden"
@@ -140,7 +136,7 @@
142 "Kan dit bestand niet veilig stellen"
143 "Bestand veilig gesteld"
144 "%s resulteert in te veel bestandsnamen"
-145 "Alleen normale bestanden kunnen gelezen worden"
+145 "Alleen echte bestanden en named pipes kunnen gelezen worden"
146 "%s: lees beveiliging niet beschikbaar"
147 "Bezig met lezen..."
148 "%s: %lu regels, %lu karakters"
@@ -156,12 +152,13 @@
158 "Geen voorafgaande tag aanwezig"
159 "Minder dan %s elementen op de tags stapel; gebruik :display t[ags]"
160 "Geen bestand genaamd %s op de tags stapel; gebruik :display t[ags]"
+161 "Kies Enter om door te gaan: "
162 "%s: tag niet gevonden"
163 "%s: verminkte tag in %s"
-164 "%s: het regelnummer van deze tag bestaat niet"
+164 "%s: Het regel nummer van deze tag is voorbij het einde van het bestand"
165 "De tags stapel is leeg"
166 "%s: zoek patroon niet gevonden"
-167 "Meer bestanden te bewerken; gebruik n[ext] om naar het volgende bestand te gaan, q[uit]! om te stoppen"
+167 "%d andere bestanden te wijzigen"
168 "Buffer %s is leeg"
169 "Bevestig wijziging? [n]"
170 "Onderbroken"
@@ -170,7 +167,6 @@
173 "Het %s commando vereist dat er een bestand geladen is"
174 "Gebruik: %s"
175 "Het visual commando vereist dat de open optie actief is"
-176 "%s resulteert in te veel bestandsnamen"
177 "Leeg bestand"
178 "Geen voorafgaand F, f, T of t zoek commando"
179 "%s niet gevonden"
@@ -215,6 +211,7 @@
219 "Vervangen"
220 "Verplaatsing voorbij het eind van het scherm"
221 "Verplaatsing voorbij het begin van het scherm"
+222 "Scherm moet meer dan %d regels hebben om het te kunnen splitsen"
223 "Er zijn geen achtergrond schermen"
224 "Er is geen achtergrond scherm waarin U bestand %s aan het bewerken bent"
225 "U kan uw enige scherm niet in de achtergrond zetten"
@@ -246,8 +243,9 @@
252 "%s: schrijf beveiliging niet beschikbaar"
253 "Bezig met schrijven..."
254 "%s: WAARSCHUWING: BESTAND INCOMPLEET"
+255 "Reeds op de eerste tag van deze groep"
256 "%s: nieuw bestand: %lu regels, %lu karakters"
-257 "%s: %s%lu regels, %lu karakters"
+257 "%s: %lu regels, %lu karakters"
258 "%s resulteert in te veel bestandsnamen"
259 "%s: geen normaal bestand"
260 "%s: U bent niet de eigenaar"
@@ -268,18 +266,20 @@
275 " doorgaan?"
276 "Onverwacht character event"
277 "Onverwacht end-of-file event"
+278 "Geen match gevonden voor dit patroon"
279 "Onverwacht interrupt event"
280 "Onverwacht quit event"
281 "Onverwacht repaint event"
+282 "Reeds op de laatste tag van deze groep"
283 "Het %s command vereist de ex terminal interface"
284 "Deze vorm van %s is niet ondersteund als de secure edit optie actief is"
285 "Onverwacht string event"
286 "Onverwacht timeout event"
287 "Onverwacht write event"
-288 "Onverwacht write-and-quit event"
289 "Shell expansies zijn niet ondersteund als de secure edit optie actief is"
290 "Het %s commando is niet ondersteund als de secure edit optie actief is"
291 "set: %s mag niet uitgezet worden"
+292 "Scherm te klein."
293 "toegevoegd"
294 "gewijzigd"
295 "verwijderd"
@@ -291,3 +291,15 @@
301 "regels"
302 "Vi was niet geladen met een Tcl interpreter"
303 "Bestand gewijzigd sinds het de laatste keer weg is geschreven."
+304 "Shell expansie mislukt"
+305 "Geen %s edit optie opgegeven"
+306 "Vi was niet geladen met een Perl interpreter"
+307 "Geen ex commando om uit te voeren"
+308 "Kies <CR> om commando uit te voeren, :q om te stoppen"
+309 "Gebruik \"cscope help\" voor uitleg"
+310 "Nog geen cscope connectie aanwezig"
+311 "%s: onbekend zoek type: gebruik een van %s"
+312 "%d: onbekende cscope sessie"
+313 "set: de %s optie mag nooit aangezet worden"
+314 "set: de %s optie mag nooit op 0 gezet worden"
+315 "%s: toegevoegd: %lu regels, %lu karakters"
diff --git a/usr.bin/vi/catalog/dutch.check b/usr.bin/vi/catalog/dutch.check
index 12584d05d98..fc5baccb14b 100644
--- a/usr.bin/vi/catalog/dutch.check
+++ b/usr.bin/vi/catalog/dutch.check
@@ -1,47 +1,28 @@
Unused message id's (this is okay):
001
+047
+050
+051
+052
081
-161
+176
213
-222
229
-255
-278
-282
-292
+288
=========================
-MISSING ERROR MESSAGES (FIX!!!):
-161
-222
-255
-278
-282
-292
-304
-305
-306
-307
-308
-309
-310
-311
-312
-313
-314
+MISSING ERROR MESSAGES (Please add!):
+316
=========================
Extra error messages (just delete them):
-047
-050
-051
-052
-176
=========================
-MESSAGES WITH THE SAME MESSAGE ID's (FIX!!!):
+MESSAGES WITH THE SAME MESSAGE ID's (FIX!):
=========================
Duplicate messages, both id and message (this is okay):
=========================
Duplicate messages, just message (this is okay):
2 %s bestaat al, niet weggeschreven; gebruik ! om het te forcerenX
+ 2 %s resulteert in te veel bestandsnamenX
+ 2 %s: %lu regels, %lu karaktersX
2 %s: verminkt herstel bestandX
2 Bestand wordt gecopieerd voor herstel...X
2 Buffer %s is leegX
@@ -51,7 +32,6 @@ Duplicate messages, just message (this is okay):
2 Wijzigingen kunnen niet ongedaan gemaakt worden als deze sessie misluktX
2 gewijzigdX
2 set: %s optie moet een waarde hebbenX
- 3 %s resulteert in te veel bestandsnamenX
3 %s: verwijdering misluktX
3 Bestand gewijzigd sinds laatste schrijfactie; schrijf het weg of gebruik ! om het te forcerenX
4 Gebruik: %sX
diff --git a/usr.bin/vi/catalog/english b/usr.bin/vi/catalog/english
index d1aef0b64e9..4ccfaec6b74 100644
--- a/usr.bin/vi/catalog/english
+++ b/usr.bin/vi/catalog/english
@@ -142,7 +142,7 @@ The open command is not yet implementedX
Preservation of this file not possibleX
File preservedX
%s: expanded into too many file namesX
-Only regular files may be readX
+Only regular files and named pipes may be readX
%s: read lock was unavailableX
Reading...X
%s: %lu lines, %lu charactersX
@@ -161,10 +161,10 @@ No file %s on the tags stack to return to; use :display t[ags]X
Press Enter to continue: X
%s: tag not foundX
%s: corrupted tag in %sX
-%s: the tag line doesn't existX
+%s: the tag's line number is past the end of the fileX
The tags stack is emptyX
%s: search pattern not foundX
-More files to edit; use n[ext] to go to the next file, q[uit]! to quitX
+%d more files to editX
Buffer %s is emptyX
Confirm change? [n]X
InterruptedX
@@ -254,7 +254,7 @@ Writing...X
%s: WARNING: FILE TRUNCATEDX
Already at the first tag of this groupX
%s: new file: %lu lines, %lu charactersX
-%s: %s%lu lines, %lu charactersX
+%s: %lu lines, %lu charactersX
%s expanded into too many file namesX
%s: not a regular fileX
%s: not owned by youX
@@ -285,7 +285,7 @@ That form of %s is not supported when the secure edit option is setX
Unexpected string eventX
Unexpected timeout eventX
Unexpected write eventX
-Unexpected write-and-quit eventX
+
Shell expansions not supported when the secure edit option is setX
The %s command is not supported when the secure edit option is setX
set: the %s option may not be turned offX
@@ -312,3 +312,5 @@ No cscope connections runningX
%d: no such cscope sessionX
set: the %s option may never be turned onX
set: the %s option may never be set to 0X
+%s: appended: %lu lines, %lu charactersX
+Unexpected resize eventX
diff --git a/usr.bin/vi/catalog/english.base b/usr.bin/vi/catalog/english.base
index acc129b1ae4..498762a6cc7 100644
--- a/usr.bin/vi/catalog/english.base
+++ b/usr.bin/vi/catalog/english.base
@@ -136,7 +136,7 @@
142 "Preservation of this file not possible"
143 "File preserved"
144 "%s: expanded into too many file names"
-145 "Only regular files may be read"
+145 "Only regular files and named pipes may be read"
146 "%s: read lock was unavailable"
147 "Reading..."
148 "%s: %lu lines, %lu characters"
@@ -155,10 +155,10 @@
161 "Press Enter to continue: "
162 "%s: tag not found"
163 "%s: corrupted tag in %s"
-164 "%s: the tag line doesn't exist"
+164 "%s: the tag's line number is past the end of the file"
165 "The tags stack is empty"
166 "%s: search pattern not found"
-167 "More files to edit; use n[ext] to go to the next file, q[uit]! to quit"
+167 "%d more files to edit"
168 "Buffer %s is empty"
169 "Confirm change? [n]"
170 "Interrupted"
@@ -246,7 +246,7 @@
254 "%s: WARNING: FILE TRUNCATED"
255 "Already at the first tag of this group"
256 "%s: new file: %lu lines, %lu characters"
-257 "%s: %s%lu lines, %lu characters"
+257 "%s: %lu lines, %lu characters"
258 "%s expanded into too many file names"
259 "%s: not a regular file"
260 "%s: not owned by you"
@@ -277,7 +277,6 @@
285 "Unexpected string event"
286 "Unexpected timeout event"
287 "Unexpected write event"
-288 "Unexpected write-and-quit event"
289 "Shell expansions not supported when the secure edit option is set"
290 "The %s command is not supported when the secure edit option is set"
291 "set: the %s option may not be turned off"
@@ -304,3 +303,5 @@
312 "%d: no such cscope session"
313 "set: the %s option may never be turned on"
314 "set: the %s option may never be set to 0"
+315 "%s: appended: %lu lines, %lu characters"
+316 "Unexpected resize event"
diff --git a/usr.bin/vi/catalog/english.check b/usr.bin/vi/catalog/english.check
index 9e11a1a0e29..e2d978c995d 100644
--- a/usr.bin/vi/catalog/english.check
+++ b/usr.bin/vi/catalog/english.check
@@ -7,18 +7,20 @@ Unused message id's (this is okay):
081
176
229
+288
=========================
-MISSING ERROR MESSAGES (FIX!!!):
+MISSING ERROR MESSAGES (Please add!):
=========================
Extra error messages (just delete them):
=========================
-MESSAGES WITH THE SAME MESSAGE ID's (FIX!!!):
+MESSAGES WITH THE SAME MESSAGE ID's (FIX!):
=========================
Duplicate messages, both id and message (this is okay):
2 209 "The file is empty"
=========================
Duplicate messages, just message (this is okay):
2 %s exists, not written; use ! to overrideX
+ 2 %s: %lu lines, %lu charactersX
2 %s: malformed recovery fileX
2 Buffer %s is emptyX
2 Copying file for recovery...X
diff --git a/usr.bin/vi/catalog/german b/usr.bin/vi/catalog/german
index de82399188d..e3df0c09925 100644
--- a/usr.bin/vi/catalog/german
+++ b/usr.bin/vi/catalog/german
@@ -44,12 +44,12 @@ Anzeige hat zu viele Zeilen, mehr als %dX
Die lisp Option ist nicht implementiertX
Messages nicht abgeschalten: %sX
Messages nicht eingeschalten: %sX
-Die modeline(s) Option kann nie gesetzt werdenX
+
Die paragraph Option muss Gruppen zu zwei Zeichen enthaltenX
Die section Option muss Gruppen zu zwei Zeichen enthaltenX
-shiftwidth kann nicht auf 0 gesetzt werdenX
-Die sourceany Option kann nie gesetzt werdenX
-Tabulatorpositionen duerfen nicht auf 0 gesetzt werdenX
+
+
+
Der Standardpuffer ist leerX
Puffer %s ist leerX
Dateien mit newlines im Namen sind nicht wiederherstellbarX
@@ -142,7 +142,7 @@ Das open Kommando ist nocht nicht implementiertX
Rettung dieser Datei nicht moeglichX
Datei gerettetX
%s wurde in zu viele Dateinamen expandiertX
-Nur regulaere Dateien koennen gelesen werdenX
+Nur regulaere Dateien und named pipes koennen gelesen werdenX
%s: Lesesperrung war nicht moeglichX
lese ...X
%s: %lu Zeilen, %lu ZeichenX
@@ -158,13 +158,13 @@ Keine Uebereinstimmung gefundenX
Kein vorhergehender 'tag' angegebenX
Weniger als %s Eintraege auf dem 'tag'-Stack; verwende :display t[ags]X
Keine Datei namens %s auf dem 'tag'-Stack; verwende :display t[ags]X
-
+Druecke Enter um fortzufahren: X
%s: 'tag' nicht gefundenX
%s: kaputter 'tag' in %sX
-%s: die 'tag'-Zeile existiert nichtX
+%s: die Zeilennummer des 'tag' ist hinter dem DateiendeX
Der 'tag' Stack ist leerX
%s: Suchmuster nicht gefundenX
-Weitere Dateien zu edieren; verwende n[ext] um zur naechsten Datei zu gehen, q[uit]! zum VerlassenX
+%d weitere Dateien zu edierenX
Puffer %s ist leerX
Bestaetige Aenderung [n]X
Unterbrochen.X
@@ -173,7 +173,7 @@ Kein vorhergehender regulaerer AusdruckX
Das Kommando %s verlangt, dass bereits eine Datei eingelesen wurdeX
Benutzung: %sX
Das visual Kommando verlangt dass die open Option gesetzt istX
-%s wurde in zu viele Dateinamen expandiertX
+
Leere DateiX
Keine vorhergehende F, f, T oder t SucheX
%s nicht gefundenX
@@ -204,7 +204,7 @@ Bereits am ZeilenendeX
%s ist kein vi KommandoX
Benutzung: %sX
Keine Zeichen zu loeschenX
-
+Das Q Kommando benoetigt das ex Terminal InterfaceX
Kein Kommando zu wiederholenX
Die Datei ist leerX
%s kann nicht als Bewegungskommando verwendet werdenX
@@ -252,9 +252,9 @@ Teil der Datei, nicht geschriebenX
%s: Schreibsperrung war nicht moeglichX
schreibe ...X
%s: WARNUNG: DATEI ABGESCHNITTENX
-
+Bereits am ersten 'tag' dieser GruppeX
%s: neue Datei: %lu Zeilen, %lu ZeichenX
-%s: %s%lu Zeilen, %lu ZeichenX
+%s: %lu Zeilen, %lu ZeichenX
%s wurde in zu viele Dateinamen expandiertX
%s: keine regulaere DateiX
%s: gehoehrt nicht IhnenX
@@ -275,21 +275,21 @@ Kommando schief gelaufen, noch keine Datei eingelesenX
weiter?X
unerwartetes Zeichen - EreignisX
unerwartetes Dateiende - EreignisX
-
+Keine Position zum Anspringen gefundenX
unerwartetes Unterbrechungs - EreignisX
unerwartetes Verlassen - EreignisX
unerwartetes Wiederherstellungs - EreignisX
-
+Bereits am letzten 'tag' dieser GruppeX
Das %s Kommando benoetigt das ex Terminal-InterfaceX
Diese Form von %s wird nicht unterstuetzt wenn die 'secure edit' - Option gesetzt istX
unerwartetes Zeichenketten - EreignisX
unerwartetes timeout - EreignisX
unerwartetes Schreibe - EreignisX
-unerwartetes Schreibe-und-Verlassen - EreignisX
+
Shell Expandierungen nicht unterstuetzt wenn die 'secure edit' - Option gesetzt istX
Das %s Kommando wird nicht unterstuetzt wenn die 'secure edit' - Option gesetzt istX
set: %s kann nicht ausgeschaltet werdenX
-
+Anzeige zu klein.X
angefuegtX
geaendertX
geloeschtX
@@ -300,4 +300,16 @@ in Puffer geschriebenX
ZeileX
ZeilenX
Vi wurde nicht mit dem Tcl Interpreter gelinktX
-Datei wurde seit dem letzten Schreiben veraendert.\nX
+Datei wurde seit dem letzten Schreiben veraendert.X
+Shell Expansion nicht geklapptX
+Es ist keine %s Edieroption angegebenX
+Vi wurde nicht mit einem Perl Interpreter geladenX
+Kein ex Kommando auszufuehrenX
+Druecke <CR> um ein Kommando auszufuehren, :q zum verlassenX
+Verwende \"cscope help\" fuer HilestellungX
+Keine cscope Verbindung aktivX
+%s: unbekannter Suchtyp: verwende einen aus %sX
+%d: keine solche cscope VerbindungX
+set: die %s Option kann nicht eingeschaltet werdenX
+set: die %s Option kann nicht auf 0 gesetzt werdenX
+%s: angefuegt: %lu Zeilen, %lu ZeichenX
diff --git a/usr.bin/vi/catalog/german.base b/usr.bin/vi/catalog/german.base
index 2f59cad6276..80bf55b7ca3 100644
--- a/usr.bin/vi/catalog/german.base
+++ b/usr.bin/vi/catalog/german.base
@@ -43,12 +43,8 @@
044 "Die lisp Option ist nicht implementiert"
045 "Messages nicht abgeschalten: %s"
046 "Messages nicht eingeschalten: %s"
-047 "Die modeline(s) Option kann nie gesetzt werden"
048 "Die paragraph Option muss Gruppen zu zwei Zeichen enthalten"
049 "Die section Option muss Gruppen zu zwei Zeichen enthalten"
-050 "shiftwidth kann nicht auf 0 gesetzt werden"
-051 "Die sourceany Option kann nie gesetzt werden"
-052 "Tabulatorpositionen duerfen nicht auf 0 gesetzt werden"
053 "Der Standardpuffer ist leer"
054 "Puffer %s ist leer"
055 "Dateien mit newlines im Namen sind nicht wiederherstellbar"
@@ -140,7 +136,7 @@
142 "Rettung dieser Datei nicht moeglich"
143 "Datei gerettet"
144 "%s wurde in zu viele Dateinamen expandiert"
-145 "Nur regulaere Dateien koennen gelesen werden"
+145 "Nur regulaere Dateien und named pipes koennen gelesen werden"
146 "%s: Lesesperrung war nicht moeglich"
147 "lese ..."
148 "%s: %lu Zeilen, %lu Zeichen"
@@ -156,12 +152,13 @@
158 "Kein vorhergehender 'tag' angegeben"
159 "Weniger als %s Eintraege auf dem 'tag'-Stack; verwende :display t[ags]"
160 "Keine Datei namens %s auf dem 'tag'-Stack; verwende :display t[ags]"
+161 "Druecke Enter um fortzufahren: "
162 "%s: 'tag' nicht gefunden"
163 "%s: kaputter 'tag' in %s"
-164 "%s: die 'tag'-Zeile existiert nicht"
+164 "%s: die Zeilennummer des 'tag' ist hinter dem Dateiende"
165 "Der 'tag' Stack ist leer"
166 "%s: Suchmuster nicht gefunden"
-167 "Weitere Dateien zu edieren; verwende n[ext] um zur naechsten Datei zu gehen, q[uit]! zum Verlassen"
+167 "%d weitere Dateien zu edieren"
168 "Puffer %s ist leer"
169 "Bestaetige Aenderung [n]"
170 "Unterbrochen."
@@ -170,7 +167,6 @@
173 "Das Kommando %s verlangt, dass bereits eine Datei eingelesen wurde"
174 "Benutzung: %s"
175 "Das visual Kommando verlangt dass die open Option gesetzt ist"
-176 "%s wurde in zu viele Dateinamen expandiert"
177 "Leere Datei"
178 "Keine vorhergehende F, f, T oder t Suche"
179 "%s nicht gefunden"
@@ -201,7 +197,7 @@
204 "%s ist kein vi Kommando"
205 "Benutzung: %s"
206 "Keine Zeichen zu loeschen"
-206 "Keine Zeichen zu loeschen"
+207 "Das Q Kommando benoetigt das ex Terminal Interface"
208 "Kein Kommando zu wiederholen"
209 "Die Datei ist leer"
210 "%s kann nicht als Bewegungskommando verwendet werden"
@@ -247,8 +243,9 @@
252 "%s: Schreibsperrung war nicht moeglich"
253 "schreibe ..."
254 "%s: WARNUNG: DATEI ABGESCHNITTEN"
+255 "Bereits am ersten 'tag' dieser Gruppe"
256 "%s: neue Datei: %lu Zeilen, %lu Zeichen"
-257 "%s: %s%lu Zeilen, %lu Zeichen"
+257 "%s: %lu Zeilen, %lu Zeichen"
258 "%s wurde in zu viele Dateinamen expandiert"
259 "%s: keine regulaere Datei"
260 "%s: gehoehrt nicht Ihnen"
@@ -269,18 +266,20 @@
275 " weiter?"
276 "unerwartetes Zeichen - Ereignis"
277 "unerwartetes Dateiende - Ereignis"
+278 "Keine Position zum Anspringen gefunden"
279 "unerwartetes Unterbrechungs - Ereignis"
280 "unerwartetes Verlassen - Ereignis"
281 "unerwartetes Wiederherstellungs - Ereignis"
+282 "Bereits am letzten 'tag' dieser Gruppe"
283 "Das %s Kommando benoetigt das ex Terminal-Interface"
284 "Diese Form von %s wird nicht unterstuetzt wenn die 'secure edit' - Option gesetzt ist"
285 "unerwartetes Zeichenketten - Ereignis"
286 "unerwartetes timeout - Ereignis"
287 "unerwartetes Schreibe - Ereignis"
-288 "unerwartetes Schreibe-und-Verlassen - Ereignis"
289 "Shell Expandierungen nicht unterstuetzt wenn die 'secure edit' - Option gesetzt ist"
290 "Das %s Kommando wird nicht unterstuetzt wenn die 'secure edit' - Option gesetzt ist"
291 "set: %s kann nicht ausgeschaltet werden"
+292 "Anzeige zu klein."
293 "angefuegt"
294 "geaendert"
295 "geloescht"
@@ -291,4 +290,16 @@
300 "Zeile"
301 "Zeilen"
302 "Vi wurde nicht mit dem Tcl Interpreter gelinkt"
-303 "Datei wurde seit dem letzten Schreiben veraendert.\n"
+303 "Datei wurde seit dem letzten Schreiben veraendert."
+304 "Shell Expansion nicht geklappt"
+305 "Es ist keine %s Edieroption angegeben"
+306 "Vi wurde nicht mit einem Perl Interpreter geladen"
+307 "Kein ex Kommando auszufuehren"
+308 "Druecke <CR> um ein Kommando auszufuehren, :q zum verlassen"
+309 "Verwende \"cscope help\" fuer Hilestellung"
+310 "Keine cscope Verbindung aktiv"
+311 "%s: unbekannter Suchtyp: verwende einen aus %s"
+312 "%d: keine solche cscope Verbindung"
+313 "set: die %s Option kann nicht eingeschaltet werden"
+314 "set: die %s Option kann nicht auf 0 gesetzt werden"
+315 "%s: angefuegt: %lu Zeilen, %lu Zeichen"
diff --git a/usr.bin/vi/catalog/german.check b/usr.bin/vi/catalog/german.check
index f1b871f5931..19d1843c429 100644
--- a/usr.bin/vi/catalog/german.check
+++ b/usr.bin/vi/catalog/german.check
@@ -1,47 +1,28 @@
Unused message id's (this is okay):
001
+047
+050
+051
+052
081
-161
+176
213
229
-255
-278
-282
-292
+288
=========================
-MISSING ERROR MESSAGES (FIX!!!):
-161
-207
-255
-278
-282
-292
-304
-305
-306
-307
-308
-309
-310
-311
-312
-313
-314
+MISSING ERROR MESSAGES (Please add!):
+316
=========================
Extra error messages (just delete them):
-047
-050
-051
-052
-176
=========================
-MESSAGES WITH THE SAME MESSAGE ID's (FIX!!!):
+MESSAGES WITH THE SAME MESSAGE ID's (FIX!):
=========================
Duplicate messages, both id and message (this is okay):
- 2 206 "Keine Zeichen zu loeschen"
=========================
Duplicate messages, just message (this is okay):
2 %s existiert, nicht geschrieben; verwende ! zum UeberschreibenX
+ 2 %s wurde in zu viele Dateinamen expandiertX
+ 2 %s: %lu Zeilen, %lu ZeichenX
2 %s: Wiederherstellungsdatei hat falsches FormatX
2 Aenderungen nicht wiederherstellbar falls die Editorsitzung schief gehtX
2 Kein altes SuchmusterX
@@ -50,7 +31,6 @@ Duplicate messages, just message (this is okay):
2 geaendertX
2 kopiere Datei fuer Wiederherstellung ...X
2 set: %s ist keine boolsche OptionX
- 3 %s wurde in zu viele Dateinamen expandiertX
3 %s: loeschenX
3 Datei wurde seit dem letzten vollstaendigen Schreiben geaendert; schreibe oder verwende ! zum ignorierenX
4 Benutzung: %sX
diff --git a/usr.bin/vi/catalog/ru_SU.KOI8-R b/usr.bin/vi/catalog/ru_SU.KOI8-R
index 0486e6a66b4..95012d01408 100644
--- a/usr.bin/vi/catalog/ru_SU.KOI8-R
+++ b/usr.bin/vi/catalog/ru_SU.KOI8-R
@@ -142,7 +142,7 @@ kOMANDA open NE REALIZOWANAX
zA]ITA FAJLA NEWOZMOVNAX
fAJL ZA]I]ENX
%s RAS[IRILSQ W SLI[KOM BOLX[OE KOLI^ESTWO IMEN FAJLOWX
-tOLXKO OBY^NYE FAJLY MOGUT BYTX PRO^ITANYX
+
%s: ZA]ITA NA ^TENIE BYLA NEDOSTUPNAX
%s: %lu STROK, %lu SIMWOLOWX
@@ -164,7 +164,7 @@ fAJLA S IMENEM %s W STEKE METOK NET; ISPOLXZUJTE :display t[ags]X
sTEK METOK PUSTX
%s: ISKOMAQ PEREMENNAQ NE NAJDENAX
-e]E ESTX FAJLY DLQ REDAKTIROWANIQ: n[ext] DLQ PEREHODA K SLEDU@]EMU FAJLU ILI q[uit]! DLQ WYHODAX
+
bUFER %s PUSTX
pRERWANOX
diff --git a/usr.bin/vi/catalog/ru_SU.KOI8-R.base b/usr.bin/vi/catalog/ru_SU.KOI8-R.base
index 2e2856c4b7f..983089c33cb 100644
--- a/usr.bin/vi/catalog/ru_SU.KOI8-R.base
+++ b/usr.bin/vi/catalog/ru_SU.KOI8-R.base
@@ -121,7 +121,6 @@
142 "zA]ITA FAJLA NEWOZMOVNA"
143 "fAJL ZA]I]EN"
144 "%s RAS[IRILSQ W SLI[KOM BOLX[OE KOLI^ESTWO IMEN FAJLOW"
-145 "tOLXKO OBY^NYE FAJLY MOGUT BYTX PRO^ITANY"
146 "%s: ZA]ITA NA ^TENIE BYLA NEDOSTUPNA"
148 "%s: %lu STROK, %lu SIMWOLOW"
149 "nET TENEWYH OKON"
@@ -140,7 +139,6 @@
163 "%s: PLOHAQ METKA W %s"
165 "sTEK METOK PUST"
166 "%s: ISKOMAQ PEREMENNAQ NE NAJDENA"
-167 "e]E ESTX FAJLY DLQ REDAKTIROWANIQ: n[ext] DLQ PEREHODA K SLEDU@]EMU FAJLU ILI q[uit]! DLQ WYHODA"
168 "bUFER %s PUST"
170 "pRERWANO"
171 "oTSUTSTWIE BUFERA DLQ ISPOLXZOWANIQ"
diff --git a/usr.bin/vi/catalog/ru_SU.KOI8-R.check b/usr.bin/vi/catalog/ru_SU.KOI8-R.check
index 0817b37e317..b3fce9b6987 100644
--- a/usr.bin/vi/catalog/ru_SU.KOI8-R.check
+++ b/usr.bin/vi/catalog/ru_SU.KOI8-R.check
@@ -20,9 +20,11 @@ Unused message id's (this is okay):
091
093
110
+145
147
161
164
+167
169
191
207
@@ -46,7 +48,7 @@ Unused message id's (this is okay):
255
266
=========================
-MISSING ERROR MESSAGES (FIX!!!):
+MISSING ERROR MESSAGES (Please add!):
008
021
022
@@ -66,14 +68,15 @@ MISSING ERROR MESSAGES (FIX!!!):
091
093
110
+145
147
161
164
+167
169
191
207
209
-209
212
215
216
@@ -110,7 +113,6 @@ MISSING ERROR MESSAGES (FIX!!!):
285
286
287
-288
289
290
291
@@ -137,6 +139,8 @@ MISSING ERROR MESSAGES (FIX!!!):
312
313
314
+315
+316
=========================
Extra error messages (just delete them):
047
@@ -145,7 +149,7 @@ Extra error messages (just delete them):
052
176
=========================
-MESSAGES WITH THE SAME MESSAGE ID's (FIX!!!):
+MESSAGES WITH THE SAME MESSAGE ID's (FIX!):
=========================
Duplicate messages, both id and message (this is okay):
=========================
diff --git a/usr.bin/vi/catalog/swedish b/usr.bin/vi/catalog/swedish
index 0e1a494be74..a7c1d97a182 100644
--- a/usr.bin/vi/catalog/swedish
+++ b/usr.bin/vi/catalog/swedish
@@ -142,7 +142,7 @@ Open kommandot är inte implementerat ännuX
Säkerhetskopiering av filen är inte möjligtX
Filen säkerhetskopieradX
%s expanderade till för många filnamnX
-Bara normala filer kan läsasX
+Endast vanliga filer och namngivna rör kan läsasX
%s: läslåset är otillgängligtX
Läser...X
%s: %lu rader, %lu teckenX
@@ -161,10 +161,10 @@ Det finns ingen fil %s i märkesstacken; använd :display t[ags]X
Tryck Enter för att fortsätta: X
%s: märke inte funnetX
%s: korrupt märke i %sX
-%s: raden i märket existerar inteX
+%s: märkets radnummer är bortom filslutetX
Märkesstacken är tomX
%s: söksträngen inte funnenX
-Fler filer att editera; använd n[ext] för att gå till nästa, q[uit]! för att avslutaX
+%d filer till att editeraX
Buffert %s är tomX
Bekräfta ändring? [n]X
AvbrutenX
@@ -254,7 +254,7 @@ Skriver...X
%s: VARNING: FILEN TRUNKERADX
Redan vid första märket i denna gruppX
%s: ny fil: %lu rader, %lu teckenX
-%s: %s%lu rader, %lu teckenX
+%s: %lu rader, %lu teckenX
%s expanderade till för många filnamnX
%s är inte en normal filX
%s ägs inte av digX
@@ -285,7 +285,7 @@ Den formen av %s är inte tillgänglig när secure edit flaggan är sattX
Oväntad stränghändelseX
Oväntad tidshändelseX
Oväntad skrivhändelseX
-Oväntad skriv-och-avslutahändelseX
+
Skalexpansion är inte tillgänglig när secure edit flaggan är sattX
%s kommandot är inte tillgänglig när secure edit flaggan är sattX
set: %s kan inte slås avX
@@ -312,3 +312,4 @@ Inga cscope kopplingar körsX
%d: ingen sådan cscope sessionX
set: %s flaggan får aldrig slås påX
set: %s flaggan får aldrig sättas till 0X
+%s: tillagt: %lu rader, %lu teckenX
diff --git a/usr.bin/vi/catalog/swedish.base b/usr.bin/vi/catalog/swedish.base
index 4adc5c51274..e9001509e8f 100644
--- a/usr.bin/vi/catalog/swedish.base
+++ b/usr.bin/vi/catalog/swedish.base
@@ -136,7 +136,7 @@
142 "Säkerhetskopiering av filen är inte möjligt"
143 "Filen säkerhetskopierad"
144 "%s expanderade till för många filnamn"
-145 "Bara normala filer kan läsas"
+145 "Endast vanliga filer och namngivna rör kan läsas"
146 "%s: läslåset är otillgängligt"
147 "Läser..."
148 "%s: %lu rader, %lu tecken"
@@ -155,10 +155,10 @@
161 "Tryck Enter för att fortsätta: "
162 "%s: märke inte funnet"
163 "%s: korrupt märke i %s"
-164 "%s: raden i märket existerar inte"
+164 "%s: märkets radnummer är bortom filslutet"
165 "Märkesstacken är tom"
166 "%s: söksträngen inte funnen"
-167 "Fler filer att editera; använd n[ext] för att gå till nästa, q[uit]! för att avsluta"
+167 "%d filer till att editera"
168 "Buffert %s är tom"
169 "Bekräfta ändring? [n]"
170 "Avbruten"
@@ -245,7 +245,7 @@
254 "%s: VARNING: FILEN TRUNKERAD"
255 "Redan vid första märket i denna grupp"
256 "%s: ny fil: %lu rader, %lu tecken"
-257 "%s: %s%lu rader, %lu tecken"
+257 "%s: %lu rader, %lu tecken"
258 "%s expanderade till för många filnamn"
259 "%s är inte en normal fil"
260 "%s ägs inte av dig"
@@ -276,7 +276,6 @@
285 "Oväntad stränghändelse"
286 "Oväntad tidshändelse"
287 "Oväntad skrivhändelse"
-288 "Oväntad skriv-och-avslutahändelse"
289 "Skalexpansion är inte tillgänglig när secure edit flaggan är satt"
290 "%s kommandot är inte tillgänglig när secure edit flaggan är satt"
291 "set: %s kan inte slås av"
@@ -303,3 +302,4 @@
312 "%d: ingen sådan cscope session"
313 "set: %s flaggan får aldrig slås på"
314 "set: %s flaggan får aldrig sättas till 0"
+315 "%s: tillagt: %lu rader, %lu tecken"
diff --git a/usr.bin/vi/catalog/swedish.check b/usr.bin/vi/catalog/swedish.check
index 139c599b47d..6185781b3ee 100644
--- a/usr.bin/vi/catalog/swedish.check
+++ b/usr.bin/vi/catalog/swedish.check
@@ -8,17 +8,20 @@ Unused message id's (this is okay):
176
213
229
+288
=========================
-MISSING ERROR MESSAGES (FIX!!!):
+MISSING ERROR MESSAGES (Please add!):
+316
=========================
Extra error messages (just delete them):
=========================
-MESSAGES WITH THE SAME MESSAGE ID's (FIX!!!):
+MESSAGES WITH THE SAME MESSAGE ID's (FIX!):
=========================
Duplicate messages, both id and message (this is okay):
=========================
Duplicate messages, just message (this is okay):
2 %s expanderade till för många filnamnX
+ 2 %s: %lu rader, %lu teckenX
2 %s: Återskapningsfilen är korruptX
2 Filen har ändrats efter den sparats; spara eller använd !X
2 Ingen tidigare söksträngX
diff --git a/usr.bin/vi/cl/cl.h b/usr.bin/vi/cl/cl.h
index dc0c74b3cf5..20f6541a34f 100644
--- a/usr.bin/vi/cl/cl.h
+++ b/usr.bin/vi/cl/cl.h
@@ -6,7 +6,7 @@
*
* See the LICENSE file for redistribution information.
*
- * @(#)cl.h 10.15 (Berkeley) 5/16/96
+ * @(#)cl.h 10.16 (Berkeley) 6/18/96
*/
typedef struct _cl_private {
@@ -40,12 +40,13 @@ typedef struct _cl_private {
enum { /* Terminal initialization strings. */
TE_SENT=0, TI_SENT } ti_te;
-#define CL_SCR_EX_INIT 0x001 /* Ex screen initialized. */
-#define CL_SCR_VI_INIT 0x002 /* Vi screen initialized. */
-#define CL_SIGHUP 0x004 /* SIGHUP arrived. */
-#define CL_SIGINT 0x008 /* SIGINT arrived. */
-#define CL_SIGTERM 0x010 /* SIGTERM arrived. */
-#define CL_SIGWINCH 0x020 /* SIGWINCH arrived. */
+#define CL_RENAME 0x001 /* X11 xterm icon/window renamed. */
+#define CL_SCR_EX_INIT 0x002 /* Ex screen initialized. */
+#define CL_SCR_VI_INIT 0x004 /* Vi screen initialized. */
+#define CL_SIGHUP 0x008 /* SIGHUP arrived. */
+#define CL_SIGINT 0x010 /* SIGINT arrived. */
+#define CL_SIGTERM 0x020 /* SIGTERM arrived. */
+#define CL_SIGWINCH 0x040 /* SIGWINCH arrived. */
u_int32_t flags;
} CL_PRIVATE;
@@ -66,6 +67,9 @@ typedef enum { INP_OK=0, INP_EOF, INP_ERR, INP_INTR, INP_TIMEOUT } input_t;
if (F_ISSET(sp, SC_EX) && !F_ISSET(sp, SC_SCR_EX)) \
return (0);
+/* X11 xterm escape sequence to rename the icon/window. */
+#define XTERM_RENAME "\033]0;%s\007"
+
/*
* XXX
* Some implementations of curses.h don't define these for us. Used for
diff --git a/usr.bin/vi/cl/cl_bsd.c b/usr.bin/vi/cl/cl_bsd.c
index cd0ef9c87e9..c78c3e27d08 100644
--- a/usr.bin/vi/cl/cl_bsd.c
+++ b/usr.bin/vi/cl/cl_bsd.c
@@ -8,7 +8,7 @@
#include "config.h"
#ifndef lint
-static const char sccsid[] = "@(#)cl_bsd.c 8.25 (Berkeley) 4/30/96";
+static const char sccsid[] = "@(#)cl_bsd.c 8.29 (Berkeley) 7/1/96";
#endif /* not lint */
#include <sys/types.h>
@@ -224,6 +224,20 @@ static const TL list[] = {
"smso", "so", /* Standout begin. */
};
+#ifdef _AIX
+/*
+ * AIX's implementation for function keys greater than 10 is different and
+ * only goes as far as 36.
+ */
+static const char codes[] = {
+/* 0-10 */ '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', ';',
+/* 11-20 */ '<', '>', '!', '@', '#', '$', '%', '^', '&', '*',
+/* 21-30 */ '(', ')', '-', '_', '+', ',', ':', '?', '[', ']',
+/* 31-36 */ '{', '}', '|', '~', '/', '='
+};
+
+#else
+
/*
* !!!
* Historically, the 4BSD termcap code didn't support functions keys greater
@@ -241,6 +255,7 @@ static const char codes[] = {
'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm',
'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z',
};
+#endif /* _AIX */
/*
* lcmp --
@@ -256,7 +271,13 @@ lcmp(a, b)
/*
* tigetstr --
*
- * PUBLIC: #ifndef HAVE_CURSES_TIGETSTR
+ * Vendors put the prototype for tigetstr into random include files, including
+ * <term.h>, which we can't include because it makes other systems unhappy.
+ * Try and work around the problem, since we only care about the return value.
+ *
+ * PUBLIC: #ifdef HAVE_CURSES_TIGETSTR
+ * PUBLIC: char *tigetstr();
+ * PUBLIC: #else
* PUBLIC: char *tigetstr __P((char *));
* PUBLIC: #endif
*/
@@ -271,18 +292,30 @@ tigetstr(name)
if ((tlp = bsearch(name,
list, sizeof(list) / sizeof(TL), sizeof(TL), lcmp)) == NULL) {
+#ifdef _AIX
+ if (name[0] == 'k' &&
+ name[1] == 'f' && (n = atoi(name + 2)) <= 36) {
+ keyname[0] = 'k';
+ keyname[1] = codes[n];
+ keyname[2] = '\0';
+#else
if (name[0] == 'k' &&
name[1] == 'f' && (n = atoi(name + 2)) <= 63) {
keyname[0] = n <= 10 ? 'k' : 'F';
keyname[1] = codes[n];
keyname[2] = '\0';
+#endif
name = keyname;
}
} else
name = tlp->termcap;
p = sbuf;
+#ifdef _AIX
+ return ((p = tgetstr(name, &p)) == NULL ? (char *)-1 : strcpy(sbuf, p));
+#else
return (tgetstr(name, &p) == NULL ? (char *)-1 : sbuf);
+#endif
}
/*
diff --git a/usr.bin/vi/cl/cl_funcs.c b/usr.bin/vi/cl/cl_funcs.c
index 774f14fa236..866ab839b7c 100644
--- a/usr.bin/vi/cl/cl_funcs.c
+++ b/usr.bin/vi/cl/cl_funcs.c
@@ -10,7 +10,7 @@
#include "config.h"
#ifndef lint
-static const char sccsid[] = "@(#)cl_funcs.c 10.40 (Berkeley) 5/16/96";
+static const char sccsid[] = "@(#)cl_funcs.c 10.45 (Berkeley) 6/26/96";
#endif /* not lint */
#include <sys/types.h>
@@ -83,10 +83,60 @@ cl_attr(sp, attribute, on)
{
CL_PRIVATE *clp;
+ clp = CLP(sp);
+
switch (attribute) {
+ case SA_ALTERNATE:
+ /*
+ * !!!
+ * There's a major layering violation here. The problem is that the
+ * X11 xterm screen has what's known as an "alternate" screen. Some
+ * xterm termcap/terminfo entries include sequences to switch to/from
+ * that alternate screen as part of the ti/te (smcup/rmcup) strings.
+ * Vi runs in the alternate screen, so that you are returned to the
+ * same screen contents on exit from vi that you had when you entered
+ * vi. Further, when you run :shell, or :!date or similar ex commands,
+ * you also see the original screen contents. This wasn't deliberate
+ * on vi's part, it's just that it historically sent terminal init/end
+ * sequences at those times, and the addition of the alternate screen
+ * sequences to the strings changed the behavior of vi. The problem
+ * caused by this is that we don't want to switch back to the alternate
+ * screen while getting a new command from the user, when the user is
+ * continuing to enter ex commands, e.g.:
+ *
+ * :!date <<< switch to original screen
+ * [Hit return to continue] <<< prompt user to continue
+ * :command <<< get command from user
+ *
+ * Note that the :command input is a true vi input mode, e.g., input
+ * maps and abbreviations are being done. So, we need to be able to
+ * switch back into the vi screen mode, without flashing the screen.
+ *
+ * To make matters worse, the curses initscr() and endwin() calls will
+ * do this automatically -- so, this attribute isn't as controlled by
+ * the higher level screen as closely as one might like.
+ */
+ if (on) {
+ if (clp->ti_te != TI_SENT) {
+ clp->ti_te = TI_SENT;
+ if (clp->smcup == NULL)
+ (void)cl_getcap(sp, "smcup", &clp->smcup);
+ if (clp->smcup != NULL)
+ (void)tputs(clp->smcup, 1, cl_putchar);
+ }
+ } else
+ if (clp->ti_te != TE_SENT) {
+ clp->ti_te = TE_SENT;
+ if (clp->rmcup == NULL)
+ (void)cl_getcap(sp, "rmcup", &clp->rmcup);
+ if (clp->rmcup != NULL)
+ (void)tputs(clp->rmcup, 1, cl_putchar);
+ (void)fflush(stdout);
+ }
+ (void)fflush(stdout);
+ break;
case SA_INVERSE:
if (F_ISSET(sp, SC_EX | SC_SCR_EXWROTE)) {
- clp = CLP(sp);
if (clp->smso == NULL)
return (1);
if (on)
@@ -446,7 +496,34 @@ int
cl_rename(sp)
SCR *sp;
{
- return (0); /* Curses doesn't care. */
+ GS *gp;
+ CL_PRIVATE *clp;
+ char *ttype;
+
+ gp = sp->gp;
+ clp = CLP(sp);
+
+ ttype = OG_STR(gp, GO_TERM);
+
+ /*
+ * XXX
+ * We can only rename windows for xterm. Since it's destructive (we
+ * can't restore it to its original value on exit) we have to get the
+ * user's permission.
+ */
+ if (O_ISSET(sp, O_WINDOWNAME)) {
+ if (!strncmp(ttype, "xterm", sizeof("xterm") - 1)) {
+ F_SET(clp, CL_RENAME);
+ (void)printf(XTERM_RENAME, sp->frp->name);
+ (void)fflush(stdout);
+ }
+ } else
+ if (F_ISSET(clp, CL_RENAME)) {
+ F_CLR(clp, CL_RENAME);
+ (void)printf(XTERM_RENAME, ttype);
+ (void)fflush(stdout);
+ }
+ return (0);
}
/*
@@ -527,12 +604,7 @@ cl_suspend(sp, allowedp)
(void)keypad(stdscr, FALSE);
#ifdef HAVE_BSD_CURSES
- /* Send the terminal end sequence. */
- if (clp->rmcup == NULL)
- (void)cl_getcap(sp, "rmcup", &clp->rmcup);
- if (clp->rmcup != NULL)
- (void)tputs(clp->rmcup, 1, cl_putchar);
- (void)fflush(stdout);
+ (void)cl_attr(sp, SA_ALTERNATE, 0);
#else
(void)endwin();
#endif
@@ -555,12 +627,7 @@ cl_suspend(sp, allowedp)
if (F_ISSET(gp, G_STDIN_TTY))
(void)tcsetattr(STDIN_FILENO, TCSASOFT | TCSADRAIN, &t);
- /* Send the terminal initialization sequence. */
- if (clp->smcup == NULL)
- (void)cl_getcap(sp, "smcup", &clp->smcup);
- if (clp->smcup != NULL)
- (void)tputs(clp->smcup, 1, cl_putchar);
- (void)fflush(stdout);
+ (void)cl_attr(sp, SA_ALTERNATE, 1);
#endif
/* Put the cursor keys into application mode. */
(void)keypad(stdscr, TRUE);
diff --git a/usr.bin/vi/cl/cl_main.c b/usr.bin/vi/cl/cl_main.c
index 1a436924aaf..f89f20b41dc 100644
--- a/usr.bin/vi/cl/cl_main.c
+++ b/usr.bin/vi/cl/cl_main.c
@@ -10,7 +10,7 @@
#include "config.h"
#ifndef lint
-static const char sccsid[] = "@(#)cl_main.c 10.27 (Berkeley) 4/28/96";
+static const char sccsid[] = "@(#)cl_main.c 10.32 (Berkeley) 7/1/96";
#endif /* not lint */
#include <sys/types.h>
@@ -28,17 +28,21 @@ static const char sccsid[] = "@(#)cl_main.c 10.27 (Berkeley) 4/28/96";
#include <unistd.h>
#include "../common/common.h"
+#ifdef notyet
+#include "../ip/ip.h"
+#endif
#include "cl.h"
#include "pathnames.h"
GS *__global_list; /* GLOBAL: List of screens. */
sigset_t __sigblockset; /* GLOBAL: Blocked signals. */
-static GS *gs_init __P((char *));
-static void nomem __P((char *));
-static int setsig __P((int, struct sigaction *, void (*)(int)));
-static void sig_end __P((GS *));
-static void term_init __P((char *, char *));
+static CL_PRIVATE *cl_init __P((GS *));
+static GS *gs_init __P((char *));
+static void nomem __P((char *));
+static int setsig __P((int, struct sigaction *, void (*)(int)));
+static void sig_end __P((GS *));
+static void term_init __P((char *, char *));
/*
* main --
@@ -54,7 +58,7 @@ main(argc, argv)
GS *gp;
size_t rows, cols;
int rval;
- char **p_av, **t_av, *ttype;
+ char *ip_arg, **p_av, **t_av, *ttype;
/* If loaded at 0 and jumping through a NULL pointer, stop. */
if (reenter++)
@@ -62,22 +66,52 @@ main(argc, argv)
/* Create and initialize the global structure. */
__global_list = gp = gs_init(argv[0]);
- clp = GCLP(gp);
-#ifdef NOT_NEEDED_FOR_CURSES
/*
* Strip out any arguments that vi isn't going to understand. There's
* no way to portably call getopt twice, so arguments parsed here must
* be removed from the argument list.
*/
+#ifdef notyet
+ ip_arg = NULL;
for (p_av = t_av = argv;;) {
if (*t_av == NULL) {
*p_av = NULL;
break;
}
+ if (!strcmp(*t_av, "--")) {
+ while ((*p_av++ = *t_av++) != NULL);
+ break;
+ }
+ if (!memcmp(*t_av, "-I", sizeof("-I") - 1)) {
+ if (t_av[0][2] != '\0') {
+ ip_arg = t_av[0] + 2;
+ ++t_av;
+ --argc;
+ continue;
+ }
+ if (t_av[1] != NULL) {
+ ip_arg = t_av[1];
+ t_av += 2;
+ argc -= 2;
+ continue;
+ }
+ }
*p_av++ = *t_av++;
}
+
+ /*
+ * If we're being called as an editor library, we're done here, we
+ * get loaded with the curses screen, we don't share much code.
+ */
+ if (ip_arg != NULL)
+ exit (ip_main(argc, argv, gp, ip_arg));
+#else
+ ip_arg = argv[0];
#endif
+
+ /* Create and initialize the CL_PRIVATE structure. */
+ clp = cl_init(gp);
/*
* Initialize the terminal information.
@@ -125,6 +159,15 @@ main(argc, argv)
if (clp->tgw != TGW_UNKNOWN)
(void)cl_omesg(NULL, clp, clp->tgw == TGW_SET);
+ /*
+ * XXX
+ * Reset the X11 xterm icon/window name.
+ */
+ if (F_ISSET(clp, CL_RENAME)) {
+ (void)printf(XTERM_RENAME, ttype);
+ (void)fflush(stdout);
+ }
+
/* If a killer signal arrived, pretend we just got it. */
if (clp->killersig) {
(void)signal(clp->killersig, SIG_DFL);
@@ -151,7 +194,6 @@ gs_init(name)
{
CL_PRIVATE *clp;
GS *gp;
- int fd;
char *p;
/* Figure out what our name is. */
@@ -160,12 +202,29 @@ gs_init(name)
/* Allocate the global structure. */
CALLOC_NOMSG(NULL, gp, GS *, 1, sizeof(GS));
+ if (gp == NULL)
+ nomem(name);
+
+
+ gp->progname = name;
+ return (gp);
+}
+
+/*
+ * cl_init --
+ * Create and partially initialize the CL structure.
+ */
+static CL_PRIVATE *
+cl_init(gp)
+ GS *gp;
+{
+ CL_PRIVATE *clp;
+ int fd;
/* Allocate the CL private structure. */
- if (gp != NULL)
- CALLOC_NOMSG(NULL, clp, CL_PRIVATE *, 1, sizeof(CL_PRIVATE));
- if (gp == NULL || clp == NULL)
- nomem(name);
+ CALLOC_NOMSG(NULL, clp, CL_PRIVATE *, 1, sizeof(CL_PRIVATE));
+ if (clp == NULL)
+ nomem(gp->progname);
gp->cl_private = clp;
/* Initialize the list of curses functions. */
@@ -207,15 +266,13 @@ gs_init(name)
goto tcfail;
} else if ((fd = open(_PATH_TTY, O_RDONLY, 0)) != -1) {
if (tcgetattr(fd, &clp->orig) == -1) {
-tcfail: (void)fprintf(stderr,
- "%s: tcgetattr: %s\n", name, strerror(errno));
+tcfail: (void)fprintf(stderr, "%s: tcgetattr: %s\n",
+ gp->progname, strerror(errno));
exit (1);
}
(void)close(fd);
}
-
- gp->progname = name;
- return (gp);
+ return (clp);
}
/*
@@ -305,9 +362,13 @@ sig_init(gp, sp)
sigaddset(&__sigblockset, SIGINT) ||
setsig(SIGINT, &clp->oact[INDX_INT], h_int) ||
sigaddset(&__sigblockset, SIGTERM) ||
- setsig(SIGTERM, &clp->oact[INDX_TERM], h_term) ||
+ setsig(SIGTERM, &clp->oact[INDX_TERM], h_term)
+#ifdef SIGWINCH
+ ||
sigaddset(&__sigblockset, SIGWINCH) ||
- setsig(SIGWINCH, &clp->oact[INDX_WINCH], h_winch)) {
+ setsig(SIGWINCH, &clp->oact[INDX_WINCH], h_winch)
+#endif
+ ) {
(void)fprintf(stderr,
"%s: %s\n", gp->progname, strerror(errno));
return (1);
@@ -315,8 +376,12 @@ sig_init(gp, sp)
} else
if (setsig(SIGHUP, NULL, h_hup) ||
setsig(SIGINT, NULL, h_int) ||
- setsig(SIGTERM, NULL, h_term) ||
- setsig(SIGWINCH, NULL, h_winch)) {
+ setsig(SIGTERM, NULL, h_term)
+#ifdef SIGWINCH
+ ||
+ setsig(SIGWINCH, NULL, h_winch)
+#endif
+ ) {
msgq(sp, M_SYSERR, "signal-reset");
}
return (0);
@@ -370,7 +435,9 @@ sig_end(gp)
(void)sigaction(SIGHUP, NULL, &clp->oact[INDX_HUP]);
(void)sigaction(SIGINT, NULL, &clp->oact[INDX_INT]);
(void)sigaction(SIGTERM, NULL, &clp->oact[INDX_TERM]);
+#ifdef SIGWINCH
(void)sigaction(SIGWINCH, NULL, &clp->oact[INDX_WINCH]);
+#endif
}
/*
diff --git a/usr.bin/vi/cl/cl_read.c b/usr.bin/vi/cl/cl_read.c
index bfbaca7ff0e..24c564f378f 100644
--- a/usr.bin/vi/cl/cl_read.c
+++ b/usr.bin/vi/cl/cl_read.c
@@ -10,7 +10,7 @@
#include "config.h"
#ifndef lint
-static const char sccsid[] = "@(#)cl_read.c 10.13 (Berkeley) 5/3/96";
+static const char sccsid[] = "@(#)cl_read.c 10.14 (Berkeley) 6/30/96";
#endif /* not lint */
#include <sys/types.h>
@@ -85,7 +85,7 @@ retest: if (LF_ISSET(EC_INTERRUPT) || F_ISSET(clp, CL_SIGINT)) {
return (1);
if (changed) {
(void)cl_resize(sp, lines, columns);
- evp->e_event = E_INTERRUPT;
+ evp->e_event = E_WRESIZE;
return (0);
}
/* No real change, ignore the signal. */
diff --git a/usr.bin/vi/cl/cl_screen.c b/usr.bin/vi/cl/cl_screen.c
index bd66ad3e65b..f2447fe0f5b 100644
--- a/usr.bin/vi/cl/cl_screen.c
+++ b/usr.bin/vi/cl/cl_screen.c
@@ -10,7 +10,7 @@
#include "config.h"
#ifndef lint
-static const char sccsid[] = "@(#)cl_screen.c 10.44 (Berkeley) 5/16/96";
+static const char sccsid[] = "@(#)cl_screen.c 10.46 (Berkeley) 6/17/96";
#endif /* not lint */
#include <sys/types.h>
@@ -284,7 +284,11 @@ cl_vi_init(sp)
/* Put the cursor keys into application mode. */
(void)keypad(stdscr, TRUE);
- /* The screen TI sequence just got sent. */
+ /*
+ * XXX
+ * The screen TI sequence just got sent. See the comment in
+ * cl_funcs.c:cl_attr().
+ */
clp->ti_te = TI_SENT;
/*
@@ -368,16 +372,6 @@ fast: /* Set the terminal modes. */
err: (void)cl_vi_end(sp->gp);
return (1);
}
-
- /* If not already done, send the terminal initialization sequence. */
- if (clp->ti_te == TE_SENT) {
- clp->ti_te = TI_SENT;
- if (clp->smcup == NULL)
- (void)cl_getcap(sp, "smcup", &clp->smcup);
- if (clp->smcup != NULL)
- (void)tputs(clp->smcup, 1, cl_putchar);
- (void)fflush(stdout);
- }
return (0);
}
@@ -415,7 +409,11 @@ cl_vi_end(gp)
/* End curses window. */
(void)endwin();
- /* The screen TE sequence just got sent. */
+ /*
+ * XXX
+ * The screen TE sequence just got sent. See the comment in
+ * cl_funcs.c:cl_attr().
+ */
clp->ti_te = TE_SENT;
return (0);
@@ -491,16 +489,6 @@ fast: if (tcsetattr(STDIN_FILENO, TCSADRAIN | TCSASOFT, &clp->ex_enter)) {
msgq(sp, M_SYSERR, "tcsetattr");
return (1);
}
-
- /* If not already done, send the terminal end sequence. */
- if (clp->ti_te == TI_SENT) {
- clp->ti_te = TE_SENT;
- if (clp->rmcup == NULL)
- (void)cl_getcap(sp, "rmcup", &clp->rmcup);
- if (clp->rmcup != NULL)
- (void)tputs(clp->rmcup, 1, cl_putchar);
- (void)fflush(stdout);
- }
return (0);
}
@@ -575,11 +563,7 @@ cl_freecap(clp)
/*
* cl_putenv --
- * Put a value into the environment. We use putenv(3) because it's
- * more portable. The following hack is because some moron decided
- * to keep a reference to the memory passed to putenv(3), instead of
- * having it allocate its own. Someone clearly needs to get promoted
- * into management.
+ * Put a value into the environment.
*/
static int
cl_putenv(name, str, value)
diff --git a/usr.bin/vi/cl/cl_term.c b/usr.bin/vi/cl/cl_term.c
index 8f9088aebfb..e042fee269d 100644
--- a/usr.bin/vi/cl/cl_term.c
+++ b/usr.bin/vi/cl/cl_term.c
@@ -428,9 +428,9 @@ noterm: if (row == 0)
*
* PUBLIC: int cl_putchar __P((int));
*/
-void
+int
cl_putchar(ch)
int ch;
{
- putchar(ch);
+ return (putchar(ch));
}
diff --git a/usr.bin/vi/common/api.c b/usr.bin/vi/common/api.c
index bf90d1c717e..a4c5a2a73ed 100644
--- a/usr.bin/vi/common/api.c
+++ b/usr.bin/vi/common/api.c
@@ -12,7 +12,7 @@
#include "config.h"
#ifndef lint
-static const char sccsid[] = "@(#)api.c 8.18 (Berkeley) 4/27/96";
+static const char sccsid[] = "@(#)api.c 8.19 (Berkeley) 6/8/96";
#endif /* not lint */
#include <sys/types.h>
diff --git a/usr.bin/vi/common/common.h b/usr.bin/vi/common/common.h
index 9b785073adc..555db960d7a 100644
--- a/usr.bin/vi/common/common.h
+++ b/usr.bin/vi/common/common.h
@@ -6,7 +6,7 @@
*
* See the LICENSE file for redistribution information.
*
- * @(#)common.h 10.11 (Berkeley) 4/10/96
+ * @(#)common.h 10.12 (Berkeley) 5/24/96
*/
/*
@@ -51,7 +51,7 @@ typedef struct _text TEXT;
typedef enum { C_NOTSET, C_CARATSET, C_NOCHANGE, C_ZEROSET } carat_t;
/* Busy message types. */
-typedef enum { BUSY_ON, BUSY_OFF, BUSY_UPDATE } busy_t;
+typedef enum { BUSY_ON = 1, BUSY_OFF, BUSY_UPDATE } busy_t;
/*
* Routines that return a confirmation return:
diff --git a/usr.bin/vi/common/exf.c b/usr.bin/vi/common/exf.c
index dac9714fe86..97b5e9ee4dc 100644
--- a/usr.bin/vi/common/exf.c
+++ b/usr.bin/vi/common/exf.c
@@ -10,7 +10,7 @@
#include "config.h"
#ifndef lint
-static const char sccsid[] = "@(#)exf.c 10.35 (Berkeley) 5/16/96";
+static const char sccsid[] = "@(#)exf.c 10.42 (Berkeley) 6/19/96";
#endif /* not lint */
#include <sys/param.h>
@@ -395,6 +395,9 @@ file_init(sp, frp, rcv_name, flags)
/* Set the initial cursor position, queue initial command. */
file_cinit(sp);
+ /* Change the name of the icon/window. */
+ (void)sp->gp->scr_rename(sp);
+
/* Redraw the screen from scratch, schedule a welcome message. */
F_SET(sp, SC_SCR_REFORMAT | SC_STATUS);
@@ -662,9 +665,11 @@ file_write(sp, fm, tm, name, flags)
FILE *fp;
FREF *frp;
MARK from, to;
+ size_t len;
u_long nlno, nch;
int fd, nf, noname, oflags, rval;
- char *p;
+ char *p, *s, *t, buf[MAXPATHLEN + 64];
+ const char *msgstr;
/*
* Writing '%', or naming the current file explicitly, has the
@@ -838,13 +843,14 @@ file_write(sp, fm, tm, name, flags)
F_CLR(frp, FR_NAMECHANGE);
/*
- * If wrote the entire file clear the modified bit. If the file was
- * written back to the original file name and the file is a temporary,
- * set the "no exit" bit. This permits the user to write the file and
- * use it in the context of the file system, but still keeps them from
- * losing their changes by exiting.
+ * If wrote the entire file, and it wasn't by appending it to a file,
+ * clear the modified bit. If the file was written to the original
+ * file name and the file is a temporary, set the "no exit" bit. This
+ * permits the user to write the file and use it in the context of the
+ * filesystem, but still keeps them from discarding their changes by
+ * exiting.
*/
- if (LF_ISSET(FS_ALL)) {
+ if (LF_ISSET(FS_ALL) && !LF_ISSET(FS_APPEND)) {
F_CLR(sp->ep, F_MODIFIED);
if (F_ISSET(frp, FR_TMPFILE))
if (noname)
@@ -856,14 +862,40 @@ file_write(sp, fm, tm, name, flags)
p = msg_print(sp, name, &nf);
switch (mtype) {
case NEWFILE:
- msgq(sp, M_INFO, "256|%s: new file: %lu lines, %lu characters",
- p, nlno, nch);
+ msgstr = msg_cat(sp,
+ "256|%s: new file: %lu lines, %lu characters", NULL);
+ len = snprintf(buf, sizeof(buf), msgstr, p, nlno, nch);
break;
case OLDFILE:
- msgq(sp, M_INFO, "257|%s: %s%lu lines, %lu characters",
- p, LF_ISSET(FS_APPEND) ? "appended: " : "", nlno, nch);
+ msgstr = msg_cat(sp, LF_ISSET(FS_APPEND) ?
+ "315|%s: appended: %lu lines, %lu characters" :
+ "257|%s: %lu lines, %lu characters", NULL);
+ len = snprintf(buf, sizeof(buf), msgstr, p, nlno, nch);
break;
+ default:
+ abort();
+ }
+
+ /*
+ * There's a nasty problem with long path names. Cscope and tags files
+ * can result in long paths and vi will request a continuation key from
+ * the user. Unfortunately, the user has typed ahead, and chaos will
+ * result. If we assume that the characters in the filenames only take
+ * a single screen column each, we can trim the filename.
+ */
+ s = buf;
+ if (len >= sp->cols) {
+ for (s = buf, t = buf + strlen(p); s < t &&
+ (*s != '/' || len >= sp->cols - 3); ++s, --len);
+ if (s == t)
+ s = buf;
+ else {
+ *--s = '.'; /* Leading ellipses. */
+ *--s = '.';
+ *--s = '.';
+ }
}
+ msgq(sp, M_INFO, s);
if (nf)
FREE_SPACE(sp, p, 0);
return (0);
@@ -1069,16 +1101,25 @@ file_comment(sp)
char *p;
for (lno = 1; !db_get(sp, lno, 0, &p, &len) && len == 0; ++lno);
- if (p == NULL || len <= 1 || p[0] != '/' || p[1] != '*')
+ if (p == NULL)
return;
- F_SET(sp, SC_SCR_TOP);
- do {
- for (; len; --len, ++p)
- if (p[0] == '*' && len > 1 && p[1] == '/') {
+ if (p[0] == '#') {
+ F_SET(sp, SC_SCR_TOP);
+ while (!db_get(sp, ++lno, 0, &p, &len))
+ if (len < 1 || p[0] != '#') {
sp->lno = lno;
return;
}
- } while (!db_get(sp, ++lno, 0, &p, &len));
+ } else if (len >= 1 && p[0] == '/' && p[1] == '*') {
+ F_SET(sp, SC_SCR_TOP);
+ do {
+ for (; len > 1; --len, ++p)
+ if (p[0] == '*' && p[1] == '/') {
+ sp->lno = lno;
+ return;
+ }
+ } while (!db_get(sp, ++lno, 0, &p, &len));
+ }
}
/*
@@ -1346,8 +1387,11 @@ file_lock(sp, name, fdp, fd, iswrite)
* as returning EACCESS and EAGAIN; add EWOULDBLOCK for good measure,
* and assume they are the former. There's no portable way to do this.
*/
- return (errno == EACCES || errno == EAGAIN || errno == EWOULDBLOCK ?
- LOCK_UNAVAIL : LOCK_FAILED);
+ return (errno == EACCES || errno == EAGAIN
+#ifdef EWOULDBLOCK
+ || errno == EWOULDBLOCK
+#endif
+ ? LOCK_UNAVAIL : LOCK_FAILED);
}
#endif
#if !defined(HAVE_LOCK_FLOCK) && !defined(HAVE_LOCK_FCNTL)
diff --git a/usr.bin/vi/common/gs.h b/usr.bin/vi/common/gs.h
index 37805d53c31..afb2721788c 100644
--- a/usr.bin/vi/common/gs.h
+++ b/usr.bin/vi/common/gs.h
@@ -6,7 +6,7 @@
*
* See the LICENSE file for redistribution information.
*
- * @(#)gs.h 10.29 (Berkeley) 4/15/96
+ * @(#)gs.h 10.32 (Berkeley) 6/18/96
*/
#define TEMPORARY_FILE_STRING "/tmp" /* Default temporary file name. */
@@ -38,15 +38,15 @@ struct _fref {
u_int16_t flags;
};
-/* Action argument to scr_exadjust(). */
+/* Action arguments to scr_exadjust(). */
typedef enum { EX_TERM_CE, EX_TERM_SCROLL } exadj_t;
-/* Screen attribute argument to scr_attr(). */
-typedef enum { SA_INVERSE } scr_attr_t;
+/* Screen attribute arguments to scr_attr(). */
+typedef enum { SA_ALTERNATE, SA_INVERSE } scr_attr_t;
-/* Key type argument to scr_keyval(). */
+/* Key type arguments to scr_keyval(). */
typedef enum { KEY_VEOF, KEY_VERASE, KEY_VKILL, KEY_VWERASE } scr_keyval_t;
-
+
/*
* GS:
*
@@ -65,8 +65,8 @@ struct _gs {
void *tcl_interp; /* Tcl_Interp *: Tcl interpreter. */
void *cl_private; /* Curses support private area. */
+ void *ip_private; /* IP support private area. */
void *tk_private; /* Tk/Tcl support private area. */
- void *xaw_private; /* XAW support private area. */
/* File references. */
CIRCLEQ_HEAD(_frefh, _fref) frefq;
@@ -156,7 +156,7 @@ struct _gs {
/* Beep/bell/flash the terminal. */
int (*scr_bell) __P((SCR *));
/* Display a busy message. */
- void (*scr_busy) __P((SCR *, char const *, busy_t));
+ void (*scr_busy) __P((SCR *, const char *, busy_t));
/* Clear to the end of the line. */
int (*scr_clrtoeol) __P((SCR *));
/* Return the cursor location. */
diff --git a/usr.bin/vi/common/key.c b/usr.bin/vi/common/key.c
index 0ff6da0d8d3..474efe2da5e 100644
--- a/usr.bin/vi/common/key.c
+++ b/usr.bin/vi/common/key.c
@@ -10,7 +10,7 @@
#include "config.h"
#ifndef lint
-static const char sccsid[] = "@(#)key.c 10.30 (Berkeley) 4/3/96";
+static const char sccsid[] = "@(#)key.c 10.32 (Berkeley) 6/30/96";
#endif /* not lint */
#include <sys/types.h>
@@ -790,12 +790,12 @@ v_event_err(sp, evp)
case E_TIMEOUT:
msgq(sp, M_ERR, "286|Unexpected timeout event");
break;
+ case E_WRESIZE:
+ msgq(sp, M_ERR, "316|Unexpected resize event");
+ break;
case E_WRITE:
msgq(sp, M_ERR, "287|Unexpected write event");
break;
- case E_WRITEQUIT:
- msgq(sp, M_ERR, "288|Unexpected write-and-quit event");
- break;
/*
* Theoretically, none of these can occur, as they're handled at the
diff --git a/usr.bin/vi/common/key.h b/usr.bin/vi/common/key.h
index 61b0ac87903..76fb64f8e1e 100644
--- a/usr.bin/vi/common/key.h
+++ b/usr.bin/vi/common/key.h
@@ -6,7 +6,7 @@
*
* See the LICENSE file for redistribution information.
*
- * @(#)key.h 10.14 (Berkeley) 4/10/96
+ * @(#)key.h 10.18 (Berkeley) 6/30/96
*/
/*
@@ -48,8 +48,8 @@ typedef enum {
E_SIGTERM, /* SIGTERM. */
E_STRING, /* Input string: e_csp, e_len set. */
E_TIMEOUT, /* Timeout. */
- E_WRITE, /* Write. */
- E_WRITEQUIT /* Write and quit. */
+ E_WRESIZE, /* Window resize. */
+ E_WRITE /* Write. */
} e_event_t;
/*
@@ -185,7 +185,7 @@ extern KEYLIST keylist[];
#define EC_MAPINPUT 0x004 /* Apply the input map. */
#define EC_MAPNODIGIT 0x008 /* Return to a digit. */
#define EC_QUOTED 0x010 /* Try to quote next character */
-#define EC_RAW 0x020 /* Any next character. */
+#define EC_RAW 0x020 /* Any next character. XXX: not used. */
#define EC_TIMEOUT 0x040 /* Timeout to next character. */
/* Flags describing text input special cases. */
diff --git a/usr.bin/vi/common/mem.h b/usr.bin/vi/common/mem.h
index 9eb99dd4c94..af42e6bcd1d 100644
--- a/usr.bin/vi/common/mem.h
+++ b/usr.bin/vi/common/mem.h
@@ -99,7 +99,7 @@
/* Free a GET_SPACE returned buffer. */
#define FREE_SPACE(sp, bp, blen) { \
GS *L__gp = (sp) == NULL ? NULL : (sp)->gp; \
- if (L__gp != NULL && (CHAR_T *)bp == (CHAR_T *)L__gp->tmp_bp) \
+ if (L__gp != NULL && bp == L__gp->tmp_bp) \
F_CLR(L__gp, G_TMP_INUSE); \
else \
free(bp); \
diff --git a/usr.bin/vi/common/msg.c b/usr.bin/vi/common/msg.c
index 27b87b91014..9327b6d2b4d 100644
--- a/usr.bin/vi/common/msg.c
+++ b/usr.bin/vi/common/msg.c
@@ -10,7 +10,7 @@
#include "config.h"
#ifndef lint
-static const char sccsid[] = "@(#)msg.c 10.36 (Berkeley) 5/15/96";
+static const char sccsid[] = "@(#)msg.c 10.39 (Berkeley) 6/20/96";
#endif /* not lint */
#include <sys/param.h>
@@ -381,7 +381,7 @@ msgq_str(sp, mtype, str, fmt)
}
/*
- * msgq_rpt --
+ * mod_rpt --
* Report on the lines that changed.
*
* !!!
@@ -398,10 +398,10 @@ msgq_str(sp, mtype, str, fmt)
* the command 2d}, from the 'b' would report that two lines were deleted,
* not one.
*
- * PUBLIC: void msgq_rpt __P((SCR *));
+ * PUBLIC: void mod_rpt __P((SCR *));
*/
void
-msgq_rpt(sp)
+mod_rpt(sp)
SCR *sp;
{
static char * const action[] = {
@@ -672,9 +672,9 @@ msg_open(sp, file)
char *p, *t, buf[MAXPATHLEN];
if ((p = strrchr(file, '/')) != NULL && p[1] == '\0' &&
- ((t = getenv("LANG")) != NULL && t[0] != '\0' ||
- (t = getenv("LC_MESSAGES")) != NULL && t[0] != '\0')) {
- (void)snprintf(buf, sizeof(buf), "%svi_%s", file, t);
+ ((t = getenv("LC_MESSAGES")) != NULL && t[0] != '\0' ||
+ (t = getenv("LANG")) != NULL && t[0] != '\0')) {
+ (void)snprintf(buf, sizeof(buf), "%s%s", file, t);
p = buf;
} else
p = file;
diff --git a/usr.bin/vi/common/options.c b/usr.bin/vi/common/options.c
index 609a0433dfd..891e7333edb 100644
--- a/usr.bin/vi/common/options.c
+++ b/usr.bin/vi/common/options.c
@@ -10,7 +10,7 @@
#include "config.h"
#ifndef lint
-static const char sccsid[] = "@(#)options.c 10.43 (Berkeley) 5/16/96";
+static const char sccsid[] = "@(#)options.c 10.46 (Berkeley) 6/26/96";
#endif /* not lint */
#include <sys/types.h>
@@ -214,6 +214,8 @@ OPTLIST const optlist[] = {
{"warn", NULL, OPT_1BOOL, 0},
/* O_WINDOW 4BSD */
{"window", f_window, OPT_NUM, 0},
+/* O_WINDOWNAME 4BSD */
+ {"windowname", f_windowname, OPT_0BOOL, 0},
/* O_WRAPLEN 4.4BSD */
{"wraplen", NULL, OPT_NUM, 0},
/* O_WRAPMARGIN 4BSD */
@@ -254,6 +256,7 @@ static OABBREV const abbrev[] = {
{"sh", O_SHELL}, /* 4BSD */
{"slow", O_SLOWOPEN}, /* 4BSD */
{"sm", O_SHOWMATCH}, /* 4BSD */
+ {"smd", O_SHOWMODE}, /* 4BSD */
{"sw", O_SHIFTWIDTH}, /* 4BSD */
{"tag", O_TAGS}, /* 4BSD (undocumented) */
{"tl", O_TAGLENGTH}, /* 4BSD */
diff --git a/usr.bin/vi/common/options_f.c b/usr.bin/vi/common/options_f.c
index e45df04a528..039ed0dbf7a 100644
--- a/usr.bin/vi/common/options_f.c
+++ b/usr.bin/vi/common/options_f.c
@@ -10,7 +10,7 @@
#include "config.h"
#ifndef lint
-static const char sccsid[] = "@(#)options_f.c 10.23 (Berkeley) 5/4/96";
+static const char sccsid[] = "@(#)options_f.c 10.24 (Berkeley) 6/26/96";
#endif /* not lint */
#include <sys/types.h>
@@ -365,3 +365,30 @@ f_window(sp, op, str, valp)
*valp = 1;
return (0);
}
+
+/*
+ * PUBLIC: int f_windowname __P((SCR *, OPTION *, char *, u_long *));
+ */
+int
+f_windowname(sp, op, str, valp)
+ SCR *sp;
+ OPTION *op;
+ char *str;
+ u_long *valp;
+{
+ /*
+ * XXX
+ * The cl_rename routine depends on the O_WINDOWNAME value being
+ * already set, because it's a destructive action, and it wants
+ * to make sure we have permission. This doesn't apply to other
+ * screen types where the naming won't be destructive, so we don't
+ * want to move the check up out of the screen code.
+ */
+ if (*valp)
+ O_CLR(sp, O_WINDOWNAME);
+ else
+ O_SET(sp, O_WINDOWNAME);
+
+ (void)sp->gp->scr_rename(sp);
+ return (0);
+}
diff --git a/usr.bin/vi/common/recover.c b/usr.bin/vi/common/recover.c
index 38c33c0668d..10702cc384f 100644
--- a/usr.bin/vi/common/recover.c
+++ b/usr.bin/vi/common/recover.c
@@ -10,7 +10,7 @@
#include "config.h"
#ifndef lint
-static const char sccsid[] = "@(#)recover.c 10.18 (Berkeley) 5/15/96";
+static const char sccsid[] = "@(#)recover.c 10.20 (Berkeley) 6/20/96";
#endif /* not lint */
#include <sys/param.h>
@@ -35,6 +35,7 @@ static const char sccsid[] = "@(#)recover.c 10.18 (Berkeley) 5/15/96";
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#include <time.h>
#include <unistd.h>
#include "common.h"
@@ -333,6 +334,7 @@ rcv_mailfile(sp, issync, cp_path)
char *cp_path;
{
EXF *ep;
+ GS *gp;
struct passwd *pw;
size_t len;
time_t now;
@@ -351,6 +353,7 @@ rcv_mailfile(sp, issync, cp_path)
#endif
char host[MAXHOSTNAMELEN];
+ gp = sp->gp;
if ((pw = getpwuid(uid = getuid())) == NULL) {
msgq(sp, M_ERR,
"062|Information on user id %u not found", uid);
@@ -403,22 +406,23 @@ rcv_mailfile(sp, issync, cp_path)
VI_FHEADER, t, /* Non-standard. */
VI_PHEADER, cp_path, /* Non-standard. */
"Reply-To: root",
- "From: root (Vi recovery program)",
+ "From: root (Nvi recovery program)",
"To: ", pw->pw_name,
- "Subject: Vi saved the file ", p,
+ "Subject: Nvi saved the file ", p,
"Precedence: bulk"); /* For vacation(1). */
if (len > sizeof(buf) - 1)
goto lerr;
if (write(fd, buf, len) != len)
goto werr;
- len = snprintf(buf, sizeof(buf), "%s%.24s%s%s%s%s%s%s%s%s%s%s%s\n\n",
+ len = snprintf(buf, sizeof(buf),
+ "%s%.24s%s%s%s%s%s%s%s%s%s%s%s%s%s%s\n\n",
"On ", ctime(&now), ", the user ", pw->pw_name,
" was editing a file named ", t, " on the machine ",
host, ", when it was saved for recovery. ",
"You can recover most, if not all, of the changes ",
- "to this file using the -r option to ex or vi:\n\n",
- "\tvi -r ", t);
+ "to this file using the -r option to ", gp->progname, ":\n\n\t",
+ gp->progname, " -r ", t);
if (len > sizeof(buf) - 1) {
lerr: msgq(sp, M_ERR, "064|Recovery file buffer overrun");
goto err;
diff --git a/usr.bin/vi/common/screen.h b/usr.bin/vi/common/screen.h
index b66833189b8..141d50703b6 100644
--- a/usr.bin/vi/common/screen.h
+++ b/usr.bin/vi/common/screen.h
@@ -6,7 +6,7 @@
*
* See the LICENSE file for redistribution information.
*
- * @(#)screen.h 10.19 (Berkeley) 5/15/96
+ * @(#)screen.h 10.22 (Berkeley) 6/30/96
*/
/*
@@ -88,7 +88,6 @@ struct _scr {
SM_REPLACE } showmode;
void *ex_private; /* Ex private area. */
- void *sex_private; /* Ex screen private area. */
void *vi_private; /* Vi private area. */
/* PARTIALLY OR COMPLETELY COPIED FROM PREVIOUS SCREEN. */
@@ -110,19 +109,20 @@ struct _scr {
#define SEARCH_EOL 0x0002 /* Offset past EOL is okay. */
#define SEARCH_FILE 0x0004 /* Search the entire file. */
#define SEARCH_INCR 0x0008 /* Search incrementally. */
-#define SEARCH_MSG 0x0010 /* Display search warning messages. */
+#define SEARCH_MSG 0x0010 /* Display search messages. */
#define SEARCH_PARSE 0x0020 /* Parse the search pattern. */
#define SEARCH_SET 0x0040 /* Set search direction. */
#define SEARCH_TAG 0x0080 /* Search for a tag pattern. */
+#define SEARCH_WMSG 0x0100 /* Display search-wrapped messages. */
/* Ex/vi: RE information. */
dir_t searchdir; /* Last file search direction. */
- char *re; /* Search RE (uncompiled form). */
- regex_t re_c; /* Search RE (compiled form). */
- size_t re_len; /* Search RE length. */
- char *subre; /* Substitute RE (uncompiled form.) */
- regex_t subre_c; /* Substitute RE (compiled form.) */
- size_t subre_len; /* Substitute RE length. */
+ regex_t re_c; /* Search RE: compiled form. */
+ char *re; /* Search RE: uncompiled form. */
+ size_t re_len; /* Search RE: uncompiled length. */
+ regex_t subre_c; /* Substitute RE: compiled form. */
+ char *subre; /* Substitute RE: uncompiled form. */
+ size_t subre_len; /* Substitute RE: uncompiled length). */
char *repl; /* Substitute replacement. */
size_t repl_len; /* Substitute replacement length.*/
size_t *newl; /* Newline offset array. */
@@ -186,15 +186,16 @@ struct _scr {
#define SC_ARGRECOVER 0x00004000 /* Argument list is recovery files. */
#define SC_AT_SET 0x00008000 /* Last at buffer set. */
#define SC_COMEDIT 0x00010000 /* Colon command-line edit window. */
-#define SC_EX_DONTWAIT 0x00020000 /* Ex: don't wait for the user. */
-#define SC_EX_GLOBAL 0x00040000 /* Ex: executing a global command. */
-#define SC_EX_SILENT 0x00080000 /* Ex: batch script. */
-#define SC_READONLY 0x00100000 /* Persistent readonly state. */
-#define SC_RE_SEARCH 0x00200000 /* Search RE has been compiled. */
-#define SC_RE_SUBST 0x00400000 /* Substitute RE has been compiled. */
-#define SC_SCRIPT 0x00800000 /* Shell script window. */
-#define SC_STATUS 0x01000000 /* Schedule welcome message. */
-#define SC_TINPUT 0x02000000 /* Doing text input. */
-#define SC_TINPUT_INFO 0x04000000 /* Doing text input on info line. */
+#define SC_EX_GLOBAL 0x00020000 /* Ex: executing a global command. */
+#define SC_EX_SILENT 0x00040000 /* Ex: batch script. */
+#define SC_EX_WAIT_NO 0x00080000 /* Ex: don't wait for the user. */
+#define SC_EX_WAIT_YES 0x00100000 /* Ex: do wait for the user. */
+#define SC_READONLY 0x00200000 /* Persistent readonly state. */
+#define SC_RE_SEARCH 0x00400000 /* Search RE has been compiled. */
+#define SC_RE_SUBST 0x00800000 /* Substitute RE has been compiled. */
+#define SC_SCRIPT 0x01000000 /* Shell script window. */
+#define SC_STATUS 0x02000000 /* Schedule welcome message. */
+#define SC_TINPUT 0x04000000 /* Doing text input. */
+#define SC_TINPUT_INFO 0x08000000 /* Doing text input on info line. */
u_int32_t flags;
};
diff --git a/usr.bin/vi/common/search.c b/usr.bin/vi/common/search.c
index 5823f250ff4..3fd2719778f 100644
--- a/usr.bin/vi/common/search.c
+++ b/usr.bin/vi/common/search.c
@@ -10,7 +10,7 @@
#include "config.h"
#ifndef lint
-static const char sccsid[] = "@(#)search.c 10.24 (Berkeley) 5/26/96";
+static const char sccsid[] = "@(#)search.c 10.25 (Berkeley) 6/30/96";
#endif /* not lint */
#include <sys/types.h>
@@ -30,17 +30,18 @@ static const char sccsid[] = "@(#)search.c 10.24 (Berkeley) 5/26/96";
typedef enum { S_EMPTY, S_EOF, S_NOPREV, S_NOTFOUND, S_SOF, S_WRAP } smsg_t;
static void search_msg __P((SCR *, smsg_t));
-static int search_setup __P((SCR *, dir_t, char *, char **, u_int));
+static int search_init __P((SCR *, dir_t, char *, size_t, char **, u_int));
/*
- * search_setup --
+ * search_init --
* Set up a search.
*/
static int
-search_setup(sp, dir, ptrn, epp, flags)
+search_init(sp, dir, ptrn, plen, epp, flags)
SCR *sp;
dir_t dir;
char *ptrn, **epp;
+ size_t plen;
u_int flags;
{
recno_t lno;
@@ -60,16 +61,16 @@ search_setup(sp, dir, ptrn, epp, flags)
if (LF_ISSET(SEARCH_PARSE)) { /* Parse the string. */
/*
- * Use the saved pattern if no pattern supplied, or if only
- * the delimiter character supplied.
+ * Use the saved pattern if no pattern specified, or if only
+ * one or two delimiter characters specified.
*
* !!!
- * Only the pattern itself was saved, historically vi didn't
- * reuse addressing or delta information.
+ * Historically, only the pattern itself was saved, vi didn't
+ * preserve addressing or delta information.
*/
if (ptrn == NULL)
goto prev;
- if (ptrn[1] == '\0') {
+ if (plen == 1) {
if (epp != NULL)
*epp = ptrn + 1;
goto prev;
@@ -83,9 +84,9 @@ prev: if (sp->re == NULL) {
search_msg(sp, S_NOPREV);
return (1);
}
- /* Compile the search pattern if necessary. */
- if (!F_ISSET(sp, SC_RE_SEARCH) &&
- re_compile(sp, sp->re, NULL, NULL, &sp->re_c,
+ /* Re-compile the search pattern if necessary. */
+ if (!F_ISSET(sp, SC_RE_SEARCH) && re_compile(sp,
+ sp->re, sp->re_len, NULL, NULL, &sp->re_c,
RE_C_SEARCH |
(LF_ISSET(SEARCH_MSG) ? 0 : RE_C_SILENT)))
return (1);
@@ -104,21 +105,24 @@ prev: if (sp->re == NULL) {
* Only discard an escape character if it escapes a delimiter.
*/
for (delim = *ptrn, p = t = ++ptrn;; *t++ = *p++) {
- if (p[0] == '\0' || p[0] == delim) {
- if (p[0] == delim)
+ if (--plen == 0 || p[0] == delim) {
+ if (plen != 0)
++p;
- *t = '\0';
break;
}
- if (p[1] == delim && p[0] == '\\')
+ if (plen > 1 && p[0] == '\\' && p[1] == delim) {
++p;
+ --plen;
+ }
}
if (epp != NULL)
*epp = p;
+
+ plen = t - ptrn;
}
/* Compile the RE. */
- if (re_compile(sp, ptrn, &sp->re, &sp->re_len, &sp->re_c,
+ if (re_compile(sp, ptrn, plen, &sp->re, &sp->re_len, &sp->re_c,
RE_C_SEARCH |
(LF_ISSET(SEARCH_MSG) ? 0 : RE_C_SILENT) |
(LF_ISSET(SEARCH_TAG) ? RE_C_TAG : 0) |
@@ -136,13 +140,15 @@ prev: if (sp->re == NULL) {
* f_search --
* Do a forward search.
*
- * PUBLIC: int f_search __P((SCR *, MARK *, MARK *, char *, char **, u_int));
+ * PUBLIC: int f_search __P((SCR *,
+ * PUBLIC: MARK *, MARK *, char *, size_t, char **, u_int));
*/
int
-f_search(sp, fm, rm, ptrn, eptrn, flags)
+f_search(sp, fm, rm, ptrn, plen, eptrn, flags)
SCR *sp;
MARK *fm, *rm;
char *ptrn, **eptrn;
+ size_t plen;
u_int flags;
{
busy_t btype;
@@ -152,7 +158,7 @@ f_search(sp, fm, rm, ptrn, eptrn, flags)
int cnt, eval, rval, wrapped;
char *l;
- if (search_setup(sp, FORWARD, ptrn, eptrn, flags))
+ if (search_init(sp, FORWARD, ptrn, plen, eptrn, flags))
return (1);
if (LF_ISSET(SEARCH_FILE)) {
@@ -245,32 +251,8 @@ f_search(sp, fm, rm, ptrn, eptrn, flags)
break;
}
- /*
- * XXX
- * Warn if the search wrapped. This message is only displayed
- * if we're in interactive mode and there are no keys in the
- * queue. The problem is that the command is going to succeed,
- * and the message isn't an error, it's merely informational.
- * So, if we're reading the .exrc file, displaying it causes
- * the screen to pause before entering the file, which is bad.
- * Or, if a macro causes it to be repeatedly displayed, e.g.,
- * the pattern only occurs once in the file and wrapscan is set,
- * you lose, particularly if the macro does something like:
- * :map K /pattern/^MjK
- * Each new search will display the message and the /pattern/
- * will immediately overwrite it, with strange results. The
- * System V vi displays the "wrapped" message multiple times,
- * but it's overwritten each time, so it's not as noticeable.
- * Since we don't discard messages, it's a real problem.
- *
- * XXX
- * The test for SC_SCR_EX or SC_SCR_VI feels wrong to me. I
- * didn't originally intend for that bit to reflect that the
- * user has "gone interactive", but that's the only solution
- * I see.
- */
- if (wrapped && LF_ISSET(SEARCH_MSG) &&
- F_ISSET(sp, SC_SCR_EX | SC_SCR_VI) && !KEYS_WAITING(sp))
+ /* Warn if the search wrapped. */
+ if (wrapped && LF_ISSET(SEARCH_WMSG))
search_msg(sp, S_WRAP);
#if defined(DEBUG) && 0
@@ -302,13 +284,15 @@ f_search(sp, fm, rm, ptrn, eptrn, flags)
* b_search --
* Do a backward search.
*
- * PUBLIC: int b_search __P((SCR *, MARK *, MARK *, char *, char **, u_int));
+ * PUBLIC: int b_search __P((SCR *,
+ * PUBLIC: MARK *, MARK *, char *, size_t, char **, u_int));
*/
int
-b_search(sp, fm, rm, ptrn, eptrn, flags)
+b_search(sp, fm, rm, ptrn, plen, eptrn, flags)
SCR *sp;
MARK *fm, *rm;
char *ptrn, **eptrn;
+ size_t plen;
u_int flags;
{
busy_t btype;
@@ -318,7 +302,7 @@ b_search(sp, fm, rm, ptrn, eptrn, flags)
int cnt, eval, rval, wrapped;
char *l;
- if (search_setup(sp, BACKWARD, ptrn, eptrn, flags))
+ if (search_init(sp, BACKWARD, ptrn, plen, eptrn, flags))
return (1);
/*
@@ -408,12 +392,8 @@ b_search(sp, fm, rm, ptrn, eptrn, flags)
if (coff != 0 && match[0].rm_so >= coff)
continue;
- /*
- * XXX
- * See the comment in f_search() for more information.
- */
- if (wrapped && LF_ISSET(SEARCH_MSG) &&
- F_ISSET(sp, SC_SCR_EX | SC_SCR_VI) && !KEYS_WAITING(sp))
+ /* Warn if the search wrapped. */
+ if (wrapped && LF_ISSET(SEARCH_WMSG))
search_msg(sp, S_WRAP);
#if defined(DEBUG) && 0
diff --git a/usr.bin/vi/common/signal.c b/usr.bin/vi/common/signal.c
deleted file mode 100644
index 47a5e5bca23..00000000000
--- a/usr.bin/vi/common/signal.c
+++ /dev/null
@@ -1,569 +0,0 @@
-/*-
- * Copyright (c) 1993, 1994
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#ifndef lint
-static char sccsid[] = "@(#)signal.c 8.34 (Berkeley) 8/17/94";
-#endif /* not lint */
-
-#include <sys/queue.h>
-#include <sys/time.h>
-
-#include <bitstring.h>
-#include <errno.h>
-#include <limits.h>
-#include <signal.h>
-#include <stdio.h>
-#include <termios.h>
-#include <unistd.h>
-
-#include "compat.h"
-#include <db.h>
-#include <regex.h>
-
-#include "vi.h"
-
-static void h_alrm __P((int));
-static void h_hup __P((int));
-static void h_int __P((int));
-static void h_term __P((int));
-static void h_winch __P((int));
-static void sig_sync __P((int, u_int));
-
-/*
- * There are seven normally asynchronous actions about which vi cares:
- * SIGALRM, SIGHUP, SIGINT, SIGQUIT, SIGTERM, SIGTSTP and SIGWINCH.
- *
- * The assumptions:
- * 1: The DB routines are not reentrant.
- * 2: The curses routines may not be reentrant.
- *
- * SIGALRM, SIGHUP, SIGTERM
- * Used for file recovery. The DB routines can't be reentered, so
- * the vi routines that call DB block all three signals (see line.c).
- * This means that DB routines can be called at interrupt time.
- *
- * SIGALRM
- * Used to paint busy messages on the screen. The curses routines
- * can't be reentered, so this function of SIGALRM can only be used
- * in sections of code that do not use any curses functions (see
- * busy_on, busy_off in signal.c). This means that curses can be
- * called at interrupt time.
- *
- * SIGQUIT
- * Disabled by the signal initialization routines. Historically,
- * ^\ switched vi into ex mode, and we continue that practice.
- *
- * SIGWINCH:
- * The interrupt routine sets a global bit which is checked by the
- * key-read routine, so there are no reentrancy issues. This means
- * that the screen will not resize until vi runs out of keys, but
- * that doesn't seem like a problem.
- *
- * SIGINT and SIGTSTP are a much more difficult issue to resolve. Vi has
- * to permit the user to interrupt long-running operations. Generally, a
- * search, substitution or read/write is done on a large file, or, the user
- * creates a key mapping with an infinite loop. This problem will become
- * worse as more complex semantics are added to vi. There are four major
- * solutions on the table, each of which have minor permutations.
- *
- * 1: Run in raw mode.
- *
- * The up side is that there's no asynchronous behavior to worry about,
- * and obviously no reentrancy problems. The down side is that it's easy
- * to misinterpret characters (e.g. :w big_file^Mi^V^C is going to look
- * like an interrupt) and it's easy to get into places where we won't see
- * interrupt characters (e.g. ":map a ixx^[hxxaXXX" infinitely loops in
- * historic implementations of vi). Periodically reading the terminal
- * input buffer might solve the latter problem, but it's not going to be
- * pretty.
- *
- * Also, we're going to be checking for ^C's and ^Z's both, all over
- * the place -- I hate to litter the source code with that. For example,
- * the historic version of vi didn't permit you to suspend the screen if
- * you were on the colon command line. This isn't right. ^Z isn't a vi
- * command, it's a terminal event. (Dammit.)
- *
- * 2: Run in cbreak mode. There are two problems in this area. First, the
- * current curses implementations (both System V and Berkeley) don't give
- * you clean cbreak modes. For example, the IEXTEN bit is left on, turning
- * on DISCARD and LNEXT. To clarify, what vi WANTS is 8-bit clean, with
- * the exception that flow control and signals are turned on, and curses
- * cbreak mode doesn't give you this.
- *
- * We can either set raw mode and twiddle the tty, or cbreak mode and
- * twiddle the tty. I chose to use raw mode, on the grounds that raw
- * mode is better defined and I'm less likely to be surprised by a curses
- * implementation down the road. The twiddling consists of setting ISIG,
- * IXON/IXOFF, and disabling some of the interrupt characters (see the
- * comments in svi/svi_screen.c). This is all found in historic System
- * V (SVID 3) and POSIX 1003.1-1992, so it should be fairly portable.
- *
- * The second problem is that vi permits you to enter literal signal
- * characters, e.g. ^V^C. There are two possible solutions. First, you
- * can turn off signals when you get a ^V, but that means that a network
- * packet containing ^V and ^C will lose, since the ^C may take effect
- * before vi reads the ^V. (This is particularly problematic if you're
- * talking over a protocol that recognizes signals locally and sends OOB
- * packets when it sees them.) Second, you can turn the ^C into a literal
- * character in vi, but that means that there's a race between entering
- * ^V<character>^C, i.e. the sequence may end up being ^V^C<character>.
- * Also, the second solution doesn't work for flow control characters, as
- * they aren't delivered to the program as signals.
- *
- * Generally, this is what historic vi did. (It didn't have the curses
- * problems because it didn't use curses.) It entered signals following
- * ^V characters into the input stream, (which is why there's no way to
- * enter a literal flow control character).
- *
- * 3: Run in mostly raw mode; turn signals on when doing an operation the
- * user might want to interrupt, but leave them off most of the time.
- *
- * This works well for things like file reads and writes. This doesn't
- * work well for trying to detect infinite maps. The problem is that
- * you can write the code so that you don't have to turn on interrupts
- * per keystroke, but the code isn't pretty and it's hard to make sure
- * that an optimization doesn't cover up an infinite loop. This also
- * requires interaction or state between the vi parser and the key
- * reading routines, as an infinite loop may still be returning keys
- * to the parser.
- *
- * Also, if the user inserts an interrupt into the tty queue while the
- * interrupts are turned off, the key won't be treated as an interrupt,
- * and requiring the user to pound the keyboard to catch an interrupt
- * window is nasty.
- *
- * 4: Run in mostly raw mode, leaving signals on all of the time. Done
- * by setting raw mode, and twiddling the tty's termios ISIG bit.
- *
- * This works well for the interrupt cases, because the code only has
- * to check to see if the interrupt flag has been set, and can otherwise
- * ignore signals. It's also less likely that we'll miss a case, and we
- * don't have to worry about synchronizing between the vi parser and the
- * key read routines.
- *
- * The down side is that we have to turn signals off if the user wants
- * to enter a literal character (e.g. ^V^C). If the user enters the
- * combination fast enough, or as part of a single network packet,
- * the text input routines will treat it as a signal instead of as a
- * literal character. To some extent, we have this problem already,
- * since we turn off flow control so that the user can enter literal
- * XON/XOFF characters.
- *
- * This is probably the easiest to code, and provides the smoothest
- * programming interface.
- *
- * There are a couple of other problems to consider.
- *
- * First, System V's curses doesn't handle SIGTSTP correctly. If you use the
- * newterm() interface, the TSTP signal will leave you in raw mode, and the
- * final endwin() will leave you in the correct shell mode. If you use the
- * initscr() interface, the TSTP signal will return you to the correct shell
- * mode, but the final endwin() will leave you in raw mode. There you have
- * it: proof that drug testing is not making any significant headway in the
- * computer industry. The 4BSD curses is deficient in that it does not have
- * an interface to the terminal keypad. So, regardless, we have to do our
- * own SIGTSTP handling.
- *
- * The problem with this is that if we do our own SIGTSTP handling, in either
- * models #3 or #4, we're going to have to call curses routines at interrupt
- * time, which means that we might be reentering curses, which is something we
- * don't want to do.
- *
- * Second, SIGTSTP has its own little problems. It's broadcast to the entire
- * process group, not sent to a single process. The scenario goes something
- * like this: the shell execs the mail program, which execs vi. The user hits
- * ^Z, and all three programs get the signal, in some random order. The mail
- * program goes to sleep immediately (since it probably didn't have a SIGTSTP
- * handler in place). The shell gets a SIGCHLD, does a wait, and finds out
- * that the only child in its foreground process group (of which it's aware)
- * is asleep. It then optionally resets the terminal (because the modes aren't
- * how it left them), and starts prompting the user for input. The problem is
- * that somewhere in the middle of all of this, vi is resetting the terminal,
- * and getting ready to send a SIGTSTP to the process group in order to put
- * itself to sleep. There's a solution to all of this: when vi starts, it puts
- * itself into its own process group, and then only it (and possible child
- * processes) receive the SIGTSTP. This permits it to clean up the terminal
- * and switch back to the original process group, where it sends that process
- * group a SIGTSTP, putting everyone to sleep and waking the shell.
- *
- * Third, handing SIGTSTP asynchronously is further complicated by the child
- * processes vi may fork off. If vi calls ex, ex resets the terminal and
- * starts running some filter, and SIGTSTP stops them both, vi has to know
- * when it restarts that it can't repaint the screen until ex's child has
- * finished running. This is solveable, but it's annoying.
- *
- * Well, somebody had to make a decision, and this is the way it's going to be
- * (unless I get talked out of it). SIGINT is handled asynchronously, so
- * that we can pretty much guarantee that the user can interrupt any operation
- * at any time. SIGTSTP is handled synchronously, so that we don't have to
- * reenter curses and so that we don't have to play the process group games.
- * ^Z is recognized in the standard text input and command modes. (^Z should
- * also be recognized during operations that may potentially take a long time.
- * The simplest solution is probably to twiddle the tty, install a handler for
- * SIGTSTP, and then restore normal tty modes when the operation is complete.)
- */
-
-/*
- * sig_init --
- * Initialize signals.
- */
-int
-sig_init(sp)
- SCR *sp;
-{
- GS *gp;
- struct sigaction act;
-
- /* Initialize the signals. */
- gp = sp->gp;
- (void)sigemptyset(&gp->blockset);
-
- /*
- * Use sigaction(2), not signal(3), since we don't always want to
- * restart system calls. The example is when waiting for a command
- * mode keystroke and SIGWINCH arrives. Try to set the restart bit
- * (SA_RESTART) on SIGALRM anyway, it should result in a lot fewer
- * interruptions. We also block every other signal that we can block
- * when a signal arrives. This is because the signal functions call
- * other nvi functions, which aren't guaranteed to be reentrant.
- */
-
-#ifndef SA_RESTART
-#define SA_RESTART 0
-#endif
-#define SETSIG(signal, flags, handler) { \
- if (sigaddset(&gp->blockset, signal)) \
- goto err; \
- act.sa_handler = handler; \
- sigfillset(&act.sa_mask); \
- act.sa_flags = flags; \
- if (sigaction(signal, &act, NULL)) \
- goto err; \
-}
- SETSIG(SIGALRM, SA_RESTART, h_alrm);
- SETSIG(SIGHUP, 0, h_hup);
- SETSIG(SIGINT, 0, h_int);
- SETSIG(SIGTERM, 0, h_term);
- SETSIG(SIGWINCH, 0, h_winch);
- return (0);
-
-err: msgq(sp, M_SYSERR, "signal init");
- return (1);
-}
-
-/*
- * sig_end --
- * End signal setup.
- */
-void
-sig_end()
-{
- /*
- * POSIX 1003.1-1990 requires that fork (and, presumably, vfork) clear
- * pending alarms, and that the exec functions clear pending signals.
- * In addition, after an exec, the child continues to ignore signals
- * ignored in the parent, and the child's action for signals caught in
- * the parent is set to the default action. So, as we currently don't
- * ignore any signals, there's no cleanup to be done. This routine is
- * left here as a stub function.
- */
- return;
-}
-
-/*
- * busy_on --
- * Set a busy message timer.
- */
-int
-busy_on(sp, msg)
- SCR *sp;
- char const *msg;
-{
- struct itimerval value;
- struct timeval tod;
-
- /*
- * Give the oldest busy message precedence, since it's
- * the longer running operation.
- */
- if (sp->busy_msg != NULL)
- return (1);
-
- /* Get the current time of day, and create a target time. */
- if (gettimeofday(&tod, NULL))
- return (1);
-#define USER_PATIENCE_USECS (8 * 100000L)
- sp->busy_tod.tv_sec = tod.tv_sec;
- sp->busy_tod.tv_usec = tod.tv_usec + USER_PATIENCE_USECS;
-
- /* We depend on this being an atomic instruction. */
- sp->busy_msg = msg;
-
- /*
- * Busy messages turn around fast. Reset the timer regardless
- * of its current state.
- */
- value.it_value.tv_sec = 0;
- value.it_value.tv_usec = USER_PATIENCE_USECS;
- value.it_interval.tv_sec = 0;
- value.it_interval.tv_usec = 0;
- if (setitimer(ITIMER_REAL, &value, NULL))
- msgq(sp, M_SYSERR, "timer: setitimer");
- return (0);
-}
-
-/*
- * busy_off --
- * Turn off a busy message timer.
- */
-void
-busy_off(sp)
- SCR *sp;
-{
- /* We depend on this being an atomic instruction. */
- sp->busy_msg = NULL;
-}
-
-/*
- * rcv_on --
- * Turn on recovery timer.
- */
-int
-rcv_on(sp, ep)
- SCR *sp;
- EXF *ep;
-{
- struct itimerval value;
- struct timeval tod;
-
- /* Get the current time of day. */
- if (gettimeofday(&tod, NULL))
- return (1);
-
- /* Create target time of day. */
- ep->rcv_tod.tv_sec = tod.tv_sec + RCV_PERIOD;
- ep->rcv_tod.tv_usec = 0;
-
- /*
- * If there's a busy message happening, we're done, the
- * interrupt handler will start our timer as necessary.
- */
- if (sp->busy_msg != NULL)
- return (0);
-
- value.it_value.tv_sec = RCV_PERIOD;
- value.it_value.tv_usec = 0;
- value.it_interval.tv_sec = 0;
- value.it_interval.tv_usec = 0;
- if (setitimer(ITIMER_REAL, &value, NULL)) {
- msgq(sp, M_SYSERR, "timer: setitimer");
- return (1);
- }
- return (0);
-}
-
-/*
- * h_alrm --
- * Handle SIGALRM.
- *
- * There are two uses of the ITIMER_REAL timer (SIGALRM) in nvi. The first
- * is to push the recovery information out to disk at periodic intervals.
- * The second is to display a "busy" message if an operation takes more time
- * that users are willing to wait before seeing something happen. The SCR
- * structure has a wall clock timer structure for each of these. Since the
- * busy timer has a much faster timeout than the recovery timer, most of the
- * code ignores the recovery timer unless it's the only thing running.
- *
- * XXX
- * It would be nice to reimplement this with two timers, a la POSIX 1003.1,
- * but not many systems offer them yet.
- */
-static void
-h_alrm(signo)
- int signo;
-{
- struct itimerval value;
- struct timeval ntod, tod;
- SCR *sp;
- EXF *ep;
- int sverrno;
-
- sverrno = errno;
-
- /* XXX: Get the current time of day; if this fails, we're dead. */
- if (gettimeofday(&tod, NULL))
- goto ret;
-
- /*
- * Fire any timers that are past due, or any that are due
- * in a tenth of a second or less.
- */
- for (ntod.tv_sec = 0, sp = __global_list->dq.cqh_first;
- sp != (void *)&__global_list->dq; sp = sp->q.cqe_next) {
-
- /* Check the busy timer if the msg pointer is set. */
- if (sp->busy_msg == NULL)
- goto skip_busy;
- if (sp->busy_tod.tv_sec > tod.tv_sec ||
- sp->busy_tod.tv_sec == tod.tv_sec &&
- sp->busy_tod.tv_usec > tod.tv_usec &&
- sp->busy_tod.tv_usec - tod.tv_usec > 100000L) {
- if (ntod.tv_sec == 0 ||
- ntod.tv_sec > sp->busy_tod.tv_sec ||
- ntod.tv_sec == sp->busy_tod.tv_sec &&
- ntod.tv_usec > sp->busy_tod.tv_usec)
- ntod = sp->busy_tod;
- } else {
- (void)sp->s_busy(sp, sp->busy_msg);
- sp->busy_msg = NULL;
- }
-
- /*
- * Sync the file if the recovery timer has fired. If
- * the sync fails, we don't reschedule future sync's.
- */
-skip_busy: ep = sp->ep;
- if (ep->rcv_tod.tv_sec < tod.tv_sec ||
- ep->rcv_tod.tv_sec == tod.tv_sec &&
- ep->rcv_tod.tv_usec < tod.tv_usec + 100000L) {
- if (rcv_sync(sp, ep, 0))
- continue;
- ep->rcv_tod = tod;
- ep->rcv_tod.tv_sec += RCV_PERIOD;
- }
- if (ntod.tv_sec == 0 ||
- ntod.tv_sec > ep->rcv_tod.tv_sec ||
- ntod.tv_sec == ep->rcv_tod.tv_sec &&
- ntod.tv_usec > ep->rcv_tod.tv_usec)
- ntod = ep->rcv_tod;
- }
-
- if (ntod.tv_sec == 0)
- goto ret;
-
- /* XXX: Set the timer; if this fails, we're dead. */
- value.it_value.tv_sec = ntod.tv_sec - tod.tv_sec;
- value.it_value.tv_usec = ntod.tv_usec - tod.tv_usec;
- value.it_interval.tv_sec = 0;
- value.it_interval.tv_usec = 0;
- (void)setitimer(ITIMER_REAL, &value, NULL);
-
-ret: errno = sverrno;
-}
-
-/*
- * h_hup --
- * Handle SIGHUP.
- */
-static void
-h_hup(signo)
- int signo;
-{
- sig_sync(SIGHUP, RCV_EMAIL);
- /* NOTREACHED */
-}
-
-/*
- * h_int --
- * Handle SIGINT.
- *
- * XXX
- * This isn't right if windows are independent of each other.
- */
-static void
-h_int(signo)
- int signo;
-{
- F_SET(__global_list, G_SIGINT);
-}
-
-/*
- * h_term --
- * Handle SIGTERM.
- */
-static void
-h_term(signo)
- int signo;
-{
- sig_sync(SIGTERM, 0);
- /* NOTREACHED */
-}
-
-/*
- * h_winch --
- * Handle SIGWINCH.
- *
- * XXX
- * This isn't right if windows are independent of each other.
- */
-static void
-h_winch(signo)
- int signo;
-{
- F_SET(__global_list, G_SIGWINCH);
-}
-
-
-/*
- * sig_sync --
- *
- * Sync the files based on a signal.
- */
-static void
-sig_sync(signo, flags)
- int signo;
- u_int flags;
-{
- SCR *sp;
-
- /*
- * Walk the lists of screens, sync'ing the files; only sync
- * each file once.
- */
- for (sp = __global_list->dq.cqh_first;
- sp != (void *)&__global_list->dq; sp = sp->q.cqe_next)
- rcv_sync(sp, sp->ep, RCV_ENDSESSION | RCV_PRESERVE | flags);
- for (sp = __global_list->hq.cqh_first;
- sp != (void *)&__global_list->hq; sp = sp->q.cqe_next)
- rcv_sync(sp, sp->ep, RCV_ENDSESSION | RCV_PRESERVE | flags);
-
- /*
- * Die with the proper exit status. Don't bother using
- * sigaction(2) 'cause we want the default behavior.
- */
- (void)signal(signo, SIG_DFL);
- (void)kill(getpid(), signo);
- /* NOTREACHED */
-
- exit (1);
-}
diff --git a/usr.bin/vi/docs/TODO b/usr.bin/vi/docs/TODO
index 98def635213..6fe88295d5f 100644
--- a/usr.bin/vi/docs/TODO
+++ b/usr.bin/vi/docs/TODO
@@ -1,6 +1,3 @@
-CL: I believe the :resize command isn't always repainting the status line,
- but I can't reproduce it.
-
CL: In single-line screens, have to press 'q' twice when quitting out
of a ":set all" display.
diff --git a/usr.bin/vi/docs/USD.doc/edit/Makefile b/usr.bin/vi/docs/USD.doc/edit/Makefile
index 3d30bc91964..e9b8d3c5610 100644
--- a/usr.bin/vi/docs/USD.doc/edit/Makefile
+++ b/usr.bin/vi/docs/USD.doc/edit/Makefile
@@ -2,7 +2,7 @@
DIR= usd/11.edit
SRCS= edittut.ms
-MACROS= -msU
+MACROS= -ms
paper.ps: ${SRCS}
${TBL} ${SRCS} | ${ROFF} > ${.TARGET}
diff --git a/usr.bin/vi/docs/USD.doc/edit/edittut.ms b/usr.bin/vi/docs/USD.doc/edit/edittut.ms
index 5f4c28cb6d2..274e28676ed 100644
--- a/usr.bin/vi/docs/USD.doc/edit/edittut.ms
+++ b/usr.bin/vi/docs/USD.doc/edit/edittut.ms
@@ -29,7 +29,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.\" @(#)edittut.ms 8.1 (Berkeley) 6/8/93
+.\" @(#)edittut.ms 8.2 (Berkeley) 6/27/96
.\"
.EH 'USD:11-%''Edit: A Tutorial'
.OH 'Edit: A Tutorial''USD:11-%'
@@ -89,19 +89,19 @@ September 1981
.nf
Introduction\ \ \ 3
.sp
-Session 1\ \ \4
+Session 1\ \ 4
.in +.5i
Making contact with \s-2UNIX\s+2\ \ \ 4
-Logging in\ \ \4
+Logging in\ \ 4
Asking for \fIedit\fR\ \ \ 4
The ``Command not found'' message\ \ \ 5
-A summary\ \ \5
+A summary\ \ 5
Entering text\ \ \ 5
Messages from \fIedit\fR\ \ \ 5
Text input mode\ \ \ 6
Making corrections\ \ \ 6
Writing text to disk\ \ \ 7
-Signing off\ \ \7
+Signing off\ \ 7
.in -.5i
.sp
Session 2\ \ \ 8
@@ -1034,56 +1034,14 @@ Instead, you may identify the line you want to change
by asking edit to search for a specified pattern of letters
that occurs in that line.
The parts of the above command are:
-.TS
.in +1i
-.nr 35 \n(.u
-.nf
-.ds #d .d
-.if \(ts\n(.z\(ts\(ts .ds #d nl
-.nr 80 0
-.nr 38 \w\f3/strange/\fP
-.if \n(80<\n(38 .nr 80 \n(38
-.nr 38 \w\f3s\fP
-.if \n(80<\n(38 .nr 80 \n(38
-.nr 38 \w\f3/strange, but //\fP
-.if \n(80<\n(38 .nr 80 \n(38
-.nr 81 0
-.nr 38 \wtells edit to find the characters ``strange'' in the text
-.if \n(81<\n(38 .nr 81 \n(38
-.nr 38 \wtells edit to make a substitution
-.if \n(81<\n(38 .nr 81 \n(38
-.nr 38 \wsubstitutes nothing at all for the characters ``strange, but ''
-.if \n(81<\n(38 .nr 81 \n(38
-.nr 38 1n
-.nr 79 0
-.nr 40 \n(79+(0*\n(38)
-.nr 80 +\n(40
-.nr 41 \n(80+(3*\n(38)
-.nr 81 +\n(41
-.nr TW \n(81
-.if t .if (\n(TW+\n(.o)>7.75i .tm Table at line 307 file ed2.tbl is too wide - \n(TW units
-.fc  
-.nr #T 0
-.eo
-.de T#
-.ds #d .d
-.if \(ts\n(.z\(ts\(ts .ds #d nl
-.mk ##
-.nr ## -1v
-..
-.ec
-.ta \n(80u \n(81u
-\&\h'|\n(40u'\f3/strange/\fP\h'|\n(41u'tells edit to find the characters ``strange'' in the text
-.ta \n(80u \n(81u
-\&\h'|\n(40u'\f3s\fP\h'|\n(41u'tells edit to make a substitution
-.ta \n(80u \n(81u
-\&\h'|\n(40u'\f3/strange, but //\fP\h'|\n(41u'substitutes nothing at all for the characters ``strange, but ''
-.fc
-.nr T. 1
-.T# 1
-.if \n(35>0 .fi
-.in -1i
+.TS
+l l.
+\fB/strange/\fP tells edit to find the characters ``strange'' in the text
+\fBs\fP tells edit to make a substitution
+\fB/strange, but //\fP substitutes nothing at all for the characters ``strange, but ''
.TE
+.in -1i
.PP
You should note the space after ``but'' in ``/strange, but /''.
If you do not indicate that the space is to be taken out,
diff --git a/usr.bin/vi/docs/USD.doc/exref/Makefile b/usr.bin/vi/docs/USD.doc/exref/Makefile
index 11f4e6650dc..33ab77080f4 100644
--- a/usr.bin/vi/docs/USD.doc/exref/Makefile
+++ b/usr.bin/vi/docs/USD.doc/exref/Makefile
@@ -2,7 +2,7 @@
DIR= usd/13.ex
SRCS= ex.rm
-MACROS= -msU
+MACROS= -ms
CLEANFILES=summary.*
paper.ps: ${SRCS} summary.ps
diff --git a/usr.bin/vi/docs/USD.doc/exref/ex.rm b/usr.bin/vi/docs/USD.doc/exref/ex.rm
index 79670c2cf66..0ada716a225 100644
--- a/usr.bin/vi/docs/USD.doc/exref/ex.rm
+++ b/usr.bin/vi/docs/USD.doc/exref/ex.rm
@@ -29,10 +29,11 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.\" @(#)ex.rm 8.1 (Berkeley) 6/8/93
+.\" @(#)ex.rm 8.4 (Berkeley) 6/27/96
.\"
-.EH 'USD:13-%''Ex Reference Manual'
-.OH 'Ex Reference Manual''USD:13-%'
+.EH 'USD:12-%''Ex Reference Manual'
+.OH 'Ex Reference Manual''USD:12-%'
+.nr )P 0
.de ZP
.nr pd \\n()P
.nr )P 0
@@ -2197,28 +2198,8 @@ Inhibit the checks normally made before
commands, allowing a write to any file which the system protection
mechanism will allow.
.NH 1
-Limitations
-.PP
-Editor limits that the user is likely to encounter are as follows:
-1024 characters per line,
-256 characters per global command list,
-128 characters per file name,
-128 characters in the previous inserted and deleted text in
-.I open
-or
-.I visual,
-100 characters in a shell escape command,
-63 characters in a string valued option,
-and 30 characters in a tag name, and
-a limit of 250000 lines in the file is silently enforced.
+Acknowledgements
.PP
-The
-.I visual
-implementation limits the number of macros defined with map to
-32, and the total number of characters in macros to be less than 512.
-.LP
-.LP
-.I Acknowledgments.
Chuck Haley contributed greatly to the early development of
.I ex.
Bruce Englar encouraged the redesign which led to
diff --git a/usr.bin/vi/docs/USD.doc/exref/ex.summary b/usr.bin/vi/docs/USD.doc/exref/ex.summary
index 618da07c742..763aafa5b33 100644
--- a/usr.bin/vi/docs/USD.doc/exref/ex.summary
+++ b/usr.bin/vi/docs/USD.doc/exref/ex.summary
@@ -29,7 +29,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.\" @(#)ex.summary 8.1 (Berkeley) 6/8/93
+.\" @(#)ex.summary 8.2 (Berkeley) 6/27/96
.\"
.ds p \v'-0.2'.\v'+0.2'
.ds U \s-2UNIX\s+2
@@ -402,7 +402,7 @@ be added prior to line 1.
\&.
\fR:
.fi
-T} \^
+T}
.SP
\fR(.,.+1)\fBjoin j T{
Join lines together, adjusting white space (spaces
@@ -413,7 +413,7 @@ T} T{
Resulting line is printed
:
.fi
-T} \^
+T}
.TE
.bp
.TS
diff --git a/usr.bin/vi/docs/USD.doc/vi.man/vi.0 b/usr.bin/vi/docs/USD.doc/vi.man/vi.0
deleted file mode 100644
index 5fcc6a25769..00000000000
--- a/usr.bin/vi/docs/USD.doc/vi.man/vi.0
+++ /dev/null
@@ -1,1518 +0,0 @@
-
-
-
-VI(1) VI(1)
-
-
-NNAAMMEE
- ex, vi, view - text editors
-
-SSYYNNOOPPSSIISS
- eexx [--eeFFRRrrssvv] [--cc _c_m_d] [--tt _t_a_g] [--ww _s_i_z_e] [file ...]
- vvii [--eeFFllRRrrvv] [--cc _c_m_d] [--tt _t_a_g] [--ww _s_i_z_e] [file ...]
- vviieeww [--eeFFRRrrvv] [--cc _c_m_d] [--tt _t_a_g] [--ww _s_i_z_e] [file ...]
-
-DDEESSCCRRIIPPTTIIOONN
- _V_i is a screen oriented text editor. _E_x is a line-ori-
- ented text editor. _E_x and _v_i are different interfaces to
- the same program, and it is possible to switch back and
- forth during an edit session. _V_i_e_w is the equivalent of
- using the --RR (read-only) option of _v_i.
-
- This manual page is the one provided with the _n_e_x_/_n_v_i ver-
- sions of the _e_x_/_v_i text editors. _N_e_x_/_n_v_i are intended as
- bug-for-bug compatible replacements for the original
- Fourth Berkeley Software Distribution (4BSD) _e_x and _v_i
- programs. For the rest of this manual page, _n_e_x_/_n_v_i is
- used only when it's necessary to distinguish it from the
- historic implementations of _e_x_/_v_i.
-
- This manual page is intended for users already familiar
- with _e_x_/_v_i. Anyone else should almost certainly read a
- good tutorial on the editor before this manual page. If
- you're in an unfamiliar environment, and you absolutely
- have to get work done immediately, read the section after
- the options description, entitled ``Fast Startup''. It's
- probably enough to get you going.
-
- The following options are available:
-
- --cc Execute ccmmdd immediately after starting the edit
- session. Particularly useful for initial position-
- ing in the file, however ccmmdd is not limited to
- positioning commands. This is the POSIX 1003.2
- interface for the historic ``+cmd'' syntax.
- _N_e_x_/_n_v_i supports both the old and new syntax.
-
- --ee Start editing in ex mode, as if the command name
- were _e_x.
-
- --FF Don't copy the entire file when first starting to
- edit. (The default is to make a copy in case some-
- one else modifies the file during your edit ses-
- sion.)
-
- --ll Start editing with the lisp and showmatch options
- set.
-
- --RR Start editing in read-only mode, as if the command
- name was _v_i_e_w, or the rreeaaddoonnllyy option was set.
-
-
-
-
- May 18, 1996 1
-
-
-
-
-
-VI(1) VI(1)
-
-
- --rr Recover the specified files, or, if no files are
- specified, list the files that could be recovered.
- If no recoverable files by the specified name
- exist, the file is edited as if the --rr option had
- not been specified.
-
- --ss Enter batch mode; applicable only to _e_x edit ses-
- sions. Batch mode is useful when running _e_x
- scripts. Prompts, informative messages and other
- user oriented message are turned off, and no
- startup files or environmental variables are read.
- This is the POSIX 1003.2 interface for the historic
- ``-'' argument. _N_e_x_/_n_v_i supports both the old and
- new syntax.
-
- --tt Start editing at the specified tag. (See
- _c_t_a_g_s(1)).
-
- --ww Set the initial window size to the specified number
- of lines.
-
- --vv Start editing in vi mode, as if the command name
- was _v_i or _v_i_e_w.
-
- Command input for _e_x_/_v_i is read from the standard input.
- In the _v_i interface, it is an error if standard input is
- not a terminal. In the _e_x interface, if standard input is
- not a terminal, _e_x will read commands from it regardless,
- however, the session will be a batch mode session, exactly
- as if the --ss option had been specified.
-
- _E_x_/_v_i exits 0 on success, and greater than 0 if an error
- occurs.
-
-FFAASSTT SSTTAARRTTUUPP
- This section will tell you the minimum amount that you
- need to do simple editing tasks using _v_i. If you've never
- used any screen editor before, you're likely to have prob-
- lems even with this simple introduction. In that case you
- should find someone that already knows _v_i and have them
- walk you through this section.
-
- _V_i is a screen editor. This means that it takes up almost
- the entire screen, displaying part of the file on each
- screen line, except for the last line of the screen. The
- last line of the screen is used for you to give commands
- to _v_i, and for _v_i to give information to you.
-
- The other fact that you need to understand is that _v_i is a
- modeful editor, i.e. you are either entering text or you
- are executing commands, and you have to be in the right
- mode to do one or the other. You will be in command mode
- when you first start editing a file. There are commands
- that switch you into input mode. There is only one key
-
-
-
- May 18, 1996 2
-
-
-
-
-
-VI(1) VI(1)
-
-
- that takes you out of input mode, and that is the <escape>
- key. (Key names are written using less-than and greater-
- than signs, e.g. <escape> means the ``escape'' key, usu-
- ally labeled ``esc'' on your terminal's keyboard.) If
- you're ever confused as to which mode you're in, keep
- entering the <escape> key until _v_i beeps at you. (Gener-
- ally, _v_i will beep at you if you try and do something
- that's not allowed. It will also display error messages.)
-
- To start editing a file, enter the command ``vi
- file_name<carriage-return>''. The command you should
- enter as soon as you start editing is ``:set verbose show-
- mode<carriage-return>''. This will make the editor give
- you verbose error messages and display the current mode at
- the bottom of the screen.
-
- The commands to move around the file are:
-
- hh Move the cursor left one character.
-
- jj Move the cursor down one line.
-
- kk Move the cursor up one line.
-
- ll Move the cursor right one character.
-
- <<ccuurrssoorr--aarrrroowwss>>
- The cursor arrow keys should work, too.
-
- //tteexxtt<<ccaarrrriiaaggee--rreettuurrnn>>
- Search for the string ``text'' in the file, and
- move the cursor to its first character.
-
- The commands to enter new text are:
-
- aa Append new text, _a_f_t_e_r the cursor.
-
- ii Insert new text, _b_e_f_o_r_e the cursor.
-
- oo Open a new line below the line the cursor is on,
- and start entering text.
-
- OO Open a new line above the line the cursor is on,
- and start entering text.
-
- <<eessccaappee>>
- Once you've entered input mode using the one of the
- aa, ii, OO or oo commands, use <<eessccaappee>> to quit enter-
- ing text and return to command mode.
-
- The commands to copy text are:
-
- yyyy Copy the line the cursor is on.
-
-
-
-
- May 18, 1996 3
-
-
-
-
-
-VI(1) VI(1)
-
-
- pp Append the copied line after the line the cursor is
- on.
-
- The commands to delete text are:
-
- dddd Delete the line the cursor is on.
-
- xx Delete the character the cursor is on.
-
- The commands to write the file are:
-
- ::ww<<ccaarrrriiaaggee--rreettuurrnn>>
- Write the file back to the file with the name that
- you originally used as an argument on the _v_i com-
- mand line.
-
- ::ww ffiillee__nnaammee<<ccaarrrriiaaggee--rreettuurrnn>>
- Write the file back to the file with the name
- ``file_name''.
-
- The commands to quit editing and exit the editor are:
-
- ::qq<<ccaarrrriiaaggee--rreettuurrnn>>
- Quit editing and leave vi (if you've modified the
- file, but not saved your changes, _v_i will refuse to
- quit).
-
- ::qq!!<<ccaarrrriiaaggee--rreettuurrnn>>
- Quit, discarding any modifications that you may
- have made.
-
- One final caution. Unusual characters can take up more
- than one column on the screen, and long lines can take up
- more than a single screen line. The above commands work
- on ``physical'' characters and lines, i.e. they affect the
- entire line no matter how many screen lines it takes up
- and the entire character no matter how many screen columns
- it takes up.
-
-VVII CCOOMMMMAANNDDSS
- The following section describes the commands available in
- the command mode of the _v_i editor. In each entry below,
- the tag line is a usage synopsis for the command charac-
- ter.
-
-
- [[ccoouunntt]] <<ccoonnttrrooll--AA>>
- Search forward _c_o_u_n_t times for the current word.
-
- [[ccoouunntt]] <<ccoonnttrrooll--BB>>
- Page backwards _c_o_u_n_t screens.
-
- [[ccoouunntt]] <<ccoonnttrrooll--DD>>
- Scroll forward _c_o_u_n_t lines.
-
-
-
- May 18, 1996 4
-
-
-
-
-
-VI(1) VI(1)
-
-
- [[ccoouunntt]] <<ccoonnttrrooll--EE>>
- Scroll forward _c_o_u_n_t lines, leaving the current
- line and column as is, if possible.
-
- [[ccoouunntt]] <<ccoonnttrrooll--FF>>
- Page forward _c_o_u_n_t screens.
-
- <<ccoonnttrrooll--GG>>
- Display the file information.
-
- <<ccoonnttrrooll--HH>>
-
- [[ccoouunntt]] hh
- Move the cursor back _c_o_u_n_t characters in the cur-
- rent line.
-
- [[ccoouunntt]] <<ccoonnttrrooll--JJ>>
-
- [[ccoouunntt]] <<ccoonnttrrooll--NN>>
-
- [[ccoouunntt]] jj
- Move the cursor down _c_o_u_n_t lines without changing
- the current column.
-
- <<ccoonnttrrooll--LL>>
-
- <<ccoonnttrrooll--RR>>
- Repaint the screen.
-
- [[ccoouunntt]] <<ccoonnttrrooll--MM>>
-
- [[ccoouunntt]] ++
- Move the cursor down _c_o_u_n_t lines to the first non-
- blank character of that line.
-
- [[ccoouunntt]] <<ccoonnttrrooll--PP>>
-
- [[ccoouunntt]] kk
- Move the cursor up _c_o_u_n_t lines, without changing
- the current column.
-
- <<ccoonnttrrooll--TT>>
- Return to the most recent tag context.
-
- <<ccoonnttrrooll--UU>>
- Scroll backwards _c_o_u_n_t lines.
-
- <<ccoonnttrrooll--WW>>
- Switch to the next lower screen in the window, or,
- to the first screen if there are no lower screens
- in the window.
-
- <<ccoonnttrrooll--YY>>
- Scroll backwards _c_o_u_n_t lines, leaving the current
-
-
-
- May 18, 1996 5
-
-
-
-
-
-VI(1) VI(1)
-
-
- line and column as is, if possible.
-
- <<ccoonnttrrooll--ZZ>>
- Suspend the current editor session.
-
- <<eessccaappee>>
- Execute _e_x commands or cancel partial commands.
-
- <<ccoonnttrrooll--]]>>
- Push a tag reference onto the tag stack.
-
- <<ccoonnttrrooll--^^>>
- Switch to the most recently edited file.
-
- [[ccoouunntt]] <<ssppaaccee>>
-
- [[ccoouunntt]] ll
- Move the cursor forward _c_o_u_n_t characters without
- changing the current line.
-
- [[ccoouunntt]] !! mmoottiioonn sshheellll--aarrgguummeenntt((ss))
- Replace text with results from a shell command.
-
- [[ccoouunntt]] ## ##||++||--
- Increment or decrement the cursor number.
-
- [[ccoouunntt]] $$
- Move the cursor to the end of a line.
-
- %% Move to the matching character.
-
- && Repeat the previous substitution command on the
- current line.
-
- ''<<cchhaarraacctteerr>>
-
- ``<<cchhaarraacctteerr>>
- Return to a context marked by the character _<_c_h_a_r_-
- _a_c_t_e_r_>.
-
- [[ccoouunntt]] ((
- Back up _c_o_u_n_t sentences.
-
- [[ccoouunntt]] ))
- Move forward _c_o_u_n_t sentences.
-
- [[ccoouunntt]] ,,
- Reverse find character _c_o_u_n_t times.
-
- [[ccoouunntt]] --
- Move to first nonblank of the previous line, _c_o_u_n_t
- times.
-
-
-
-
-
- May 18, 1996 6
-
-
-
-
-
-VI(1) VI(1)
-
-
- [[ccoouunntt]] ..
- Repeat the last _v_i command that modified text.
-
- //RREE<<ccaarrrriiaaggee--rreettuurrnn>>
-
- //RREE// [[ooffffsseett]]<<ccaarrrriiaaggee--rreettuurrnn>>
-
- ??RREE<<ccaarrrriiaaggee--rreettuurrnn>>
-
- ??RREE?? [[ooffffsseett]]<<ccaarrrriiaaggee--rreettuurrnn>>
-
- NN
-
- nn Search forward or backward for a regular expres-
- sion.
-
- 00 Move to the first character in the current line.
-
- :: Execute an ex command.
-
- [[ccoouunntt]] ;;
- Repeat the last character find _c_o_u_n_t times.
-
- [[ccoouunntt]] << mmoottiioonn
-
- [[ccoouunntt]] >> mmoottiioonn
- Shift lines left or right.
-
- @@ bbuuffffeerr
- Execute a named buffer.
-
- [[ccoouunntt]] AA
- Enter input mode, appending the text after the end
- of the line.
-
- [[ccoouunntt]] BB
- Move backwards _c_o_u_n_t bigwords.
-
- [[bbuuffffeerr]] [[ccoouunntt]] CC
- Change text from the current position to the end-
- of-line.
-
- [[bbuuffffeerr]] DD
- Delete text from the current position to the end-
- of-line.
-
- [[ccoouunntt]] EE
- Move forward _c_o_u_n_t end-of-bigwords.
-
- [[ccoouunntt]] FF <<cchhaarraacctteerr>>
- Search _c_o_u_n_t times backward through the current
- line for _<_c_h_a_r_a_c_t_e_r_>.
-
-
-
-
-
- May 18, 1996 7
-
-
-
-
-
-VI(1) VI(1)
-
-
- [[ccoouunntt]] GG
- Move to line _c_o_u_n_t, or the last line of the file if
- _c_o_u_n_t not specified.
-
- [[ccoouunntt]] HH
- Move to the screen line _c_o_u_n_t _- _1 lines below the
- top of the screen.
-
- [[ccoouunntt]] II
- Enter input mode, inserting the text at the begin-
- ning of the line.
-
- [[ccoouunntt]] JJ
- Join lines.
-
- [[ccoouunntt]] LL
- Move to the screen line _c_o_u_n_t _- _1 lines above the
- bottom of the screen.
-
- MM Move to the screen line in the middle of the
- screen.
-
- [[ccoouunntt]] OO
- Enter input mode, appending text in a new line
- above the current line.
-
- [[bbuuffffeerr]] PP
- Insert text from a buffer.
-
- QQ Exit _v_i (or visual) mode and switch to _e_x mode.
-
- [[ccoouunntt]] RR
- Enter input mode, replacing the characters in the
- current line.
-
- [[bbuuffffeerr]] [[ccoouunntt]] SS
- Substitute _c_o_u_n_t lines.
-
- [[ccoouunntt]] TT <<cchhaarraacctteerr>>
- Search backwards, _c_o_u_n_t times, through the current
- line for the character _a_f_t_e_r the specified _<_c_h_a_r_a_c_-
- _t_e_r_>.
-
- UU Restore the current line to its state before the
- cursor last moved to it.
-
- [[ccoouunntt]] WW
- Move forward _c_o_u_n_t bigwords.
-
- [[bbuuffffeerr]] [[ccoouunntt]] XX
- Delete _c_o_u_n_t characters before the cursor.
-
- [[bbuuffffeerr]] [[ccoouunntt]] YY
- Copy (or ``yank'') _c_o_u_n_t lines into the specified
-
-
-
- May 18, 1996 8
-
-
-
-
-
-VI(1) VI(1)
-
-
- buffer.
-
- ZZZZ Write the file and exit _v_i.
-
- [[ccoouunntt]] [[[[
- Back up _c_o_u_n_t section boundaries.
-
- [[ccoouunntt]] ]]]]
- Move forward _c_o_u_n_t section boundaries.
-
- ^^ Move to first nonblank character on the current
- line.
-
- [[ccoouunntt]] __
- Move down _c_o_u_n_t _- _1 lines, to the first nonblank
- character.
-
- [[ccoouunntt]] aa
- Enter input mode, appending the text after the cur-
- sor.
-
- [[ccoouunntt]] bb
- Move backwards _c_o_u_n_t words.
-
- [[bbuuffffeerr]] [[ccoouunntt]] cc mmoottiioonn
- Change a region of text.
-
- [[bbuuffffeerr]] [[ccoouunntt]] dd mmoottiioonn
- Delete a region of text.
-
- [[ccoouunntt]] ee
- Move forward _c_o_u_n_t end-of-words.
-
- [[ccoouunntt]] ff<<cchhaarraacctteerr>>
- Search forward, _c_o_u_n_t times, through the rest of
- the current line for _<_c_h_a_r_a_c_t_e_r_>.
-
- [[ccoouunntt]] ii
- Enter input mode, inserting the text before the
- cursor.
-
- mm <<cchhaarraacctteerr>>
- Save the current context (line and column) as
- _<_c_h_a_r_a_c_t_e_r_>.
-
- [[ccoouunntt]] oo
- Enter input mode, appending text in a new line
- under the current line.
-
- [[bbuuffffeerr]] pp
- Append text from a buffer.
-
- [[ccoouunntt]] rr <<cchhaarraacctteerr>>
- Replace _c_o_u_n_t characters.
-
-
-
- May 18, 1996 9
-
-
-
-
-
-VI(1) VI(1)
-
-
- [[bbuuffffeerr]] [[ccoouunntt]] ss
- Substitute _c_o_u_n_t characters in the current line
- starting with the current character.
-
- [[ccoouunntt]] tt <<cchhaarraacctteerr>>
- Search forward, _c_o_u_n_t times, through the current
- line for the character immediately _b_e_f_o_r_e _<_c_h_a_r_a_c_-
- _t_e_r_>.
-
- uu Undo the last change made to the file.
-
- [[ccoouunntt]] ww
- Move forward _c_o_u_n_t words.
-
- [[bbuuffffeerr]] [[ccoouunntt]] xx
- Delete _c_o_u_n_t characters.
-
- [[bbuuffffeerr]] [[ccoouunntt]] yy mmoottiioonn
- Copy (or ``yank'') a text region specified by the
- _c_o_u_n_t and motion into a buffer.
-
- [[ccoouunntt11]] zz [[ccoouunntt22]] --||..||++||^^||<<ccaarrrriiaaggee--rreettuurrnn>>
- Redraw, optionally repositioning and resizing the
- screen.
-
- [[ccoouunntt]] {{
- Move backward _c_o_u_n_t paragraphs.
-
- [[ccoouunntt]] ||
- Move to a specific _c_o_l_u_m_n position on the current
- line.
-
- [[ccoouunntt]] }}
- Move forward _c_o_u_n_t paragraphs.
-
- [[ccoouunntt]] ~~
- Reverse the case of the next _c_o_u_n_t character(s).
-
- [[ccoouunntt]] ~~ mmoottiioonn
- Reverse the case of the characters in a text region
- specified by the _c_o_u_n_t and _m_o_t_i_o_n.
-
- <<iinntteerrrruupptt>>
- Interrupt the current operation.
-
-VVII TTEEXXTT IINNPPUUTT CCOOMMMMAANNDDSS
- The following section describes the commands available in
- the text input mode of the _v_i editor.
-
-
- <<nnuull>> Replay the previous input.
-
- <<ccoonnttrrooll--DD>>
- Erase to the previous sshhiiffttwwiiddtthh column boundary.
-
-
-
- May 18, 1996 10
-
-
-
-
-
-VI(1) VI(1)
-
-
- ^^<<ccoonnttrrooll--DD>>
- Erase all of the autoindent characters, and reset
- the autoindent level.
-
- 00<<ccoonnttrrooll--DD>>
- Erase all of the autoindent characters.
-
- <<ccoonnttrrooll--TT>>
- Insert sufficient _<_t_a_b_> and _<_s_p_a_c_e_> characters to
- move forward to the next sshhiiffttwwiiddtthh column bound-
- ary.
-
- <<eerraassee>>
-
- <<ccoonnttrrooll--HH>>
- Erase the last character.
-
- <<lliitteerraall nneexxtt>>
- Quote the next character.
-
- <<eessccaappee>>
- Resolve all text input into the file, and return to
- command mode.
-
- <<lliinnee eerraassee>>
- Erase the current line.
-
- <<ccoonnttrrooll--WW>>
-
- <<wwoorrdd eerraassee>>
- Erase the last word. The definition of word is
- dependent on the aallttwweerraassee and ttttyywweerraassee options.
-
- <<ccoonnttrrooll--XX>>[[00--99AA--FFaa--ff]]++
- Insert a character with the specified hexadecimal
- value into the text.
-
- <<iinntteerrrruupptt>>
- Interrupt text input mode, returning to command
- mode.
-
-EEXX CCOOMMMMAANNDDSS
- The following section describes the commands available in
- the _e_x editor. In each entry below, the tag line is a
- usage synopsis for the command.
-
-
- <<eenndd--ooff--ffiillee>>
- Scroll the screen.
-
- !! aarrgguummeenntt((ss))
-
- [[rraannggee]]!! aarrgguummeenntt((ss))
- Execute a shell command, or filter lines through a
-
-
-
- May 18, 1996 11
-
-
-
-
-
-VI(1) VI(1)
-
-
- shell command.
-
- "" A comment.
-
- [[rraannggee]] nnuu[[mmbbeerr]] [[ccoouunntt]] [[ffllaaggss]]
-
- [[rraannggee]] ## [[ccoouunntt]] [[ffllaaggss]]
- Display the selected lines, each preceded with its
- line number.
-
- @@ bbuuffffeerr
-
- ** bbuuffffeerr
- Execute a buffer.
-
- [[lliinnee]] aa[[ppppeenndd]][[!!]]
- The input text is appended after the specified
- line.
-
- [[rraannggee]] cc[[hhaannggee]][[!!]] [[ccoouunntt]]
- The input text replaces the specified range.
-
- ccss[[ccooppee]] aadddd || ffiinndd || hheellpp || kkiillll || rreesseett
- Execute a Cscope command.
-
- [[rraannggee]] dd[[eelleettee]] [[bbuuffffeerr]] [[ccoouunntt]] [[ffllaaggss]]
- Delete the lines from the file.
-
- ddii[[ssppllaayy]] bb[[uuffffeerrss]] || cc[[oonnnneeccttiioonnss]] || ss[[ccrreeeennss]] || tt[[aaggss]]
- Display buffers, Cscope connections, screens or
- tags.
-
- ee[[ddiitt]][[!!]] [[++ccmmdd]] [[ffiillee]]
-
- eexx[[!!]] [[++ccmmdd]] [[ffiillee]]
- Edit a different file.
-
- eexxuu[[ssaaggee]] [[ccoommmmaanndd]]
- Display usage for an _e_x command.
-
- ff[[iillee]] [[ffiillee]]
- Display and optionally change the file name.
-
- ffgg [[nnaammee]]
- _V_i mode only. Foreground the specified screen.
-
- [[rraannggee]] gg[[lloobbaall]] //ppaatttteerrnn// [[ccoommmmaannddss]]
-
- [[rraannggee]] vv //ppaatttteerrnn// [[ccoommmmaannddss]]
- Apply commands to lines matching (or not matching)
- a pattern.
-
- hhee[[llpp]] Display a help message.
-
-
-
-
- May 18, 1996 12
-
-
-
-
-
-VI(1) VI(1)
-
-
- [[lliinnee]] ii[[nnsseerrtt]][[!!]]
- The input text is inserted before the specified
- line.
-
- [[rraannggee]] jj[[ooiinn]][[!!]] [[ccoouunntt]] [[ffllaaggss]]
- Join lines of text together.
-
- [[rraannggee]] ll[[iisstt]] [[ccoouunntt]] [[ffllaaggss]]
- Display the lines unambiguously.
-
- mmaapp[[!!]] [[llhhss rrhhss]]
- Define or display maps (for _v_i only).
-
- [[lliinnee]] mmaa[[rrkk]] <<cchhaarraacctteerr>>
-
- [[lliinnee]] kk <<cchhaarraacctteerr>>
- Mark the line with the mark _<_c_h_a_r_a_c_t_e_r_>.
-
- [[rraannggee]] mm[[oovvee]] lliinnee
- Move the specified lines after the target line.
-
- mmkk[[eexxrrcc]][[!!]] ffiillee
- Write the abbreviations, editor options and maps to
- the specified file.
-
- nn[[eexxtt]][[!!]] [[ffiillee ......]]
- Edit the next file from the argument list.
-
- [[lliinnee]] oo[[ppeenn]] //ppaatttteerrnn// [[ffllaaggss]]
- Enter open mode.
-
- pprree[[sseerrvvee]]
- Save the file in a form that can later be recovered
- using the _e_x --rr option.
-
- pprreevv[[iioouuss]][[!!]]
- Edit the previous file from the argument list.
-
- [[rraannggee]] pp[[rriinntt]] [[ccoouunntt]] [[ffllaaggss]]
- Display the specified lines.
-
- [[lliinnee]] ppuu[[tt]] [[bbuuffffeerr]]
- Append buffer contents to the current line.
-
- qq[[uuiitt]][[!!]]
- End the editing session.
-
- [[lliinnee]] rr[[eeaadd]][[!!]] [[ffiillee]]
- Read a file.
-
- rreecc[[oovveerr]] ffiillee
- Recover _f_i_l_e if it was previously saved.
-
-
-
-
-
- May 18, 1996 13
-
-
-
-
-
-VI(1) VI(1)
-
-
- rreess[[iizzee]] [[++||--]]ssiizzee
- _V_i mode only. Grow or shrink the current screen.
-
- rreeww[[iinndd]][[!!]]
- Rewind the argument list.
-
- ssee[[tt]] [[ooppttiioonn[[==[[vvaalluuee]]]] ......]] [[nnooooppttiioonn ......]] [[ooppttiioonn?? ......]]
- [[aallll]]
- Display or set editor options.
-
- sshh[[eellll]]
- Run a shell program.
-
- ssoo[[uurrccee]] ffiillee
- Read and execute _e_x commands from a file.
-
- [[rraannggee]] ss[[uubbssttiittuuttee]] [[//ppaatttteerrnn//rreeppllaaccee//]] [[ooppttiioonnss]]
- [[ccoouunntt]] [[ffllaaggss]]
-
- [[rraannggee]] && [[ooppttiioonnss]] [[ccoouunntt]] [[ffllaaggss]]
-
- [[rraannggee]] ~~ [[ooppttiioonnss]] [[ccoouunntt]] [[ffllaaggss]]
- Make substitutions.
-
- ssuu[[ssppeenndd]][[!!]]
-
- sstt[[oopp]][[!!]]
-
- <<ssuussppeenndd>>
- Suspend the edit session.
-
- ttaa[[gg]][[!!]] ttaaggssttrriinngg
- Edit the file containing the specified tag.
-
- ttaaggnn[[eexxtt]][[!!]]
- Edit the file containing the next context for the
- current tag.
-
- ttaaggpp[[oopp]][[!!]] [[ffiillee || nnuummbbeerr]]
- Pop to the specified tag in the tags stack.
-
- ttaaggpp[[rreevv]][[!!]]
- Edit the file containing the previous context for
- the current tag.
-
- uunnmm[[aapp]][[!!]] llhhss
- Unmap a mapped string.
-
- vvee[[rrssiioonn]]
- Display the version of the _e_x_/_v_i editor.
-
- [[lliinnee]] vvii[[ssuuaall]] [[ttyyppee]] [[ccoouunntt]] [[ffllaaggss]]
- _E_x mode only. Enter _v_i.
-
-
-
-
- May 18, 1996 14
-
-
-
-
-
-VI(1) VI(1)
-
-
- vvii[[ssuuaall]][[!!]] [[++ccmmdd]] [[ffiillee]]
- _V_i mode only. Edit a new file.
-
- vviiuu[[ssaaggee]] [[ccoommmmaanndd]]
- Display usage for a _v_i command.
-
- [[rraannggee]] ww[[rriittee]][[!!]] [[>>>>]] [[ffiillee]]
-
- [[rraannggee]] ww[[rriittee]] [[!!]] [[ffiillee]]
-
- [[rraannggee]] wwnn[[!!]] [[>>>>]] [[ffiillee]]
-
- [[rraannggee]] wwqq[[!!]] [[>>>>]] [[ffiillee]]
- Write the file.
-
- [[rraannggee]] xx[[iitt]][[!!]] [[ffiillee]]
- Write the file if it has been modified.
-
- [[rraannggee]] yyaa[[nnkk]] [[bbuuffffeerr]] [[ccoouunntt]]
- Copy the specified lines to a buffer.
-
- [[lliinnee]] zz [[ttyyppee]] [[ccoouunntt]] [[ffllaaggss]]
- Adjust the window.
-
-SSEETT OOPPTTIIOONNSS
- 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 abbre-
- viations. 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 associ-
- ated value.
-
- Options apply to both _e_x and _v_i modes, unless otherwise
- specified.
-
-
- aallttwweerraassee [[ooffff]]
- _V_i only. Select an alternate word erase algorithm.
-
- aauuttooiinnddeenntt,, aaii [[ooffff]]
- Automatically indent new lines.
-
- aauuttoopprriinntt,, aapp [[ooffff]]
- _E_x only. Display the current line automatically.
-
- aauuttoowwrriittee,, aaww [[ooffff]]
- Write modified files automatically when changing
- files.
-
-
-
-
- May 18, 1996 15
-
-
-
-
-
-VI(1) VI(1)
-
-
- bbaacckkuupp [[""""]]
- Backup files before they are overwritten.
-
- bbeeaauuttiiffyy,, bbff [[ooffff]]
- Discard control characters.
-
- ccddppaatthh [[eennvviirroonnmmeenntt vvaarriiaabbllee CCDDPPAATTHH,, oorr ccuurrrreenntt ddiirreeccttoorryy]]
- The directory paths used as path prefixes for the
- ccdd command.
-
- cceeddiitt [[nnoo ddeeffaauulltt]]
- Set the character to edit the colon command-line
- history.
-
- ccoolluummnnss,, ccoo [[8800]]
- Set the number of columns in the screen.
-
- ccoommmmeenntt [[ooffff]]
- _V_i only. Skip leading comments in files.
-
- ddiirreeccttoorryy,, ddiirr [[eennvviirroonnmmeenntt vvaarriiaabbllee TTMMPPDDIIRR,, oorr //ttmmpp]]
- The directory where temporary files are created.
-
- eeddccoommppaattiibbllee,, eedd [[ooffff]]
- Remember the values of the ``c'' and ``g'' suffices
- to the ssuubbssttiittuuttee commands, instead of initializing
- them as unset for each new command.
-
- eerrrroorrbbeellllss,, eebb [[ooffff]]
- _E_x only. Announce error messages with a bell.
-
- eexxrrcc,, eexx [[ooffff]]
- Read the startup files in the local directory.
-
- eexxtteennddeedd [[ooffff]]
- Regular expressions are extended (i.e.
- _e_g_r_e_p(1)-style) expressions.
-
- ffiilleecc [[nnoo ddeeffaauulltt]]
- Set the character to perform file path completion
- on the colon command line.
-
- ffllaasshh [[oonn]]
- Flash the screen instead of beeping the keyboard on
- error.
-
- hhaarrddttaabbss,, hhtt [[88]]
- Set the spacing between hardware tab settings.
-
- iicclloowweerr [[ooffff]]
- Makes all Regular Expressions case-insensitive, as
- long as an upper-case letter does not appear in the
- search string.
-
-
-
-
- May 18, 1996 16
-
-
-
-
-
-VI(1) VI(1)
-
-
- iiggnnoorreeccaassee,, iicc [[ooffff]]
- Ignore case differences in regular expressions.
-
- kkeeyyttiimmee [[66]]
- The 10th's of a second _e_x_/_v_i waits for a subsequent
- key to complete a key mapping.
-
- lleeffttrriigghhtt [[ooffff]]
- _V_i only. Do left-right scrolling.
-
- lliinneess,, llii [[2244]]
- _V_i only. Set the number of lines in the screen.
-
- lliisspp [[ooffff]]
- _V_i only. Modify various search commands and
- options to work with 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_.
-
- lliisstt [[ooffff]]
- Display lines in an unambiguous fashion.
-
- lloocckk [[oonn]]
- Attempt to get an exclusive lock on any file being
- edited, read or written.
-
- mmaaggiicc [[oonn]]
- Treat certain characters specially in regular
- expressions.
-
- mmaattcchhttiimmee [[77]]
- _V_i only. The 10th's of a second _e_x_/_v_i pauses on
- the matching character when the sshhoowwmmaattcchh option is
- set.
-
- mmeessgg [[oonn]]
- Permit messages from other users.
-
- mmooddeelliinneess,, mmooddeelliinnee [[ooffff]]
- Read the first and last few lines of each file for
- _e_x commands. _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_.
-
- nnoopprriinntt [[""""]]
- Characters that are never handled as printable
- characters.
-
- nnuummbbeerr,, nnuu [[ooffff]]
- Precede each line displayed with its current line
- number.
-
- ooccttaall [[ooffff]]
- Display unknown characters as octal numbers,
- instead of the default hexadecimal.
-
-
-
-
- May 18, 1996 17
-
-
-
-
-
-VI(1) VI(1)
-
-
- ooppeenn [[oonn]]
- _E_x only. If this option is not set, the ooppeenn and
- vviissuuaall commands are disallowed.
-
- ooppttiimmiizzee,, oopptt [[oonn]]
- _V_i only. Optimize text throughput to dumb termi-
- nals. _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_.
-
- ppaarraaggrraapphhss,, ppaarraa [[IIPPLLPPPPPPQQPPPP LLIIppppllppiippbbpp]]
- _V_i only. Define additional paragraph boundaries
- for the {{ and }} commands.
-
- pprriinntt [[""""]]
- Characters that are always handled as printable
- characters.
-
- pprroommpptt [[oonn]]
- _E_x only. Display a command prompt.
-
- rreeaaddoonnllyy,, rroo [[ooffff]]
- Mark the file and session as read-only.
-
- rreeccddiirr [[//vvaarr//ttmmpp//vvii..rreeccoovveerr]]
- The directory where recovery files are stored.
-
- rreeddrraaww,, rree [[ooffff]]
- _V_i only. Simulate an intelligent terminal on a
- dumb one. _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_.
-
- rreemmaapp [[oonn]]
- Remap keys until resolved.
-
- rreeppoorrtt [[55]]
- Set the number of lines about which the editor
- reports changes or yanks.
-
- rruulleerr [[ooffff]]
- _V_i only. Display a row/column ruler on the colon
- command line.
-
- ssccrroollll,, ssccrr [[wwiinnddooww // 22]]
- Set the number of lines scrolled.
-
- sseeaarrcchhiinnccrr [[ooffff]]
- Makes the // and ?? commands incremental.
-
- sseeccttiioonnss,, sseecctt [[NNHHSSHHHH HHUUnnhhsshh]]
- _V_i only. Define additional section boundaries for
- the [[[[ and ]]]] commands.
-
- sseeccuurree [[ooffff]]
- Turns off all access to external programs.
-
-
-
-
-
- May 18, 1996 18
-
-
-
-
-
-VI(1) VI(1)
-
-
- sshheellll,, sshh [[eennvviirroonnmmeenntt vvaarriiaabbllee SSHHEELLLL,, oorr //bbiinn//sshh]]
- Select the shell used by the editor.
-
- sshheellllmmeettaa [[~~{{[[**??$$``''""\\]]
- Set the meta characters checked to determine if
- file name expansion is necessary.
-
- sshhiiffttwwiiddtthh,, ssww [[88]]
- Set the autoindent and shift command indentation
- width.
-
- sshhoowwmmaattcchh,, ssmm [[ooffff]]
- _V_i only. Note matching ``{'' and ``('' for ``}''
- and ``)'' characters.
-
- sshhoowwmmooddee [[ooffff]]
- _V_i only. Display the current editor mode and a
- ``modified'' flag.
-
- ssiiddeessccrroollll [[1166]]
- _V_i only. Set the amount a left-right scroll will
- shift.
-
- sslloowwooppeenn,, ssllooww [[ooffff]]
- Delay display updating during text input. _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_.
-
- ssoouurrcceeaannyy [[ooffff]]
- Read startup files not owned by the current user.
- _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_.
-
- ttaabbssttoopp,, ttss [[88]]
- This option sets tab widths for the editor display.
-
- ttaagglleennggtthh,, ttll [[00]]
- Set the number of significant characters in tag
- names.
-
- ttaaggss,, ttaagg [[ttaaggss //vvaarr//ddbb//lliibbcc..ttaaggss //ssyyss//kkeerrnn//ttaaggss]]
- Set the list of tags files.
-
- tteerrmm,, ttttyyttyyppee,, ttttyy [[eennvviirroonnmmeenntt vvaarriiaabbllee TTEERRMM]]
- Set the terminal type.
-
- tteerrssee [[ooffff]]
- This option has historically made editor messages
- less verbose. It has no effect in this implementa-
- tion.
-
- ttiillddeeoopp
- Modify the ~~ command to take an associated motion.
-
- ttiimmeeoouutt,, ttoo [[oonn]]
- Time out on keys which may be mapped.
-
-
-
- May 18, 1996 19
-
-
-
-
-
-VI(1) VI(1)
-
-
- ttttyywweerraassee [[ooffff]]
- _V_i only. Select an alternate erase algorithm.
-
- vveerrbboossee [[ooffff]]
- _V_i only. Display an error message for every error.
-
- ww330000 [[nnoo ddeeffaauulltt]]
- _V_i only. Set the window size if the baud rate is
- less than 1200 baud.
-
- ww11220000 [[nnoo ddeeffaauulltt]]
- _V_i only. Set the window size if the baud rate is
- equal to 1200 baud.
-
- ww99660000 [[nnoo ddeeffaauulltt]]
- _V_i only. Set the window size if the baud rate is
- greater than 1200 baud.
-
- wwaarrnn [[oonn]]
- _E_x only. This option causes a warning message to
- the terminal if the file has been modified, since
- it was last written, before a !! command.
-
- wwiinnddooww,, ww,, wwii [[eennvviirroonnmmeenntt vvaarriiaabbllee LLIINNEESS]]
- Set the window size for the screen.
-
- wwrraapplleenn,, wwll [[00]]
- _V_i only. Break lines automatically, the specified
- number of columns from the left-hand margin. If
- both the wwrraapplleenn and wwrraappmmaarrggiinn edit options are
- set, the wwrraappmmaarrggiinn value is used.
-
- wwrraappmmaarrggiinn,, wwmm [[00]]
- _V_i only. Break lines automatically, the specified
- number of columns from the right-hand margin. If
- both the wwrraapplleenn and wwrraappmmaarrggiinn edit options are
- set, the wwrraappmmaarrggiinn value is used.
-
- wwrraappssccaann,, wwss [[oonn]]
- Set searches to wrap around the end or beginning of
- the file.
-
- wwrriitteeaannyy,, wwaa [[ooffff]]
- Turn off file-overwriting checks.
-
-EENNVVIIRROONNMMEENNTTAALL VVAARRIIAABBLLEESS
- _C_O_L_U_M_N_S
- The number of columns on the screen. This value
- overrides any system or terminal specific values.
- If the _C_O_L_U_M_N_S environmental variable is not set
- when _e_x_/_v_i runs, or the ccoolluummnnss option is explic-
- itly reset by the user, _e_x_/_v_i enters the value into
- the environment.
-
-
-
-
- May 18, 1996 20
-
-
-
-
-
-VI(1) VI(1)
-
-
- _E_X_I_N_I_T A list of _e_x startup commands, read if the variable
- _N_E_X_I_N_I_T is not set.
-
- _H_O_M_E The user's home directory, used as the initial
- directory path for the startup ``$_H_O_M_E/.nexrc'' and
- ``$_H_O_M_E/.exrc'' files. This value is also used as
- the default directory for the _v_i ccdd command.
-
- _L_I_N_E_S The number of rows on the screen. This value over-
- rides any system or terminal specific values. If
- the _L_I_N_E_S environmental variable is not set when
- _e_x_/_v_i runs, or the lliinneess option is explicitly reset
- by the user, _e_x_/_v_i enters the value into the envi-
- ronment.
-
- _N_E_X_I_N_I_T
- A list of _e_x startup commands.
-
- _S_H_E_L_L The user's shell of choice (see also the sshheellll
- option).
-
- _T_E_R_M The user's terminal type. The default is the type
- ``unknown''. If the _T_E_R_M environmental variable is
- not set when _e_x_/_v_i runs, or the tteerrmm option is
- explicitly reset by the user, _e_x_/_v_i enters the
- value into the environment.
-
- _T_M_P_D_I_R The location used to stored temporary files (see
- also the ddiirreeccttoorryy edit option).
-
-AASSYYNNCCHHRROONNOOUUSS EEVVEENNTTSS
- SIGALRM
- _V_i_/_e_x uses this signal for periodic backups of file
- modifications and to display ``busy'' messages when
- operations are likely to take a long time.
-
- SIGHUP
-
- SIGTERM
- If the current buffer has changed since it was last
- written in its entirety, the editor attempts to
- save the modified file so it can be later recov-
- ered. See the _v_i_/_e_x Reference manual section enti-
- tled ``Recovery'' for more information.
-
- SIGINT When an interrupt occurs, the current operation is
- halted, and the editor returns to the command
- level. If interrupted during text input, the text
- already input is resolved into the file as if the
- text input had been normally terminated.
-
- SIGWINCH
- The screen is resized. See the _v_i_/_e_x Reference
- manual section entitled ``Sizing the Screen'' for
-
-
-
- May 18, 1996 21
-
-
-
-
-
-VI(1) VI(1)
-
-
- more information.
-
- SIGCONT
-
- SIGQUIT
-
- SIGTSTP
- _V_i_/_e_x ignores these signals.
-
-FFIILLEESS
- /bin/sh
- The default user shell.
-
- /etc/vi.exrc
- System-wide vi startup file.
-
- /tmp Temporary file directory.
-
- /var/tmp/vi.recover
- The default recovery file directory.
-
- $HOME/.nexrc
- 1st choice for user's home directory startup file.
-
- $HOME/.exrc
- 2nd choice for user's home directory startup file.
-
- .nexrc 1st choice for local directory startup file.
-
- .exrc 2nd choice for local directory startup file.
-
-SSEEEE AALLSSOO
- _c_t_a_g_s(1), _m_o_r_e(3), _c_u_r_s_e_s(3), _d_b_o_p_e_n(3)
-
- The ``Vi Quick Reference'' card.
-
- ``An Introduction to Display Editing with Vi'', found in
- the ``UNIX User's Manual Supplementary Documents'' section
- of both the 4.3BSD and 4.4BSD manual sets. This document
- is the closest thing available to an introduction to the
- _v_i screen editor.
-
- ``Ex Reference Manual (Version 3.7)'', found in the ``UNIX
- User's Manual Supplementary Documents'' section of both
- the 4.3BSD and 4.4BSD manual sets. This document is the
- final reference for the _e_x editor, as distributed in most
- historic 4BSD and System V systems.
-
- ``Edit: A tutorial'', found in the ``UNIX User's Manual
- Supplementary Documents'' section of the 4.3BSD manual
- set. This document is an introduction to a simple version
- of the _e_x screen editor.
-
- ``Ex/Vi Reference Manual'', found in the ``UNIX User's
-
-
-
- May 18, 1996 22
-
-
-
-
-
-VI(1) VI(1)
-
-
- Manual Supplementary Documents'' section of the 4.4BSD
- manual set. This document is the final reference for the
- _n_e_x_/_n_v_i text editors, as distributed in 4.4BSD and 4.4BSD-
- Lite.
-
- _R_o_f_f source for all of these documents is distributed with
- _n_e_x_/_n_v_i in the _n_v_i_/_U_S_D_._d_o_c directory of the _n_e_x_/_n_v_i source
- code.
-
- The files ``autowrite'', ``input'', ``quoting'' and
- ``structures'' found in the _n_v_i_/_d_o_c_s_/_i_n_t_e_r_n_a_l_s directory
- of the _n_e_x_/_n_v_i source code.
-
-HHIISSTTOORRYY
- The _n_e_x_/_n_v_i replacements for the _e_x_/_v_i editor first
- appeared in 4.4BSD.
-
-SSTTAANNDDAARRDDSS
- _N_e_x_/_n_v_i is close to IEEE Std1003.2 (``POSIX''). That doc-
- ument differs from historical _e_x_/_v_i practice in several
- places; there are changes to be made on both sides.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- May 18, 1996 23
-
-
diff --git a/usr.bin/vi/docs/USD.doc/vi.man/vi.0.ps b/usr.bin/vi/docs/USD.doc/vi.man/vi.0.ps
deleted file mode 100644
index 48eabf6a9a4..00000000000
--- a/usr.bin/vi/docs/USD.doc/vi.man/vi.0.ps
+++ /dev/null
@@ -1,1172 +0,0 @@
-%!PS-Adobe-3.0
-%%Creator: groff version 1.10
-%%CreationDate: Sat May 18 15:39:42 1996
-%%DocumentNeededResources: font Times-Roman
-%%+ font Times-Bold
-%%+ font Times-Italic
-%%DocumentSuppliedResources: procset grops 1.10 0
-%%Pages: 16
-%%PageOrder: Ascend
-%%Orientation: Portrait
-%%EndComments
-%%BeginProlog
-%%BeginResource: procset grops 1.10 0
-/setpacking where{
-pop
-currentpacking
-true setpacking
-}if
-/grops 120 dict dup begin
-/SC 32 def
-/A/show load def
-/B{0 SC 3 -1 roll widthshow}bind def
-/C{0 exch ashow}bind def
-/D{0 exch 0 SC 5 2 roll awidthshow}bind def
-/E{0 rmoveto show}bind def
-/F{0 rmoveto 0 SC 3 -1 roll widthshow}bind def
-/G{0 rmoveto 0 exch ashow}bind def
-/H{0 rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def
-/I{0 exch rmoveto show}bind def
-/J{0 exch rmoveto 0 SC 3 -1 roll widthshow}bind def
-/K{0 exch rmoveto 0 exch ashow}bind def
-/L{0 exch rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def
-/M{rmoveto show}bind def
-/N{rmoveto 0 SC 3 -1 roll widthshow}bind def
-/O{rmoveto 0 exch ashow}bind def
-/P{rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def
-/Q{moveto show}bind def
-/R{moveto 0 SC 3 -1 roll widthshow}bind def
-/S{moveto 0 exch ashow}bind def
-/T{moveto 0 exch 0 SC 5 2 roll awidthshow}bind def
-/SF{
-findfont exch
-[exch dup 0 exch 0 exch neg 0 0]makefont
-dup setfont
-[exch/setfont cvx]cvx bind def
-}bind def
-/MF{
-findfont
-[5 2 roll
-0 3 1 roll
-neg 0 0]makefont
-dup setfont
-[exch/setfont cvx]cvx bind def
-}bind def
-/level0 0 def
-/RES 0 def
-/PL 0 def
-/LS 0 def
-/MANUAL{
-statusdict begin/manualfeed true store end
-}bind def
-/PLG{
-gsave newpath clippath pathbbox grestore
-exch pop add exch pop
-}bind def
-/BP{
-/level0 save def
-1 setlinecap
-1 setlinejoin
-72 RES div dup scale
-LS{
-90 rotate
-}{
-0 PL translate
-}ifelse
-1 -1 scale
-}bind def
-/EP{
-level0 restore
-showpage
-}bind def
-/DA{
-newpath arcn stroke
-}bind def
-/SN{
-transform
-.25 sub exch .25 sub exch
-round .25 add exch round .25 add exch
-itransform
-}bind def
-/DL{
-SN
-moveto
-SN
-lineto stroke
-}bind def
-/DC{
-newpath 0 360 arc closepath
-}bind def
-/TM matrix def
-/DE{
-TM currentmatrix pop
-translate scale newpath 0 0 .5 0 360 arc closepath
-TM setmatrix
-}bind def
-/RC/rcurveto load def
-/RL/rlineto load def
-/ST/stroke load def
-/MT/moveto load def
-/CL/closepath load def
-/FL{
-currentgray exch setgray fill setgray
-}bind def
-/BL/fill load def
-/LW/setlinewidth load def
-/RE{
-findfont
-dup maxlength 1 index/FontName known not{1 add}if dict begin
-{
-1 index/FID ne{def}{pop pop}ifelse
-}forall
-/Encoding exch def
-dup/FontName exch def
-currentdict end definefont pop
-}bind def
-/DEFS 0 def
-/EBEGIN{
-moveto
-DEFS begin
-}bind def
-/EEND/end load def
-/CNT 0 def
-/level1 0 def
-/PBEGIN{
-/level1 save def
-translate
-div 3 1 roll div exch scale
-neg exch neg exch translate
-0 setgray
-0 setlinecap
-1 setlinewidth
-0 setlinejoin
-10 setmiterlimit
-[]0 setdash
-/setstrokeadjust where{
-pop
-false setstrokeadjust
-}if
-/setoverprint where{
-pop
-false setoverprint
-}if
-newpath
-/CNT countdictstack def
-userdict begin
-/showpage{}def
-}bind def
-/PEND{
-clear
-countdictstack CNT sub{end}repeat
-level1 restore
-}bind def
-end def
-/setpacking where{
-pop
-setpacking
-}if
-%%EndResource
-%%IncludeResource: font Times-Roman
-%%IncludeResource: font Times-Bold
-%%IncludeResource: font Times-Italic
-grops begin/DEFS 1 dict def DEFS begin/u{.001 mul}bind def end/RES 72
-def/PL 792 def/LS false def/ENC0[/asciicircum/asciitilde/Scaron/Zcaron
-/scaron/zcaron/Ydieresis/trademark/quotesingle/.notdef/.notdef/.notdef
-/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef
-/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef
-/.notdef/.notdef/space/exclam/quotedbl/numbersign/dollar/percent
-/ampersand/quoteright/parenleft/parenright/asterisk/plus/comma/hyphen
-/period/slash/zero/one/two/three/four/five/six/seven/eight/nine/colon
-/semicolon/less/equal/greater/question/at/A/B/C/D/E/F/G/H/I/J/K/L/M/N/O
-/P/Q/R/S/T/U/V/W/X/Y/Z/bracketleft/backslash/bracketright/circumflex
-/underscore/quoteleft/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y
-/z/braceleft/bar/braceright/tilde/.notdef/quotesinglbase/guillemotleft
-/guillemotright/bullet/florin/fraction/perthousand/dagger/daggerdbl
-/endash/emdash/ff/fi/fl/ffi/ffl/dotlessi/dotlessj/grave/hungarumlaut
-/dotaccent/breve/caron/ring/ogonek/quotedblleft/quotedblright/oe/lslash
-/quotedblbase/OE/Lslash/.notdef/exclamdown/cent/sterling/currency/yen
-/brokenbar/section/dieresis/copyright/ordfeminine/guilsinglleft
-/logicalnot/minus/registered/macron/degree/plusminus/twosuperior
-/threesuperior/acute/mu/paragraph/periodcentered/cedilla/onesuperior
-/ordmasculine/guilsinglright/onequarter/onehalf/threequarters
-/questiondown/Agrave/Aacute/Acircumflex/Atilde/Adieresis/Aring/AE
-/Ccedilla/Egrave/Eacute/Ecircumflex/Edieresis/Igrave/Iacute/Icircumflex
-/Idieresis/Eth/Ntilde/Ograve/Oacute/Ocircumflex/Otilde/Odieresis
-/multiply/Oslash/Ugrave/Uacute/Ucircumflex/Udieresis/Yacute/Thorn
-/germandbls/agrave/aacute/acircumflex/atilde/adieresis/aring/ae/ccedilla
-/egrave/eacute/ecircumflex/edieresis/igrave/iacute/icircumflex/idieresis
-/eth/ntilde/ograve/oacute/ocircumflex/otilde/odieresis/divide/oslash
-/ugrave/uacute/ucircumflex/udieresis/yacute/thorn/ydieresis]def
-/Times-Italic@0 ENC0/Times-Italic RE/Times-Bold@0 ENC0/Times-Bold RE
-/Times-Roman@0 ENC0/Times-Roman RE
-%%EndProlog
-%%Page: 1 1
-%%BeginPageSetup
-BP
-%%EndPageSetup
-/F0 10/Times-Roman@0 SF 421.08(VI\(1\) VI\(1\))72 48 R/F1 9/Times-Bold@0
-SF -.18(NA)72 84 S(ME).18 E F0 -.15(ex)108 96 S 2.5(,v).15 G(i, vie)-2.5
-E 2.5(w\255t)-.25 G -.15(ex)-2.5 G 2.5(te).15 G(ditors)-2.5 E F1
-(SYNOPSIS)72 112.8 Q/F2 10/Times-Bold@0 SF(ex)108 124.8 Q F0([)2.5 E F2
-(-eFRrsv)A F0 2.5(][)C F2(-c)-2.5 E/F3 10/Times-Italic@0 SF(cmd)2.5 E F0
-2.5(][).77 G F2(-t)-2.5 E F3(ta)2.5 E(g)-.1 E F0 2.5(][).22 G F2(-w)-2.5
-E F3(size)2.5 E F0 2.5(][).18 G(\214le ...])-2.5 E F2(vi)108 136.8 Q F0
-([)2.5 E F2(-eFlRr)A(v)-.1 E F0 2.5(][)C F2(-c)-2.5 E F3(cmd)2.5 E F0
-2.5(][).77 G F2(-t)-2.5 E F3(ta)2.5 E(g)-.1 E F0 2.5(][).22 G F2(-w)-2.5
-E F3(size)2.5 E F0 2.5(][).18 G(\214le ...])-2.5 E F2(view)108 148.8 Q
-F0([)2.5 E F2(-eFRr)A(v)-.1 E F0 2.5(][)C F2(-c)-2.5 E F3(cmd)2.5 E F0
-2.5(][).77 G F2(-t)-2.5 E F3(ta)2.5 E(g)-.1 E F0 2.5(][).22 G F2(-w)-2.5
-E F3(size)2.5 E F0 2.5(][).18 G(\214le ...])-2.5 E F1(DESCRIPTION)72
-165.6 Q F3 -.74(Vi)108 177.6 S F0 .452(is a screen oriented te)3.692 F
-.452(xt editor)-.15 F(.)-.55 E F3(Ex)5.452 E F0 .452
-(is a line-oriented te)2.952 F .452(xt editor)-.15 F(.)-.55 E F3(Ex)
-5.452 E F0(and)2.952 E F3(vi)2.952 E F0 .452(are dif)2.952 F .452
-(ferent interf)-.25 F .452(aces to the)-.1 F .502(same program, and it is possible to switch back and forth during an edit session.)
-108 189.6 R F3 -.74(Vi)5.502 G -.15(ew).74 G F0 .502(is the equi)3.152 F
--.25(va)-.25 G .503(lent of).25 F(using the)108 201.6 Q F2<ad52>2.5 E F0
-(\(read-only\) option of)2.5 E F3(vi)2.5 E F0(.).36 E 2.044
-(This manual page is the one pro)108 218.4 R 2.044(vided with the)-.15 F
-F3(ne)4.544 E(x/n)-.2 E(vi)-.4 E F0 -.15(ve)4.544 G 2.044(rsions of the)
-.15 F F3 -.2(ex)4.544 G(/vi).2 E F0(te)4.544 E 2.044(xt editors.)-.15 F
-F3(Ne)7.044 E(x/n)-.2 E(vi)-.4 E F0(are)4.544 E 1.391(intended as b)108
-230.4 R(ug-for)-.2 E(-b)-.2 E 1.392
-(ug compatible replacements for the original F)-.2 F 1.392(ourth Berk)
--.15 F(ele)-.1 E 3.892(yS)-.15 G(oftw)-3.892 E 1.392(are Distrib)-.1 F
-(ution)-.2 E(\(4BSD\))108 242.4 Q F3 -.2(ex)3.273 G F0(and)3.473 E F3
-(vi)3.273 E F0 3.273(programs. F)3.273 F .773
-(or the rest of this manual page,)-.15 F F3(ne)3.273 E(x/n)-.2 E(vi)-.4
-E F0 .772(is used only when it')3.272 F 3.272(sn)-.55 G .772
-(ecessary to)-3.272 F
-(distinguish it from the historic implementations of)108 254.4 Q F3 -.2
-(ex)2.5 G(/vi).2 E F0(.).36 E 1.125
-(This manual page is intended for users already f)108 271.2 R 1.125
-(amiliar with)-.1 F F3 -.2(ex)3.625 G(/vi).2 E F0 6.126(.A).36 G -.15
-(ny)-6.126 G 1.126(one else should almost certainly).15 F .249
-(read a good tutorial on the editor before this manual page.)108 283.2 R
-.248(If you')5.248 F .248(re in an unf)-.5 F .248(amiliar en)-.1 F .248
-(vironment, and you)-.4 F .399(absolutely ha)108 295.2 R .699 -.15(ve t)
--.2 H 2.899(og).15 G .399(et w)-2.899 F .399(ork done immediately)-.1 F
-2.899(,r)-.65 G .4
-(ead the section after the options description, entitled `)-2.899 F(`F)
--.74 E(ast)-.15 E(Startup')108 307.2 Q 2.5('. It')-.74 F 2.5(sp)-.55 G
-(robably enough to get you going.)-2.5 E(The follo)108 324 Q
-(wing options are a)-.25 E -.25(va)-.2 G(ilable:).25 E F2<ad63>108 340.8
-Q F0(Ex)25.86 E(ecute)-.15 E F2(cmd)2.935 E F0 .435
-(immediately after starting the edit session.)2.935 F -.15(Pa)5.435 G
-.435(rticularly useful for initial positioning).15 F .323
-(in the \214le, ho)144 352.8 R(we)-.25 E -.15(ve)-.25 G(r).15 E F2(cmd)
-2.823 E F0 .324(is not limited to positioning commands.)2.824 F .324
-(This is the POSIX 1003.2 inter)5.324 F(-)-.2 E -.1(fa)144 364.8 S
-(ce for the historic `).1 E(`+cmd')-.74 E 2.5('s)-.74 G(yntax.)-2.5 E F3
-(Ne)5 E(x/n)-.2 E(vi)-.4 E F0(supports both the old and ne)2.5 E 2.5(ws)
--.25 G(yntax.)-2.5 E F2<ad65>108 381.6 Q F0(Start editing in e)25.86 E
-2.5(xm)-.15 G(ode, as if the command name were)-2.5 E F3 -.2(ex)2.5 G F0
-(.).73 E F2<ad46>108 398.4 Q F0(Don')24.19 E 2.894(tc)-.18 G(op)-2.894 E
-2.894(yt)-.1 G .393(he entire \214le when \214rst starting to edit.)
--2.894 F .393(\(The def)5.393 F .393(ault is to mak)-.1 F 2.893(eac)-.1
-G(op)-2.893 E 2.893(yi)-.1 G 2.893(nc)-2.893 G .393(ase some-)-2.893 F
-(one else modi\214es the \214le during your edit session.\))144 410.4 Q
-F2<ad6c>108 427.2 Q F0(Start editing with the lisp and sho)27.52 E
-(wmatch options set.)-.25 E F2<ad52>108 444 Q F0 .947
-(Start editing in read-only mode, as if the command name w)23.08 F(as)
--.1 E F3(vie)3.447 E(w)-.15 E F0 3.447(,o).31 G 3.447(rt)-3.447 G(he)
--3.447 E F2 -.18(re)3.447 G(adonly).18 E F0 .947(option w)3.447 F(as)-.1
-E(set.)144 456 Q F2<ad72>108 472.8 Q F0(Reco)25.86 E -.15(ve)-.15 G
-3.001(rt).15 G .501(he speci\214ed \214les, or)-3.001 F 3.001(,i)-.4 G
-3.001(fn)-3.001 G 3.001<6f8c>-3.001 G .5
-(les are speci\214ed, list the \214les that could be reco)-3.001 F -.15
-(ve)-.15 G 3(red. If).15 F(no)3 E(reco)144 484.8 Q -.15(ve)-.15 G 1.264
-(rable \214les by the speci\214ed name e).15 F 1.264
-(xist, the \214le is edited as if the)-.15 F F2<ad72>3.764 E F0 1.264
-(option had not been)3.764 F(speci\214ed.)144 496.8 Q F2<ad73>108 513.6
-Q F0 1.597(Enter batch mode; applicable only to)26.41 F F3 -.2(ex)4.097
-G F0 1.597(edit sessions.)4.297 F 1.596
-(Batch mode is useful when running)6.597 F F3 -.2(ex)4.096 G F0 3.893
-(scripts. Prompts,)144 525.6 R(informati)3.893 E 1.693 -.15(ve m)-.25 H
-1.393(essages and other user oriented message are turned of).15 F 1.393
-(f, and no)-.25 F .788(startup \214les or en)144 537.6 R .788
-(vironmental v)-.4 F .788(ariables are read.)-.25 F .788
-(This is the POSIX 1003.2 interf)5.788 F .788(ace for the his-)-.1 F
-(toric `)144 549.6 Q(`\255')-.74 E 2.5('a)-.74 G -.18(rg)-2.5 G(ument.)
-.18 E F3(Ne)5 E(x/n)-.2 E(vi)-.4 E F0(supports both the old and ne)2.5 E
-2.5(ws)-.25 G(yntax.)-2.5 E F2<ad74>108 566.4 Q F0
-(Start editing at the speci\214ed tag.)26.97 E(\(See)5 E F3(cta)2.5 E
-(gs)-.1 E F0(\(1\)\).).27 E F2<ad77>108 583.2 Q F0
-(Set the initial windo)23.08 E 2.5(ws)-.25 G
-(ize to the speci\214ed number of lines.)-2.5 E F2<ad76>108 600 Q F0
-(Start editing in vi mode, as if the command name w)25.3 E(as)-.1 E F3
-(vi)2.5 E F0(or)2.5 E F3(vie)2.5 E(w)-.15 E F0(.).31 E .382
-(Command input for)108 616.8 R F3 -.2(ex)2.882 G(/vi).2 E F0 .382
-(is read from the standard input.)2.882 F .383(In the)5.382 F F3(vi)
-2.883 E F0(interf)2.883 E .383(ace, it is an error if standard input)-.1
-F 1.156(is not a terminal.)108 628.8 R 1.156(In the)6.156 F F3 -.2(ex)
-3.656 G F0(interf)3.856 E 1.156
-(ace, if standard input is not a terminal,)-.1 F F3 -.2(ex)3.656 G F0
-1.156(will read commands from it)3.856 F(re)108 640.8 Q -.05(ga)-.15 G
-.03(rdless, ho).05 F(we)-.25 E -.15(ve)-.25 G .83 -.4(r, t).15 H .03
-(he session will be a batch mode session, e).4 F .031(xactly as if the)
--.15 F F2<ad73>2.531 E F0 .031(option had been speci\214ed.)2.531 F F3
-(Ex/vi)108 657.6 Q F0 -.15(ex)2.5 G
-(its 0 on success, and greater than 0 if an error occurs.).15 E F1 -.81
-(FA)72 674.4 S(ST ST).81 E(AR)-.81 E(TUP)-.36 E F0 .252(This section will tell you the minimum amount that you need to do simple editing tasks using)
-108 686.4 R F3(vi)2.752 E F0 5.252(.I).36 G 2.752(fy)-5.252 G(ou')-2.752
-E -.15(ve)-.5 G(ne)108 698.4 Q -.15(ve)-.25 G 3.078(ru).15 G .578
-(sed an)-3.078 F 3.078(ys)-.15 G .578(creen editor before, you')-3.078 F
-.578(re lik)-.5 F .578(ely to ha)-.1 F .878 -.15(ve p)-.2 H .578
-(roblems e).15 F -.15(ve)-.25 G 3.078(nw).15 G .578
-(ith this simple introduction.)-3.078 F(In)5.579 E
-(that case you should \214nd someone that already kno)108 710.4 Q(ws)
--.25 E F3(vi)2.5 E F0(and ha)2.5 E .3 -.15(ve t)-.2 H(hem w).15 E
-(alk you through this section.)-.1 E F3 -.74(Vi)108 727.2 S F0 .191
-(is a screen editor)3.431 F 5.191(.T)-.55 G .191(his means that it tak)
--5.191 F .191
-(es up almost the entire screen, displaying part of the \214le on each)
--.1 F(May 18, 1996)278.085 768 Q(1)201.085 E EP
-%%Page: 2 2
-%%BeginPageSetup
-BP
-%%EndPageSetup
-/F0 10/Times-Roman@0 SF 421.08(VI\(1\) VI\(1\))72 48 R .764
-(screen line, e)108 84 R .764(xcept for the last line of the screen.)
--.15 F .764(The last line of the screen is used for you to gi)5.764 F
-1.065 -.15(ve c)-.25 H(om-).15 E(mands to)108 96 Q/F1 10/Times-Italic@0
-SF(vi)2.5 E F0 2.5(,a).36 G(nd for)-2.5 E F1(vi)2.5 E F0(to gi)2.5 E .3
--.15(ve i)-.25 H(nformation to you.).15 E .527(The other f)108 112.8 R
-.527(act that you need to understand is that)-.1 F F1(vi)3.027 E F0 .527
-(is a modeful editor)3.027 F 3.026(,i)-.4 G .526
-(.e. you are either entering te)-3.026 F .526(xt or)-.15 F .564
-(you are e)108 124.8 R -.15(xe)-.15 G .564(cuting commands, and you ha)
-.15 F .864 -.15(ve t)-.2 H 3.064(ob).15 G 3.064(ei)-3.064 G 3.064(nt)
--3.064 G .564(he right mode to do one or the other)-3.064 F 5.564(.Y)
--.55 G .565(ou will be in)-6.664 F .741
-(command mode when you \214rst start editing a \214le.)108 136.8 R .74
-(There are commands that switch you into input mode.)5.741 F .222
-(There is only one k)108 148.8 R .522 -.15(ey t)-.1 H .222(hat tak).15 F
-.222(es you out of input mode, and that is the <escape> k)-.1 F -.15(ey)
--.1 G 5.223(.\()-.5 G -2.15 -.25(Ke y)-5.223 H .223(names are writ-)
-2.973 F .886(ten using less-than and greater)108 160.8 R .886
-(-than signs, e.g.)-.2 F .886(<escape> means the `)5.886 F(`escape')-.74
-E 3.385('k)-.74 G -.15(ey)-3.485 G 3.385(,u)-.5 G .885(sually labeled `)
--3.385 F(`esc')-.74 E(')-.74 E 1.924(on your terminal')108 172.8 R 4.424
-(sk)-.55 G -.15(ey)-4.524 G 4.424(board.\) If).15 F(you')4.424 E 1.924
-(re e)-.5 F -.15(ve)-.25 G 4.424(rc).15 G 1.924
-(onfused as to which mode you')-4.424 F 1.925(re in, k)-.5 F 1.925
-(eep entering the)-.1 F .653(<escape> k)108 184.8 R .953 -.15(ey u)-.1 H
-(ntil).15 E F1(vi)3.153 E F0 .653(beeps at you.)3.153 F(\(Generally)
-5.653 E(,)-.65 E F1(vi)3.153 E F0 .653
-(will beep at you if you try and do something that')3.153 F 3.153(sn)
--.55 G(ot)-3.153 E(allo)108 196.8 Q 2.5(wed. It)-.25 F
-(will also display error messages.\))2.5 E 3.246 -.8(To s)108 213.6 T
-1.647(tart editing a \214le, enter the command `).8 F 1.647
-(`vi \214le_name<carriage-return>')-.74 F 4.147('. The)-.74 F 1.647
-(command you should)4.147 F .426
-(enter as soon as you start editing is `)108 225.6 R .426(`:set v)-.74 F
-.426(erbose sho)-.15 F(wmode<carriage-return>')-.25 E 2.926('. This)-.74
-F .426(will mak)2.926 F 2.926(et)-.1 G .426(he editor)-2.926 F(gi)108
-237.6 Q .3 -.15(ve y)-.25 H(ou v).15 E(erbose error messages and display the current mode at the bottom of the screen.)
--.15 E(The commands to mo)108 254.4 Q .3 -.15(ve a)-.15 H
-(round the \214le are:).15 E/F2 10/Times-Bold@0 SF(h)108 271.2 Q F0(Mo)
-30.44 E .3 -.15(ve t)-.15 H(he cursor left one character).15 E(.)-.55 E
-F2(j)108 288 Q F0(Mo)32.67 E .3 -.15(ve t)-.15 H(he cursor do).15 E
-(wn one line.)-.25 E F2(k)108 304.8 Q F0(Mo)30.44 E .3 -.15(ve t)-.15 H
-(he cursor up one line.).15 E F2(l)108 321.6 Q F0(Mo)33.22 E .3 -.15
-(ve t)-.15 H(he cursor right one character).15 E(.)-.55 E F2(<cursor)108
-338.4 Q(-arr)-.37 E -.1(ow)-.18 G(s>).1 E F0(The cursor arro)144 350.4 Q
-2.5(wk)-.25 G -.15(ey)-2.6 G 2.5(ss).15 G(hould w)-2.5 E(ork, too.)-.1 E
-F2(/text<carriage-r)108 367.2 Q(etur)-.18 E(n>)-.15 E F0
-(Search for the string `)144 379.2 Q(`te)-.74 E(xt')-.15 E 2.5('i)-.74 G
-2.5(nt)-2.5 G(he \214le, and mo)-2.5 E .3 -.15(ve t)-.15 H
-(he cursor to its \214rst character).15 E(.)-.55 E
-(The commands to enter ne)108 396 Q 2.5(wt)-.25 G -.15(ex)-2.5 G 2.5(ta)
-.15 G(re:)-2.5 E F2(a)108 412.8 Q F0(Append ne)31 E 2.5(wt)-.25 G -.15
-(ex)-2.5 G(t,).15 E F1(after)2.5 E F0(the cursor)2.5 E(.)-.55 E F2(i)108
-429.6 Q F0(Insert ne)33.22 E 2.5(wt)-.25 G -.15(ex)-2.5 G(t,).15 E F1
-(befor)2.5 E(e)-.37 E F0(the cursor)2.5 E(.)-.55 E F2(o)108 446.4 Q F0
-(Open a ne)31 E 2.5(wl)-.25 G(ine belo)-2.5 E 2.5(wt)-.25 G
-(he line the cursor is on, and start entering te)-2.5 E(xt.)-.15 E F2(O)
-108 463.2 Q F0(Open a ne)28.22 E 2.5(wl)-.25 G(ine abo)-2.5 E .3 -.15
-(ve t)-.15 H(he line the cursor is on, and start entering te).15 E(xt.)
--.15 E F2(<escape>)108 480 Q F0 .191(Once you')144 492 R .491 -.15(ve e)
--.5 H .191(ntered input mode using the one of the).15 F F2(a)2.691 E F0
-(,)A F2(i)2.691 E F0(,)A F2(O)2.691 E F0(or)2.691 E F2(o)2.691 E F0 .191
-(commands, use)2.691 F F2(<escape>)2.691 E F0 .192(to quit)2.691 F
-(entering te)144 504 Q(xt and return to command mode.)-.15 E
-(The commands to cop)108 520.8 Q 2.5(yt)-.1 G -.15(ex)-2.5 G 2.5(ta).15
-G(re:)-2.5 E F2(yy)108 537.6 Q F0(Cop)26 E 2.5(yt)-.1 G
-(he line the cursor is on.)-2.5 E F2(p)108 554.4 Q F0
-(Append the copied line after the line the cursor is on.)30.44 E
-(The commands to delete te)108 571.2 Q(xt are:)-.15 E F2(dd)108 588 Q F0
-(Delete the line the cursor is on.)24.88 E F2(x)108 604.8 Q F0
-(Delete the character the cursor is on.)31 E
-(The commands to write the \214le are:)108 621.6 Q F2(:w<carriage-r)108
-638.4 Q(etur)-.18 E(n>)-.15 E F0 .117(Write the \214le back to the \214le with the name that you originally used as an ar)
-144 650.4 R .117(gument on the)-.18 F F1(vi)2.617 E F0(com-)2.617 E
-(mand line.)144 662.4 Q F2(:w \214le_name<carriage-r)108 679.2 Q(etur)
--.18 E(n>)-.15 E F0(Write the \214le back to the \214le with the name `)
-144 691.2 Q(`\214le_name')-.74 E('.)-.74 E
-(The commands to quit editing and e)108 708 Q(xit the editor are:)-.15 E
-(May 18, 1996)278.085 768 Q(2)201.085 E EP
-%%Page: 3 3
-%%BeginPageSetup
-BP
-%%EndPageSetup
-/F0 10/Times-Roman@0 SF 421.08(VI\(1\) VI\(1\))72 48 R/F1 10
-/Times-Bold@0 SF(:q<carriage-r)108 84 Q(etur)-.18 E(n>)-.15 E F0 .391
-(Quit editing and lea)144 96 R .691 -.15(ve v)-.2 H 2.891(i\().15 G .391
-(if you')-2.891 F .691 -.15(ve m)-.5 H .391(odi\214ed the \214le, b).15
-F .391(ut not sa)-.2 F -.15(ve)-.2 G 2.891(dy).15 G .391(our changes,)
--2.891 F/F2 10/Times-Italic@0 SF(vi)2.891 E F0 .392(will refuse to)2.891
-F(quit\).)144 108 Q F1(:q!<carriage-r)108 124.8 Q(etur)-.18 E(n>)-.15 E
-F0(Quit, discarding an)144 136.8 Q 2.5(ym)-.15 G
-(odi\214cations that you may ha)-2.5 E .3 -.15(ve m)-.2 H(ade.).15 E
-.354(One \214nal caution.)108 153.6 R .354(Unusual characters can tak)
-5.354 F 2.853(eu)-.1 G 2.853(pm)-2.853 G .353
-(ore than one column on the screen, and long lines can)-2.853 F(tak)108
-165.6 Q 2.775(eu)-.1 G 2.775(pm)-2.775 G .276
-(ore than a single screen line.)-2.775 F .276(The abo)5.276 F .576 -.15
-(ve c)-.15 H .276(ommands w).15 F .276(ork on `)-.1 F(`ph)-.74 E
-(ysical')-.05 E 2.776('c)-.74 G .276(haracters and lines, i.e.)-2.776 F
-(the)108 177.6 Q 3.463(ya)-.15 G -.25(ff)-3.463 G .962
-(ect the entire line no matter ho).25 F 3.462(wm)-.25 G(an)-3.462 E
-3.462(ys)-.15 G .962(creen lines it tak)-3.462 F .962
-(es up and the entire character no matter)-.1 F(ho)108 189.6 Q 2.5(wm)
--.25 G(an)-2.5 E 2.5(ys)-.15 G(creen columns it tak)-2.5 E(es up.)-.1 E
-/F3 9/Times-Bold@0 SF(VI COMMANDS)72 206.4 Q F0 1.075(The follo)108
-218.4 R 1.075(wing section describes the commands a)-.25 F -.25(va)-.2 G
-1.076(ilable in the command mode of the).25 F F2(vi)3.576 E F0(editor)
-3.576 E 6.076(.I)-.55 G 3.576(ne)-6.076 G(ach)-3.576 E(entry belo)108
-230.4 Q 1.3 -.65(w, t)-.25 H
-(he tag line is a usage synopsis for the command character).65 E(.)-.55
-E F1([count] <contr)108 252 Q(ol-A>)-.18 E F0(Search forw)144 264 Q(ard)
--.1 E F2(count)2.5 E F0(times for the current w)2.5 E(ord.)-.1 E F1
-([count] <contr)108 280.8 Q(ol-B>)-.18 E F0 -.15(Pa)144 292.8 S
-(ge backw).15 E(ards)-.1 E F2(count)2.5 E F0(screens.)2.5 E F1
-([count] <contr)108 309.6 Q(ol-D>)-.18 E F0(Scroll forw)144 321.6 Q(ard)
--.1 E F2(count)2.5 E F0(lines.)2.5 E F1([count] <contr)108 338.4 Q
-(ol-E>)-.18 E F0(Scroll forw)144 350.4 Q(ard)-.1 E F2(count)2.5 E F0
-(lines, lea)2.5 E(ving the current line and column as is, if possible.)
--.2 E F1([count] <contr)108 367.2 Q(ol-F>)-.18 E F0 -.15(Pa)144 379.2 S
-(ge forw).15 E(ard)-.1 E F2(count)2.5 E F0(screens.)2.5 E F1(<contr)108
-396 Q(ol-G>)-.18 E F0(Display the \214le information.)144 408 Q F1
-(<contr)108 424.8 Q(ol-H>)-.18 E([count] h)108 441.6 Q F0(Mo)144 453.6 Q
-.3 -.15(ve t)-.15 H(he cursor back).15 E F2(count)2.5 E F0
-(characters in the current line.)2.5 E F1([count] <contr)108 470.4 Q
-(ol-J>)-.18 E([count] <contr)108 487.2 Q(ol-N>)-.18 E([count] j)108 504
-Q F0(Mo)144 516 Q .3 -.15(ve t)-.15 H(he cursor do).15 E(wn)-.25 E F2
-(count)2.5 E F0(lines without changing the current column.)2.5 E F1
-(<contr)108 532.8 Q(ol-L>)-.18 E(<contr)108 549.6 Q(ol-R>)-.18 E F0
-(Repaint the screen.)144 561.6 Q F1([count] <contr)108 578.4 Q(ol-M>)
--.18 E([count] +)108 595.2 Q F0(Mo)144 607.2 Q .3 -.15(ve t)-.15 H
-(he cursor do).15 E(wn)-.25 E F2(count)2.5 E F0
-(lines to the \214rst nonblank character of that line.)2.5 E F1
-([count] <contr)108 624 Q(ol-P>)-.18 E([count] k)108 640.8 Q F0(Mo)144
-652.8 Q .3 -.15(ve t)-.15 H(he cursor up).15 E F2(count)2.5 E F0
-(lines, without changing the current column.)2.5 E F1(<contr)108 669.6 Q
-(ol-T>)-.18 E F0(Return to the most recent tag conte)144 681.6 Q(xt.)
--.15 E F1(<contr)108 698.4 Q(ol-U>)-.18 E F0(Scroll backw)144 710.4 Q
-(ards)-.1 E F2(count)2.5 E F0(lines.)2.5 E(May 18, 1996)278.085 768 Q(3)
-201.085 E EP
-%%Page: 4 4
-%%BeginPageSetup
-BP
-%%EndPageSetup
-/F0 10/Times-Roman@0 SF 421.08(VI\(1\) VI\(1\))72 48 R/F1 10
-/Times-Bold@0 SF(<contr)108 84 Q(ol-W>)-.18 E F0 .526(Switch to the ne)
-144 96 R .526(xt lo)-.15 F .525(wer screen in the windo)-.25 F 1.825
--.65(w, o)-.25 H 1.325 -.4(r, t).65 H 3.025(ot).4 G .525
-(he \214rst screen if there are no lo)-3.025 F .525(wer screens)-.25 F
-(in the windo)144 108 Q -.65(w.)-.25 G F1(<contr)108 124.8 Q(ol-Y>)-.18
-E F0(Scroll backw)144 136.8 Q(ards)-.1 E/F2 10/Times-Italic@0 SF(count)
-2.5 E F0(lines, lea)2.5 E
-(ving the current line and column as is, if possible.)-.2 E F1(<contr)
-108 153.6 Q(ol-Z>)-.18 E F0(Suspend the current editor session.)144
-165.6 Q F1(<escape>)108 182.4 Q F0(Ex)144 194.4 Q(ecute)-.15 E F2 -.2
-(ex)2.5 G F0(commands or cancel partial commands.)2.7 E F1(<contr)108
-211.2 Q(ol-]>)-.18 E F0(Push a tag reference onto the tag stack.)144
-223.2 Q F1(<contr)108 240 Q(ol-^>)-.18 E F0
-(Switch to the most recently edited \214le.)144 252 Q F1
-([count] <space>)108 268.8 Q([count] l)108 285.6 Q F0(Mo)144 297.6 Q .3
--.15(ve t)-.15 H(he cursor forw).15 E(ard)-.1 E F2(count)2.5 E F0
-(characters without changing the current line.)2.5 E F1
-([count] ! motion shell-ar)108 314.4 Q(gument\(s\))-.1 E F0(Replace te)
-144 326.4 Q(xt with results from a shell command.)-.15 E F1
-([count] # #|+|-)108 343.2 Q F0
-(Increment or decrement the cursor number)144 355.2 Q(.)-.55 E F1
-([count] $)108 372 Q F0(Mo)144 384 Q .3 -.15(ve t)-.15 H
-(he cursor to the end of a line.).15 E F1(%)108 400.8 Q F0(Mo)26 E .3
--.15(ve t)-.15 H 2.5(ot).15 G(he matching character)-2.5 E(.)-.55 E F1
-(&)108 417.6 Q F0(Repeat the pre)27.67 E
-(vious substitution command on the current line.)-.25 E F1('<character>)
-108 434.4 Q(`<character>)108 451.2 Q F0(Return to a conte)144 463.2 Q
-(xt mark)-.15 E(ed by the character)-.1 E F2(<c)2.5 E(har)-.15 E(acter>)
--.15 E F0(.)A F1([count] \()108 480 Q F0(Back up)144 492 Q F2(count)2.5
-E F0(sentences.)2.5 E F1([count] \))108 508.8 Q F0(Mo)144 520.8 Q .3
--.15(ve f)-.15 H(orw).15 E(ard)-.1 E F2(count)2.5 E F0(sentences.)2.5 E
-F1([count] ,)108 537.6 Q F0(Re)144 549.6 Q -.15(ve)-.25 G
-(rse \214nd character).15 E F2(count)2.5 E F0(times.)2.5 E F1([count] -)
-108 566.4 Q F0(Mo)144 578.4 Q .3 -.15(ve t)-.15 H 2.5<6f8c>.15 G
-(rst nonblank of the pre)-2.5 E(vious line,)-.25 E F2(count)2.5 E F0
-(times.)2.5 E F1([count] .)108 595.2 Q F0(Repeat the last)144 607.2 Q F2
-(vi)2.5 E F0(command that modi\214ed te)2.5 E(xt.)-.15 E F1
-(/RE<carriage-r)108 624 Q(etur)-.18 E(n>)-.15 E
-(/RE/ [offset]<carriage-r)108 640.8 Q(etur)-.18 E(n>)-.15 E
-(?RE<carriage-r)108 657.6 Q(etur)-.18 E(n>)-.15 E
-(?RE? [offset]<carriage-r)108 674.4 Q(etur)-.18 E(n>)-.15 E(N)108 691.2
-Q(n)108 708 Q F0(Search forw)30.44 E(ard or backw)-.1 E(ard for a re)-.1
-E(gular e)-.15 E(xpression.)-.15 E(May 18, 1996)278.085 768 Q(4)201.085
-E EP
-%%Page: 5 5
-%%BeginPageSetup
-BP
-%%EndPageSetup
-/F0 10/Times-Roman@0 SF 421.08(VI\(1\) VI\(1\))72 48 R/F1 10
-/Times-Bold@0 SF(0)108 84 Q F0(Mo)31 E .3 -.15(ve t)-.15 H 2.5(ot).15 G
-(he \214rst character in the current line.)-2.5 E F1(:)108 100.8 Q F0
-(Ex)32.67 E(ecute an e)-.15 E 2.5(xc)-.15 G(ommand.)-2.5 E F1([count] ;)
-108 117.6 Q F0(Repeat the last character \214nd)144 129.6 Q/F2 10
-/Times-Italic@0 SF(count)2.5 E F0(times.)2.5 E F1([count] < motion)108
-146.4 Q([count] > motion)108 163.2 Q F0(Shift lines left or right.)144
-175.2 Q F1 2.5(@b)108 192 S(uffer)-2.7 E F0(Ex)144 204 Q
-(ecute a named b)-.15 E(uf)-.2 E(fer)-.25 E(.)-.55 E F1([count] A)108
-220.8 Q F0(Enter input mode, appending the te)144 232.8 Q
-(xt after the end of the line.)-.15 E F1([count] B)108 249.6 Q F0(Mo)144
-261.6 Q .3 -.15(ve b)-.15 H(ackw).15 E(ards)-.1 E F2(count)2.5 E F0
-(bigw)2.5 E(ords.)-.1 E F1([b)108 278.4 Q(uffer] [count] C)-.2 E F0
-(Change te)144 290.4 Q(xt from the current position to the end-of-line.)
--.15 E F1([b)108 307.2 Q(uffer] D)-.2 E F0(Delete te)144 319.2 Q
-(xt from the current position to the end-of-line.)-.15 E F1([count] E)
-108 336 Q F0(Mo)144 348 Q .3 -.15(ve f)-.15 H(orw).15 E(ard)-.1 E F2
-(count)2.5 E F0(end-of-bigw)2.5 E(ords.)-.1 E F1([count] F <character>)
-108 364.8 Q F0(Search)144 376.8 Q F2(count)2.5 E F0(times backw)2.5 E
-(ard through the current line for)-.1 E F2(<c)2.5 E(har)-.15 E(acter>)
--.15 E F0(.)A F1([count] G)108 393.6 Q F0(Mo)144 405.6 Q .3 -.15(ve t)
--.15 H 2.5(ol).15 G(ine)-2.5 E F2(count)2.5 E F0 2.5(,o).68 G 2.5(rt)
--2.5 G(he last line of the \214le if)-2.5 E F2(count)2.5 E F0
-(not speci\214ed.)2.5 E F1([count] H)108 422.4 Q F0(Mo)144 434.4 Q .3
--.15(ve t)-.15 H 2.5(ot).15 G(he screen line)-2.5 E F2(count - 1)2.5 E
-F0(lines belo)2.5 E 2.5(wt)-.25 G(he top of the screen.)-2.5 E F1
-([count] I)108 451.2 Q F0(Enter input mode, inserting the te)144 463.2 Q
-(xt at the be)-.15 E(ginning of the line.)-.15 E F1([count] J)108 480 Q
-F0(Join lines.)144 492 Q F1([count] L)108 508.8 Q F0(Mo)144 520.8 Q .3
--.15(ve t)-.15 H 2.5(ot).15 G(he screen line)-2.5 E F2(count - 1)2.5 E
-F0(lines abo)2.5 E .3 -.15(ve t)-.15 H(he bottom of the screen.).15 E F1
-(M)110.5 537.6 Q F0(Mo)24.06 E .3 -.15(ve t)-.15 H 2.5(ot).15 G
-(he screen line in the middle of the screen.)-2.5 E F1([count] O)108
-554.4 Q F0(Enter input mode, appending te)144 566.4 Q(xt in a ne)-.15 E
-2.5(wl)-.25 G(ine abo)-2.5 E .3 -.15(ve t)-.15 H(he current line.).15 E
-F1([b)108 583.2 Q(uffer] P)-.2 E F0(Insert te)144 595.2 Q(xt from a b)
--.15 E(uf)-.2 E(fer)-.25 E(.)-.55 E F1(Q)108 612 Q F0(Exit)28.22 E F2
-(vi)2.5 E F0(\(or visual\) mode and switch to)2.5 E F2 -.2(ex)2.5 G F0
-(mode.)2.7 E F1([count] R)108 628.8 Q F0
-(Enter input mode, replacing the characters in the current line.)144
-640.8 Q F1([b)108 657.6 Q(uffer] [count] S)-.2 E F0(Substitute)144 669.6
-Q F2(count)2.5 E F0(lines.)2.5 E F1([count] T <character>)108 686.4 Q F0
-.025(Search backw)144 698.4 R(ards,)-.1 E F2(count)2.525 E F0 .025
-(times, through the current line for the character)2.525 F F2(after)
-2.525 E F0 .025(the speci\214ed)2.525 F F2(<c)2.525 E(har)-.15 E(-)-.2 E
-(acter>)144 710.4 Q F0(.)A(May 18, 1996)278.085 768 Q(5)201.085 E EP
-%%Page: 6 6
-%%BeginPageSetup
-BP
-%%EndPageSetup
-/F0 10/Times-Roman@0 SF 421.08(VI\(1\) VI\(1\))72 48 R/F1 10
-/Times-Bold@0 SF(U)108 84 Q F0
-(Restore the current line to its state before the cursor last mo)28.78 E
--.15(ve)-.15 G 2.5(dt).15 G 2.5(oi)-2.5 G(t.)-2.5 E F1([count] W)108
-100.8 Q F0(Mo)144 112.8 Q .3 -.15(ve f)-.15 H(orw).15 E(ard)-.1 E/F2 10
-/Times-Italic@0 SF(count)2.5 E F0(bigw)2.5 E(ords.)-.1 E F1([b)108 129.6
-Q(uffer] [count] X)-.2 E F0(Delete)144 141.6 Q F2(count)2.5 E F0
-(characters before the cursor)2.5 E(.)-.55 E F1([b)108 158.4 Q
-(uffer] [count] Y)-.2 E F0(Cop)144 170.4 Q 2.5(y\()-.1 G(or `)-2.5 E
-(`yank')-.74 E('\))-.74 E F2(count)2.5 E F0
-(lines into the speci\214ed b)2.5 E(uf)-.2 E(fer)-.25 E(.)-.55 E F1(ZZ)
-108 187.2 Q F0(Write the \214le and e)22.66 E(xit)-.15 E F2(vi)2.5 E F0
-(.).36 E F1([count] [[)108 204 Q F0(Back up)144 216 Q F2(count)2.5 E F0
-(section boundaries.)2.5 E F1([count] ]])108 232.8 Q F0(Mo)144 244.8 Q
-.3 -.15(ve f)-.15 H(orw).15 E(ard)-.1 E F2(count)2.5 E F0
-(section boundaries.)2.5 E F1(^)108 261.6 Q F0(Mo)32.67 E .3 -.15(ve t)
--.15 H 2.5<6f8c>.15 G(rst nonblank character on the current line.)-2.5 E
-F1([count] _)108 278.4 Q F0(Mo)144 290.4 Q .3 -.15(ve d)-.15 H -.25(ow)
-.15 G(n).25 E F2(count - 1)2.5 E F0
-(lines, to the \214rst nonblank character)2.5 E(.)-.55 E F1([count] a)
-108 307.2 Q F0(Enter input mode, appending the te)144 319.2 Q
-(xt after the cursor)-.15 E(.)-.55 E F1([count] b)108 336 Q F0(Mo)144
-348 Q .3 -.15(ve b)-.15 H(ackw).15 E(ards)-.1 E F2(count)2.5 E F0 -.1
-(wo)2.5 G(rds.).1 E F1([b)108 364.8 Q(uffer] [count] c motion)-.2 E F0
-(Change a re)144 376.8 Q(gion of te)-.15 E(xt.)-.15 E F1([b)108 393.6 Q
-(uffer] [count] d motion)-.2 E F0(Delete a re)144 405.6 Q(gion of te)
--.15 E(xt.)-.15 E F1([count] e)108 422.4 Q F0(Mo)144 434.4 Q .3 -.15
-(ve f)-.15 H(orw).15 E(ard)-.1 E F2(count)2.5 E F0(end-of-w)2.5 E(ords.)
--.1 E F1([count] f<character>)108 451.2 Q F0(Search forw)144 463.2 Q
-(ard,)-.1 E F2(count)2.5 E F0
-(times, through the rest of the current line for)2.5 E F2(<c)2.5 E(har)
--.15 E(acter>)-.15 E F0(.)A F1([count] i)108 480 Q F0
-(Enter input mode, inserting the te)144 492 Q(xt before the cursor)-.15
-E(.)-.55 E F1 2.5(m<)108 508.8 S(character>)-2.5 E F0(Sa)144 520.8 Q .3
--.15(ve t)-.2 H(he current conte).15 E(xt \(line and column\) as)-.15 E
-F2(<c)2.5 E(har)-.15 E(acter>)-.15 E F0(.)A F1([count] o)108 537.6 Q F0
-(Enter input mode, appending te)144 549.6 Q(xt in a ne)-.15 E 2.5(wl)
--.25 G(ine under the current line.)-2.5 E F1([b)108 566.4 Q(uffer] p)-.2
-E F0(Append te)144 578.4 Q(xt from a b)-.15 E(uf)-.2 E(fer)-.25 E(.)-.55
-E F1([count] r <character>)108 595.2 Q F0(Replace)144 607.2 Q F2(count)
-2.5 E F0(characters.)2.5 E F1([b)108 624 Q(uffer] [count] s)-.2 E F0
-(Substitute)144 636 Q F2(count)2.5 E F0
-(characters in the current line starting with the current character)2.5
-E(.)-.55 E F1([count] t <character>)108 652.8 Q F0 .419(Search forw)144
-664.8 R(ard,)-.1 E F2(count)2.919 E F0 .418
-(times, through the current line for the character immediately)2.919 F
-F2(befor)2.918 E 2.918(e<)-.37 G -.15(ch)-2.918 G(ar).15 E(-)-.2 E
-(acter>)144 676.8 Q F0(.)A F1(u)108 693.6 Q F0
-(Undo the last change made to the \214le.)30.44 E(May 18, 1996)278.085
-768 Q(6)201.085 E EP
-%%Page: 7 7
-%%BeginPageSetup
-BP
-%%EndPageSetup
-/F0 10/Times-Roman@0 SF 421.08(VI\(1\) VI\(1\))72 48 R/F1 10
-/Times-Bold@0 SF([count] w)108 84 Q F0(Mo)144 96 Q .3 -.15(ve f)-.15 H
-(orw).15 E(ard)-.1 E/F2 10/Times-Italic@0 SF(count)2.5 E F0 -.1(wo)2.5 G
-(rds.).1 E F1([b)108 112.8 Q(uffer] [count] x)-.2 E F0(Delete)144 124.8
-Q F2(count)2.5 E F0(characters.)2.5 E F1([b)108 141.6 Q
-(uffer] [count] y motion)-.2 E F0(Cop)144 153.6 Q 2.5(y\()-.1 G(or `)
--2.5 E(`yank')-.74 E('\) a te)-.74 E(xt re)-.15 E
-(gion speci\214ed by the)-.15 E F2(count)2.5 E F0(and motion into a b)
-2.5 E(uf)-.2 E(fer)-.25 E(.)-.55 E F1
-([count1] z [count2] -|.|+|^|<carriage-r)108 170.4 Q(etur)-.18 E(n>)-.15
-E F0(Redra)144 182.4 Q 1.3 -.65(w, o)-.15 H
-(ptionally repositioning and resizing the screen.).65 E F1([count] {)108
-199.2 Q F0(Mo)144 211.2 Q .3 -.15(ve b)-.15 H(ackw).15 E(ard)-.1 E F2
-(count)2.5 E F0(paragraphs.)2.5 E F1([count] |)108 228 Q F0(Mo)144 240 Q
-.3 -.15(ve t)-.15 H 2.5(oas).15 G(peci\214c)-2.5 E F2(column)2.5 E F0
-(position on the current line.)2.5 E F1([count] })108 256.8 Q F0(Mo)144
-268.8 Q .3 -.15(ve f)-.15 H(orw).15 E(ard)-.1 E F2(count)2.5 E F0
-(paragraphs.)2.5 E F1([count] ~)108 285.6 Q F0(Re)144 297.6 Q -.15(ve)
--.25 G(rse the case of the ne).15 E(xt)-.15 E F2(count)2.5 E F0
-(character\(s\).)2.5 E F1([count] ~ motion)108 314.4 Q F0(Re)144 326.4 Q
--.15(ve)-.25 G(rse the case of the characters in a te).15 E(xt re)-.15 E
-(gion speci\214ed by the)-.15 E F2(count)2.5 E F0(and)2.5 E F2(motion)
-2.5 E F0(.).24 E F1(<interrupt>)108 343.2 Q F0
-(Interrupt the current operation.)144 355.2 Q/F3 9/Times-Bold@0 SF
-(VI TEXT INPUT COMMANDS)72 372 Q F0(The follo)108 384 Q
-(wing section describes the commands a)-.25 E -.25(va)-.2 G
-(ilable in the te).25 E(xt input mode of the)-.15 E F2(vi)2.5 E F0
-(editor)2.5 E(.)-.55 E F1(<nul>)108 405.6 Q F0(Replay the pre)10.7 E
-(vious input.)-.25 E F1(<contr)108 422.4 Q(ol-D>)-.18 E F0
-(Erase to the pre)144 434.4 Q(vious)-.25 E F1(shiftwidth)2.5 E F0
-(column boundary)2.5 E(.)-.65 E F1(^<contr)108 451.2 Q(ol-D>)-.18 E F0
-(Erase all of the autoindent characters, and reset the autoindent le)144
-463.2 Q -.15(ve)-.25 G(l.).15 E F1(0<contr)108 480 Q(ol-D>)-.18 E F0
-(Erase all of the autoindent characters.)144 492 Q F1(<contr)108 508.8 Q
-(ol-T>)-.18 E F0 1.121(Insert suf)144 520.8 R(\214cient)-.25 E F2(<tab>)
-3.621 E F0(and)3.621 E F2(<space>)3.621 E F0 1.121(characters to mo)
-3.621 F 1.422 -.15(ve f)-.15 H(orw).15 E 1.122(ard to the ne)-.1 F(xt)
--.15 E F1(shiftwidth)3.622 E F0(column)3.622 E(boundary)144 532.8 Q(.)
--.65 E F1(<erase>)108 549.6 Q(<contr)108 566.4 Q(ol-H>)-.18 E F0
-(Erase the last character)144 578.4 Q(.)-.55 E F1(<literal next>)108
-595.2 Q F0(Quote the ne)144 607.2 Q(xt character)-.15 E(.)-.55 E F1
-(<escape>)108 624 Q F0(Resolv)144 636 Q 2.5(ea)-.15 G(ll te)-2.5 E
-(xt input into the \214le, and return to command mode.)-.15 E F1
-(<line erase>)108 652.8 Q F0(Erase the current line.)144 664.8 Q F1
-(<contr)108 681.6 Q(ol-W>)-.18 E(<w)108 698.4 Q(ord erase>)-.1 E F0 .27
-(Erase the last w)144 710.4 R 2.77(ord. The)-.1 F .27(de\214nition of w)
-2.77 F .27(ord is dependent on the)-.1 F F1(altwerase)2.77 E F0(and)2.77
-E F1(ttywerase)2.77 E F0(options.)2.77 E(May 18, 1996)278.085 768 Q(7)
-201.085 E EP
-%%Page: 8 8
-%%BeginPageSetup
-BP
-%%EndPageSetup
-/F0 10/Times-Roman@0 SF 421.08(VI\(1\) VI\(1\))72 48 R/F1 10
-/Times-Bold@0 SF(<contr)108 84 Q(ol-X>[0-9A-F)-.18 E(a-f]+)-.25 E F0
-(Insert a character with the speci\214ed he)144 96 Q(xadecimal v)-.15 E
-(alue into the te)-.25 E(xt.)-.15 E F1(<interrupt>)108 112.8 Q F0
-(Interrupt te)144 124.8 Q(xt input mode, returning to command mode.)-.15
-E/F2 9/Times-Bold@0 SF(EX COMMANDS)72 141.6 Q F0 .014(The follo)108
-153.6 R .014(wing section describes the commands a)-.25 F -.25(va)-.2 G
-.014(ilable in the).25 F/F3 10/Times-Italic@0 SF -.2(ex)2.514 G F0
-(editor)2.714 E 5.015(.I)-.55 G 2.515(ne)-5.015 G .015(ach entry belo)
--2.515 F 1.315 -.65(w, t)-.25 H .015(he tag line is).65 F 2.5(au)108
-165.6 S(sage synopsis for the command.)-2.5 E F1(<end-of-\214le>)108
-187.2 Q F0(Scroll the screen.)144 199.2 Q F1 2.5(!a)108 216 S -.1(rg)
--2.5 G(ument\(s\)).1 E([range]! ar)108 232.8 Q(gument\(s\))-.1 E F0(Ex)
-144 244.8 Q
-(ecute a shell command, or \214lter lines through a shell command.)-.15
-E F1(")108 261.6 Q F0 2.5(Ac)30.45 G(omment.)-2.5 E F1
-([range] nu[mber] [count] [\215ags])108 278.4 Q
-([range] # [count] [\215ags])108 295.2 Q F0
-(Display the selected lines, each preceded with its line number)144
-307.2 Q(.)-.55 E F1 2.5(@b)108 324 S(uffer)-2.7 E 2.5(*b)108 340.8 S
-(uffer)-2.7 E F0(Ex)144 352.8 Q(ecute a b)-.15 E(uf)-.2 E(fer)-.25 E(.)
--.55 E F1([line] a[ppend][!])108 369.6 Q F0(The input te)144 381.6 Q
-(xt is appended after the speci\214ed line.)-.15 E F1
-([range] c[hange][!] [count])108 398.4 Q F0(The input te)144 410.4 Q
-(xt replaces the speci\214ed range.)-.15 E F1
-(cs[cope] add | \214nd | help | kill | r)108 427.2 Q(eset)-.18 E F0(Ex)
-144 439.2 Q(ecute a Cscope command.)-.15 E F1([range] d[elete] [b)108
-456 Q(uffer] [count] [\215ags])-.2 E F0
-(Delete the lines from the \214le.)144 468 Q F1
-(di[splay] b[uffers] | c[onnections] | s[cr)108 484.8 Q(eens] | t[ags])
--.18 E F0(Display b)144 496.8 Q(uf)-.2 E
-(fers, Cscope connections, screens or tags.)-.25 E F1
-(e[dit][!] [+cmd] [\214le])108 513.6 Q(ex[!] [+cmd] [\214le])108 530.4 Q
-F0(Edit a dif)144 542.4 Q(ferent \214le.)-.25 E F1(exu[sage] [command])
-108 559.2 Q F0(Display usage for an)144 571.2 Q F3 -.2(ex)2.5 G F0
-(command.)2.7 E F1(f[ile] [\214le])108 588 Q F0
-(Display and optionally change the \214le name.)144 600 Q F1(fg [name])
-108 616.8 Q F3 -.74(Vi)144 628.8 S F0(mode only)3.24 E 5(.F)-.65 G(ore)
--5.15 E(ground the speci\214ed screen.)-.15 E F1
-([range] g[lobal] /patter)108 645.6 Q(n/ [commands])-.15 E
-([range] v /patter)108 662.4 Q(n/ [commands])-.15 E F0
-(Apply commands to lines matching \(or not matching\) a pattern.)144
-674.4 Q F1(he[lp])108 691.2 Q F0(Display a help message.)11 E
-(May 18, 1996)278.085 768 Q(8)201.085 E EP
-%%Page: 9 9
-%%BeginPageSetup
-BP
-%%EndPageSetup
-/F0 10/Times-Roman@0 SF 421.08(VI\(1\) VI\(1\))72 48 R/F1 10
-/Times-Bold@0 SF([line] i[nsert][!])108 84 Q F0(The input te)144 96 Q
-(xt is inserted before the speci\214ed line.)-.15 E F1
-([range] j[oin][!] [count] [\215ags])108 112.8 Q F0(Join lines of te)144
-124.8 Q(xt together)-.15 E(.)-.55 E F1([range] l[ist] [count] [\215ags])
-108 141.6 Q F0(Display the lines unambiguously)144 153.6 Q(.)-.65 E F1
-(map[!] [lhs rhs])108 170.4 Q F0(De\214ne or display maps \(for)144
-182.4 Q/F2 10/Times-Italic@0 SF(vi)2.5 E F0(only\).)2.5 E F1
-([line] ma[rk] <character>)108 199.2 Q([line] k <character>)108 216 Q F0
-(Mark the line with the mark)144 228 Q F2(<c)2.5 E(har)-.15 E(acter>)
--.15 E F0(.)A F1([range] m[o)108 244.8 Q -.1(ve)-.1 G 2.5(]l).1 G(ine)
--2.5 E F0(Mo)144 256.8 Q .3 -.15(ve t)-.15 H
-(he speci\214ed lines after the tar).15 E(get line.)-.18 E F1(mk[exr)108
-273.6 Q(c][!] \214le)-.18 E F0(Write the abbre)144 285.6 Q
-(viations, editor options and maps to the speci\214ed \214le.)-.25 E F1
-(n[ext][!] [\214le ...])108 302.4 Q F0(Edit the ne)144 314.4 Q
-(xt \214le from the ar)-.15 E(gument list.)-.18 E F1
-([line] o[pen] /patter)108 331.2 Q(n/ [\215ags])-.15 E F0
-(Enter open mode.)144 343.2 Q F1(pr)108 360 Q(e[ser)-.18 E -.1(ve)-.1 G
-(]).1 E F0(Sa)144 372 Q .3 -.15(ve t)-.2 H
-(he \214le in a form that can later be reco).15 E -.15(ve)-.15 G
-(red using the).15 E F2 -.2(ex)2.5 G F1<ad72>2.7 E F0(option.)2.5 E F1
-(pr)108 388.8 Q -.15(ev)-.18 G([ious][!]).15 E F0(Edit the pre)144 400.8
-Q(vious \214le from the ar)-.25 E(gument list.)-.18 E F1
-([range] p[rint] [count] [\215ags])108 417.6 Q F0
-(Display the speci\214ed lines.)144 429.6 Q F1([line] pu[t] [b)108 446.4
-Q(uffer])-.2 E F0(Append b)144 458.4 Q(uf)-.2 E
-(fer contents to the current line.)-.25 E F1(q[uit][!])108 475.2 Q F0
-(End the editing session.)144 487.2 Q F1([line] r[ead][!] [\214le])108
-504 Q F0(Read a \214le.)144 516 Q F1 -.18(re)108 532.8 S(c[o).18 E -.1
-(ve)-.1 G(r] \214le).1 E F0(Reco)144 544.8 Q -.15(ve)-.15 G(r).15 E F2
-(\214le)2.5 E F0(if it w)2.5 E(as pre)-.1 E(viously sa)-.25 E -.15(ve)
--.2 G(d.).15 E F1 -.18(re)108 561.6 S(s[ize] [+|-]size).18 E F2 -.74(Vi)
-144 573.6 S F0(mode only)3.24 E 5(.G)-.65 G(ro)-5 E 2.5(wo)-.25 G 2.5
-(rs)-2.5 G(hrink the current screen.)-2.5 E F1 -.18(re)108 590.4 S
-(w[ind][!]).18 E F0(Re)144 602.4 Q(wind the ar)-.25 E(gument list.)-.18
-E F1(se[t] [option[=[v)108 619.2 Q
-(alue]] ...] [nooption ...] [option? ...] [all])-.1 E F0
-(Display or set editor options.)144 631.2 Q F1(sh[ell])108 648 Q F0
-(Run a shell program.)9.89 E F1(so[ur)108 664.8 Q(ce] \214le)-.18 E F0
-(Read and e)144 676.8 Q -.15(xe)-.15 G(cute).15 E F2 -.2(ex)2.5 G F0
-(commands from a \214le.)2.7 E F1([range] s[ubstitute] [/patter)108
-693.6 Q(n/r)-.15 E(eplace/] [options] [count] [\215ags])-.18 E F0
-(May 18, 1996)278.085 768 Q(9)201.085 E EP
-%%Page: 10 10
-%%BeginPageSetup
-BP
-%%EndPageSetup
-/F0 10/Times-Roman@0 SF 421.08(VI\(1\) VI\(1\))72 48 R/F1 10
-/Times-Bold@0 SF([range] & [options] [count] [\215ags])108 84 Q
-([range] ~ [options] [count] [\215ags])108 100.8 Q F0(Mak)144 112.8 Q
-2.5(es)-.1 G(ubstitutions.)-2.5 E F1(su[spend][!])108 129.6 Q(st[op][!])
-108 146.4 Q(<suspend>)108 163.2 Q F0(Suspend the edit session.)144 175.2
-Q F1(ta[g][!] tagstring)108 192 Q F0
-(Edit the \214le containing the speci\214ed tag.)144 204 Q F1
-(tagn[ext][!])108 220.8 Q F0(Edit the \214le containing the ne)144 232.8
-Q(xt conte)-.15 E(xt for the current tag.)-.15 E F1
-(tagp[op][!] [\214le | number])108 249.6 Q F0
-(Pop to the speci\214ed tag in the tags stack.)144 261.6 Q F1(tagp[r)108
-278.4 Q -.15(ev)-.18 G(][!]).15 E F0(Edit the \214le containing the pre)
-144 290.4 Q(vious conte)-.25 E(xt for the current tag.)-.15 E F1
-(unm[ap][!] lhs)108 307.2 Q F0(Unmap a mapped string.)144 319.2 Q F1 -.1
-(ve)108 336 S([rsion]).1 E F0(Display the v)144 348 Q(ersion of the)-.15
-E/F2 10/Times-Italic@0 SF -.2(ex)2.5 G(/vi).2 E F0(editor)2.5 E(.)-.55 E
-F1([line] vi[sual] [type] [count] [\215ags])108 364.8 Q F2(Ex)144 376.8
-Q F0(mode only)2.5 E 5(.E)-.65 G(nter)-5 E F2(vi)2.5 E F0(.).36 E F1
-(vi[sual][!] [+cmd] [\214le])108 393.6 Q F2 -.74(Vi)144 405.6 S F0
-(mode only)3.24 E 5(.E)-.65 G(dit a ne)-5 E 2.5<778c>-.25 G(le.)-2.5 E
-F1(viu[sage] [command])108 422.4 Q F0(Display usage for a)144 434.4 Q F2
-(vi)2.5 E F0(command.)2.5 E F1([range] w[rite][!] [>>] [\214le])108
-451.2 Q([range] w[rite] [!] [\214le])108 468 Q
-([range] wn[!] [>>] [\214le])108 484.8 Q([range] wq[!] [>>] [\214le])108
-501.6 Q F0(Write the \214le.)144 513.6 Q F1([range] x[it][!] [\214le])
-108 530.4 Q F0(Write the \214le if it has been modi\214ed.)144 542.4 Q
-F1([range] ya[nk] [b)108 559.2 Q(uffer] [count])-.2 E F0(Cop)144 571.2 Q
-2.5(yt)-.1 G(he speci\214ed lines to a b)-2.5 E(uf)-.2 E(fer)-.25 E(.)
--.55 E F1([line] z [type] [count] [\215ags])108 588 Q F0
-(Adjust the windo)144 600 Q -.65(w.)-.25 G/F3 9/Times-Bold@0 SF
-(SET OPTIONS)72 616.8 Q F0 .203(There are a lar)108 628.8 R .203(ge number of options that may be set \(or unset\) to change the editor')
--.18 F 2.702(sb)-.55 G(eha)-2.702 E(vior)-.2 E 5.202(.T)-.55 G .202
-(his section)-5.202 F(describes the options, their abbre)108 640.8 Q
-(viations and their def)-.25 E(ault v)-.1 E(alues.)-.25 E .541
-(In each entry belo)108 657.6 R 1.841 -.65(w, t)-.25 H .541
-(he \214rst part of the tag line is the full name of the option, follo)
-.65 F .541(wed by an)-.25 F 3.041(ye)-.15 G(qui)-3.041 E -.25(va)-.25 G
-(lent).25 E(abbre)108 669.6 Q 4.313(viations. The)-.25 F 1.813
-(part in square brack)4.313 F 1.813(ets is the def)-.1 F 1.813(ault v)
--.1 F 1.813(alue of the option.)-.25 F 1.813(Most of the options are)
-6.813 F(boolean, i.e. the)108 681.6 Q 2.5(ya)-.15 G(re either on or of)
--2.5 E(f, and do not ha)-.25 E .3 -.15(ve a)-.2 H 2.5(na).15 G
-(ssociated v)-2.5 E(alue.)-.25 E(Options apply to both)108 698.4 Q F2
--.2(ex)2.5 G F0(and)2.7 E F2(vi)2.5 E F0
-(modes, unless otherwise speci\214ed.)2.5 E(May 18, 1996)278.085 768 Q
-(10)196.085 E EP
-%%Page: 11 11
-%%BeginPageSetup
-BP
-%%EndPageSetup
-/F0 10/Times-Roman@0 SF 421.08(VI\(1\) VI\(1\))72 48 R/F1 10
-/Times-Bold@0 SF(altwerase [off])108 84 Q/F2 10/Times-Italic@0 SF -.74
-(Vi)144 96 S F0(only)3.24 E 5(.S)-.65 G(elect an alternate w)-5 E
-(ord erase algorithm.)-.1 E F1(autoindent, ai [off])108 112.8 Q F0
-(Automatically indent ne)144 124.8 Q 2.5(wl)-.25 G(ines.)-2.5 E F1
-(autoprint, ap [off])108 141.6 Q F2(Ex)144 153.6 Q F0(only)2.5 E 5(.D)
--.65 G(isplay the current line automatically)-5 E(.)-.65 E F1(auto)108
-170.4 Q(write, aw [off])-.1 E F0
-(Write modi\214ed \214les automatically when changing \214les.)144 182.4
-Q F1(backup [""])108 199.2 Q F0(Backup \214les before the)144 211.2 Q
-2.5(ya)-.15 G(re o)-2.5 E -.15(ve)-.15 G(rwritten.).15 E F1(beautify)108
-228 Q 2.5(,b)-.55 G 2.5(f[)-2.5 G(off])-2.5 E F0
-(Discard control characters.)144 240 Q F1(cdpath [en)108 256.8 Q(vir)-.4
-E(onment v)-.18 E(ariable CDP)-.1 E -.95(AT)-.74 G(H, or curr).95 E
-(ent dir)-.18 E(ectory])-.18 E F0
-(The directory paths used as path pre\214x)144 268.8 Q(es for the)-.15 E
-F1(cd)2.5 E F0(command.)2.5 E F1(cedit [no default])108 285.6 Q F0
-(Set the character to edit the colon command-line history)144 297.6 Q(.)
--.65 E F1(columns, co [80])108 314.4 Q F0
-(Set the number of columns in the screen.)144 326.4 Q F1(comment [off])
-108 343.2 Q F2 -.74(Vi)144 355.2 S F0(only)3.24 E 5(.S)-.65 G
-(kip leading comments in \214les.)-5 E F1(dir)108 372 Q(ectory)-.18 E
-2.5(,d)-.55 G(ir [en)-2.5 E(vir)-.4 E(onment v)-.18 E
-(ariable TMPDIR, or /tmp])-.1 E F0
-(The directory where temporary \214les are created.)144 384 Q F1
-(edcompatible, ed [off])108 400.8 Q F0 .042(Remember the v)144 412.8 R
-.042(alues of the `)-.25 F(`c')-.74 E 2.543('a)-.74 G .043(nd `)-2.543 F
-(`g')-.74 E 2.543('s)-.74 G(uf)-2.543 E .043(\214ces to the)-.25 F F1
-(substitute)2.543 E F0 .043(commands, instead of initializ-)2.543 F
-(ing them as unset for each ne)144 424.8 Q 2.5(wc)-.25 G(ommand.)-2.5 E
-F1(err)108 441.6 Q(orbells, eb [off])-.18 E F2(Ex)144 453.6 Q F0(only)
-2.5 E 5(.A)-.65 G(nnounce error messages with a bell.)-5 E F1(exr)108
-470.4 Q(c, ex [off])-.18 E F0
-(Read the startup \214les in the local directory)144 482.4 Q(.)-.65 E F1
-(extended [off])108 499.2 Q F0(Re)144 511.2 Q(gular e)-.15 E
-(xpressions are e)-.15 E(xtended \(i.e.)-.15 E F2 -.4(eg)5 G -.37(re).4
-G(p).37 E F0(\(1\)\255style\) e).19 E(xpressions.)-.15 E F1
-(\214lec [no default])108 528 Q F0(Set the character to perform \214le path completion on the colon command line.)
-144 540 Q F1(\215ash [on])108 556.8 Q F0
-(Flash the screen instead of beeping the k)144 568.8 Q -.15(ey)-.1 G
-(board on error).15 E(.)-.55 E F1(hardtabs, ht [8])108 585.6 Q F0
-(Set the spacing between hardw)144 597.6 Q(are tab settings.)-.1 E F1
-(iclo)108 614.4 Q(wer [off])-.1 E F0(Mak)144 626.4 Q .436(es all Re)-.1
-F .436(gular Expressions case-insensiti)-.15 F -.15(ve)-.25 G 2.936(,a)
-.15 G 2.936(sl)-2.936 G .436(ong as an upper)-2.936 F .435
-(-case letter does not appear in)-.2 F(the search string.)144 638.4 Q F1
-(ignor)108 655.2 Q(ecase, ic [off])-.18 E F0(Ignore case dif)144 667.2 Q
-(ferences in re)-.25 E(gular e)-.15 E(xpressions.)-.15 E F1 -.1(ke)108
-684 S(ytime [6]).1 E F0(The 10th')144 696 Q 2.5(so)-.55 G 2.5(fas)-2.5 G
-(econd)-2.5 E F2 -.2(ex)2.5 G(/vi).2 E F0 -.1(wa)2.5 G
-(its for a subsequent k).1 E .3 -.15(ey t)-.1 H 2.5(oc).15 G
-(omplete a k)-2.5 E .3 -.15(ey m)-.1 H(apping.).15 E(May 18, 1996)
-278.085 768 Q(11)196.085 E EP
-%%Page: 12 12
-%%BeginPageSetup
-BP
-%%EndPageSetup
-/F0 10/Times-Roman@0 SF 421.08(VI\(1\) VI\(1\))72 48 R/F1 10
-/Times-Bold@0 SF(leftright [off])108 84 Q/F2 10/Times-Italic@0 SF -.74
-(Vi)144 96 S F0(only)3.24 E 5(.D)-.65 G 2.5(ol)-5 G
-(eft-right scrolling.)-2.5 E F1(lines, li [24])108 112.8 Q F2 -.74(Vi)
-144 124.8 S F0(only)3.24 E 5(.S)-.65 G
-(et the number of lines in the screen.)-5 E F1(lisp [off])108 141.6 Q F2
--.74(Vi)144 153.6 S F0(only)3.932 E 5.692(.M)-.65 G .692(odify v)-5.692
-F .692(arious search commands and options to w)-.25 F .693
-(ork with Lisp.)-.1 F F2 .693(This option is not yet)5.693 F
-(implemented.)144 165.6 Q F1(list [off])108 182.4 Q F0
-(Display lines in an unambiguous f)144 194.4 Q(ashion.)-.1 E F1
-(lock [on])108 211.2 Q F0(Attempt to get an e)144 223.2 Q(xclusi)-.15 E
-.3 -.15(ve l)-.25 H(ock on an).15 E 2.5<798c>-.15 G
-(le being edited, read or written.)-2.5 E F1(magic [on])108 240 Q F0
--.35(Tr)144 252 S(eat certain characters specially in re).35 E(gular e)
--.15 E(xpressions.)-.15 E F1(matchtime [7])108 268.8 Q F2 -.74(Vi)144
-280.8 S F0(only)4.85 E 6.61(.T)-.65 G 1.61(he 10th')-6.61 F 4.11(so)-.55
-G 4.11(fas)-4.11 G(econd)-4.11 E F2 -.2(ex)4.11 G(/vi).2 E F0 1.61
-(pauses on the matching character when the)4.11 F F1(sho)4.11 E(wmatch)
--.1 E F0(option is set.)144 292.8 Q F1(mesg [on])108 309.6 Q F0
-(Permit messages from other users.)144 321.6 Q F1
-(modelines, modeline [off])108 338.4 Q F0 .986
-(Read the \214rst and last fe)144 350.4 R 3.486(wl)-.25 G .987
-(ines of each \214le for)-3.486 F F2 -.2(ex)3.487 G F0(commands.)3.687 E
-F2 .987(This option will ne)5.987 F .987(ver be imple-)-.15 F(mented.)
-144 362.4 Q F1(noprint [""])108 379.2 Q F0(Characters that are ne)144
-391.2 Q -.15(ve)-.25 G 2.5(rh).15 G(andled as printable characters.)-2.5
-E F1(number)108 408 Q 2.5(,n)-.92 G 2.5(u[)-2.5 G(off])-2.5 E F0
-(Precede each line displayed with its current line number)144 420 Q(.)
--.55 E F1(octal [off])108 436.8 Q F0(Display unkno)144 448.8 Q
-(wn characters as octal numbers, instead of the def)-.25 E(ault he)-.1 E
-(xadecimal.)-.15 E F1(open [on])108 465.6 Q F2(Ex)144 477.6 Q F0(only)
-2.5 E 5(.I)-.65 G 2.5(ft)-5 G(his option is not set, the)-2.5 E F1(open)
-2.5 E F0(and)2.5 E F1(visual)2.5 E F0(commands are disallo)2.5 E(wed.)
--.25 E F1(optimize, opt [on])108 494.4 Q F2 -.74(Vi)144 506.4 S F0(only)
-3.24 E 5(.O)-.65 G(ptimize te)-5 E(xt throughput to dumb terminals.)-.15
-E F2(This option is not yet implemented.)5 E F1
-(paragraphs, para [IPLPPPQPP LIpplpipbp])108 523.2 Q F2 -.74(Vi)144
-535.2 S F0(only)3.24 E 5(.D)-.65 G
-(e\214ne additional paragraph boundaries for the)-5 E F1({)2.5 E F0(and)
-2.5 E F1(})2.5 E F0(commands.)2.5 E F1(print [""])108 552 Q F0
-(Characters that are al)144 564 Q -.1(wa)-.1 G
-(ys handled as printable characters.).1 E F1(pr)108 580.8 Q(ompt [on])
--.18 E F2(Ex)144 592.8 Q F0(only)2.5 E 5(.D)-.65 G
-(isplay a command prompt.)-5 E F1 -.18(re)108 609.6 S(adonly).18 E 2.5
-(,r)-.55 G 2.5(o[)-2.68 G(off])-2.5 E F0
-(Mark the \214le and session as read-only)144 621.6 Q(.)-.65 E F1 -.18
-(re)108 638.4 S(cdir [/v).18 E(ar/tmp/vi.r)-.1 E(eco)-.18 E -.1(ve)-.1 G
-(r]).1 E F0(The directory where reco)144 650.4 Q -.15(ve)-.15 G
-(ry \214les are stored.).15 E F1 -.18(re)108 667.2 S(draw).18 E 2.5(,r)
--.55 G 2.5(e[)-2.68 G(off])-2.5 E F2 -.74(Vi)144 679.2 S F0(only)3.24 E
-5(.S)-.65 G(imulate an intelligent terminal on a dumb one.)-5 E F2
-(This option is not yet implemented.)5 E F1 -.18(re)108 696 S(map [on])
-.18 E F0(Remap k)144 708 Q -.15(ey)-.1 G 2.5(su).15 G(ntil resolv)-2.5 E
-(ed.)-.15 E(May 18, 1996)278.085 768 Q(12)196.085 E EP
-%%Page: 13 13
-%%BeginPageSetup
-BP
-%%EndPageSetup
-/F0 10/Times-Roman@0 SF 421.08(VI\(1\) VI\(1\))72 48 R/F1 10
-/Times-Bold@0 SF -.18(re)108 84 S(port [5]).18 E F0(Set the number of lines about which the editor reports changes or yanks.)
-144 96 Q F1(ruler [off])108 112.8 Q/F2 10/Times-Italic@0 SF -.74(Vi)144
-124.8 S F0(only)3.24 E 5(.D)-.65 G(isplay a ro)-5 E
-(w/column ruler on the colon command line.)-.25 E F1(scr)108 141.6 Q
-(oll, scr [windo)-.18 E 2.5(w/2)-.1 G(])-2.5 E F0
-(Set the number of lines scrolled.)144 153.6 Q F1(sear)108 170.4 Q
-(chincr [off])-.18 E F0(Mak)144 182.4 Q(es the)-.1 E F1(/)2.5 E F0(and)
-2.5 E F1(?)2.5 E F0(commands incremental.)5 E F1
-(sections, sect [NHSHH HUnhsh])108 199.2 Q F2 -.74(Vi)144 211.2 S F0
-(only)3.24 E 5(.D)-.65 G(e\214ne additional section boundaries for the)
--5 E F1([[)2.5 E F0(and)2.5 E F1(]])2.5 E F0(commands.)2.5 E F1(secur)
-108 228 Q 2.5(e[)-.18 G(off])-2.5 E F0 -.45(Tu)144 240 S(rns of).45 E
-2.5(fa)-.25 G(ll access to e)-2.5 E(xternal programs.)-.15 E F1
-(shell, sh [en)108 256.8 Q(vir)-.4 E(onment v)-.18 E
-(ariable SHELL, or /bin/sh])-.1 E F0
-(Select the shell used by the editor)144 268.8 Q(.)-.55 E F1
-(shellmeta [~{[*?$`'"\\])108 285.6 Q F0(Set the meta characters check)
-144 297.6 Q(ed to determine if \214le name e)-.1 E
-(xpansion is necessary)-.15 E(.)-.65 E F1(shiftwidth, sw [8])108 314.4 Q
-F0(Set the autoindent and shift command indentation width.)144 326.4 Q
-F1(sho)108 343.2 Q(wmatch, sm [off])-.1 E F2 -.74(Vi)144 355.2 S F0
-(only)3.24 E 5(.N)-.65 G(ote matching `)-5 E(`{')-.74 E 2.5('a)-.74 G
-(nd `)-2.5 E(`\(')-.74 E 2.5('f)-.74 G(or `)-2.5 E(`}')-.74 E 2.5('a)
--.74 G(nd `)-2.5 E(`\)')-.74 E 2.5('c)-.74 G(haracters.)-2.5 E F1(sho)
-108 372 Q(wmode [off])-.1 E F2 -.74(Vi)144 384 S F0(only)3.24 E 5(.D)
--.65 G(isplay the current editor mode and a `)-5 E(`modi\214ed')-.74 E
-2.5<278d>-.74 G(ag.)-2.5 E F1(sidescr)108 400.8 Q(oll [16])-.18 E F2
--.74(Vi)144 412.8 S F0(only)3.24 E 5(.S)-.65 G
-(et the amount a left-right scroll will shift.)-5 E F1(slo)108 429.6 Q
--.1(wo)-.1 G(pen, slo).1 E 2.5(w[)-.1 G(off])-2.5 E F0
-(Delay display updating during te)144 441.6 Q(xt input.)-.15 E F2
-(This option is not yet implemented.)5 E F1(sour)108 458.4 Q
-(ceany [off])-.18 E F0(Read startup \214les not o)144 470.4 Q
-(wned by the current user)-.25 E(.)-.55 E F2(This option will ne)5 E
-(ver be implemented.)-.15 E F1(tabstop, ts [8])108 487.2 Q F0
-(This option sets tab widths for the editor display)144 499.2 Q(.)-.65 E
-F1(taglength, tl [0])108 516 Q F0
-(Set the number of signi\214cant characters in tag names.)144 528 Q F1
-(tags, tag [tags /v)108 544.8 Q(ar/db/libc.tags /sys/k)-.1 E(er)-.1 E
-(n/tags])-.15 E F0(Set the list of tags \214les.)144 556.8 Q F1
-(term, ttytype, tty [en)108 573.6 Q(vir)-.4 E(onment v)-.18 E
-(ariable TERM])-.1 E F0(Set the terminal type.)144 585.6 Q F1
-(terse [off])108 602.4 Q F0 .374
-(This option has historically made editor messages less v)144 614.4 R
-2.874(erbose. It)-.15 F .374(has no ef)2.874 F .374
-(fect in this implemen-)-.25 F(tation.)144 626.4 Q F1(tildeop)108 643.2
-Q F0(Modify the)6.55 E F1(~)2.5 E F0(command to tak)2.5 E 2.5(ea)-.1 G
-2.5(na)-2.5 G(ssociated motion.)-2.5 E F1(timeout, to [on])108 660 Q F0
--.35(Ti)144 672 S(me out on k).35 E -.15(ey)-.1 G 2.5(sw).15 G
-(hich may be mapped.)-2.5 E F1(ttywerase [off])108 688.8 Q F2 -.74(Vi)
-144 700.8 S F0(only)3.24 E 5(.S)-.65 G
-(elect an alternate erase algorithm.)-5 E(May 18, 1996)278.085 768 Q(13)
-196.085 E EP
-%%Page: 14 14
-%%BeginPageSetup
-BP
-%%EndPageSetup
-/F0 10/Times-Roman@0 SF 421.08(VI\(1\) VI\(1\))72 48 R/F1 10
-/Times-Bold@0 SF -.1(ve)108 84 S(rbose [off]).1 E/F2 10/Times-Italic@0
-SF -.74(Vi)144 96 S F0(only)3.24 E 5(.D)-.65 G
-(isplay an error message for e)-5 E -.15(ve)-.25 G(ry error).15 E(.)-.55
-E F1(w300 [no default])108 112.8 Q F2 -.74(Vi)144 124.8 S F0(only)3.24 E
-5(.S)-.65 G(et the windo)-5 E 2.5(ws)-.25 G
-(ize if the baud rate is less than 1200 baud.)-2.5 E F1
-(w1200 [no default])108 141.6 Q F2 -.74(Vi)144 153.6 S F0(only)3.24 E 5
-(.S)-.65 G(et the windo)-5 E 2.5(ws)-.25 G
-(ize if the baud rate is equal to 1200 baud.)-2.5 E F1
-(w9600 [no default])108 170.4 Q F2 -.74(Vi)144 182.4 S F0(only)3.24 E 5
-(.S)-.65 G(et the windo)-5 E 2.5(ws)-.25 G
-(ize if the baud rate is greater than 1200 baud.)-2.5 E F1(war)108 199.2
-Q 2.5(n[)-.15 G(on])-2.5 E F2(Ex)144 211.2 Q F0(only)2.801 E 5.301(.T)
--.65 G .301(his option causes a w)-5.301 F .302(arning message to the terminal if the \214le has been modi\214ed, since)
--.1 F(it w)144 223.2 Q(as last written, before a)-.1 E F1(!)2.5 E F0
-(command.)5 E F1(windo)108 240 Q 1.1 -.55(w, w, w)-.1 H 2.5(i[).55 G(en)
--2.5 E(vir)-.4 E(onment v)-.18 E(ariable LINES])-.1 E F0(Set the windo)
-144 252 Q 2.5(ws)-.25 G(ize for the screen.)-2.5 E F1(wraplen, wl [0])
-108 268.8 Q F2 -.74(Vi)144 280.8 S F0(only)3.494 E 5.254(.B)-.65 G .254
-(reak lines automatically)-5.254 F 2.754(,t)-.65 G .253
-(he speci\214ed number of columns from the left-hand mar)-2.754 F 2.753
-(gin. If)-.18 F(both the)144 292.8 Q F1(wraplen)2.5 E F0(and)2.5 E F1
-(wrapmar)2.5 E(gin)-.1 E F0(edit options are set, the)2.5 E F1(wrapmar)
-2.5 E(gin)-.1 E F0 -.25(va)2.5 G(lue is used.).25 E F1(wrapmar)108 309.6
-Q(gin, wm [0])-.1 E F2 -.74(Vi)144 321.6 S F0(only)3.982 E 5.742(.B)-.65
-G .742(reak lines automatically)-5.742 F 3.242(,t)-.65 G .742
-(he speci\214ed number of columns from the right-hand mar)-3.242 F(gin.)
--.18 E(If both the)144 333.6 Q F1(wraplen)2.5 E F0(and)2.5 E F1(wrapmar)
-2.5 E(gin)-.1 E F0(edit options are set, the)2.5 E F1(wrapmar)2.5 E(gin)
--.1 E F0 -.25(va)2.5 G(lue is used.).25 E F1(wrapscan, ws [on])108 350.4
-Q F0(Set searches to wrap around the end or be)144 362.4 Q
-(ginning of the \214le.)-.15 E F1(writeany)108 379.2 Q 2.5(,w)-.55 G 2.5
-(a[)-2.5 G(off])-2.5 E F0 -.45(Tu)144 391.2 S(rn of).45 E 2.5<668c>-.25
-G(le-o)-2.5 E -.15(ve)-.15 G(rwriting checks.).15 E/F3 9/Times-Bold@0 SF
-(ENVIR)72 408 Q(ONMENT)-.27 E(AL V)-.81 E(ARIABLES)-1.215 E F2(COLUMNS)
-108 420 Q F0 .783(The number of columns on the screen.)144 432 R .783
-(This v)5.783 F .783(alue o)-.25 F -.15(ve)-.15 G .783(rrides an).15 F
-3.282(ys)-.15 G .782(ystem or terminal speci\214c v)-3.282 F(al-)-.25 E
-2.739(ues. If)144 444 R(the)2.739 E F2(COLUMNS)2.739 E F0(en)2.739 E
-.239(vironmental v)-.4 F .239(ariable is not set when)-.25 F F2 -.2(ex)
-2.739 G(/vi).2 E F0 .24(runs, or the)2.74 F F1(columns)2.74 E F0 .24
-(option is)2.74 F -.15(ex)144 456 S(plicitly reset by the user).15 E(,)
--.4 E F2 -.2(ex)2.5 G(/vi).2 E F0(enters the v)2.5 E(alue into the en)
--.25 E(vironment.)-.4 E F2(EXINIT)108 472.8 Q F0 2.5(Al)144 484.8 S
-(ist of)-2.5 E F2 -.2(ex)2.5 G F0(startup commands, read if the v)2.7 E
-(ariable)-.25 E F2(NEXINIT)2.5 E F0(is not set.)2.5 E F2(HOME)108 501.6
-Q F0 .558(The user')7.12 F 3.058(sh)-.55 G .558(ome directory)-3.058 F
-3.058(,u)-.65 G .558
-(sed as the initial directory path for the startup `)-3.058 F(`$)-.74 E
-F2(HOME)A F0(/.ne)A(xrc')-.15 E 3.057('a)-.74 G(nd)-3.057 E -.74(``)144
-513.6 S($).74 E F2(HOME)A F0(/.e)A(xrc')-.15 E 2.5<278c>-.74 G 2.5
-(les. This)-2.5 F -.25(va)2.5 G(lue is also used as the def).25 E
-(ault directory for the)-.1 E F2(vi)2.5 E F1(cd)2.5 E F0(command.)2.5 E
-F2(LINES)108 530.4 Q F0 .142(The number of ro)9.33 F .142
-(ws on the screen.)-.25 F .142(This v)5.142 F .143(alue o)-.25 F -.15
-(ve)-.15 G .143(rrides an).15 F 2.643(ys)-.15 G .143
-(ystem or terminal speci\214c v)-2.643 F 2.643(alues. If)-.25 F(the)144
-542.4 Q F2(LINES)3.027 E F0(en)3.027 E .527(vironmental v)-.4 F .526
-(ariable is not set when)-.25 F F2 -.2(ex)3.026 G(/vi).2 E F0 .526
-(runs, or the)3.026 F F1(lines)3.026 E F0 .526(option is e)3.026 F .526
-(xplicitly reset)-.15 F(by the user)144 554.4 Q(,)-.4 E F2 -.2(ex)2.5 G
-(/vi).2 E F0(enters the v)2.5 E(alue into the en)-.25 E(vironment.)-.4 E
-F2(NEXINIT)108 571.2 Q F0 2.5(Al)144 583.2 S(ist of)-2.5 E F2 -.2(ex)2.5
-G F0(startup commands.)2.7 E F2(SHELL)108 600 Q F0(The user')6.55 E 2.5
-(ss)-.55 G(hell of choice \(see also the)-2.5 E F1(shell)2.5 E F0
-(option\).)2.5 E F2(TERM)108 616.8 Q F0 .888(The user')9.89 F 3.388(st)
--.55 G .888(erminal type.)-3.388 F .888(The def)5.888 F .889
-(ault is the type `)-.1 F(`unkno)-.74 E(wn')-.25 E 3.389('. If)-.74 F
-(the)3.389 E F2(TERM)3.389 E F0(en)3.389 E .889(vironmental v)-.4 F
-(ari-)-.25 E .823(able is not set when)144 628.8 R F2 -.2(ex)3.323 G
-(/vi).2 E F0 .823(runs, or the)3.323 F F1(term)3.323 E F0 .823
-(option is e)3.323 F .822(xplicitly reset by the user)-.15 F(,)-.4 E F2
--.2(ex)3.322 G(/vi).2 E F0 .822(enters the)3.322 F -.25(va)144 640.8 S
-(lue into the en).25 E(vironment.)-.4 E F2(TMPDIR)108 657.6 Q F0
-(The location used to stored temporary \214les \(see also the)144 669.6
-Q F1(dir)2.5 E(ectory)-.18 E F0(edit option\).)2.5 E F3(ASYNCHR)72 686.4
-Q(ONOUS EVENTS)-.27 E F0(SIGALRM)108 698.4 Q F2 -.74(Vi)144 710.4 S(/e)
-.74 E(x)-.2 E F0 .976(uses this signal for periodic backups of \214le modi\214cations and to display `)
-3.475 F(`b)-.74 E(usy')-.2 E 3.476('m)-.74 G(essages)-3.476 E
-(when operations are lik)144 722.4 Q(ely to tak)-.1 E 2.5(eal)-.1 G
-(ong time.)-2.5 E(May 18, 1996)278.085 768 Q(14)196.085 E EP
-%%Page: 15 15
-%%BeginPageSetup
-BP
-%%EndPageSetup
-/F0 10/Times-Roman@0 SF 421.08(VI\(1\) VI\(1\))72 48 R(SIGHUP)108 84 Q
-(SIGTERM)108 100.8 Q .285(If the current b)144 112.8 R(uf)-.2 E .285
-(fer has changed since it w)-.25 F .284(as last written in its entirety)
--.1 F 2.784(,t)-.65 G .284(he editor attempts to sa)-2.784 F -.15(ve)-.2
-G 1.642(the modi\214ed \214le so it can be later reco)144 124.8 R -.15
-(ve)-.15 G 4.143(red. See).15 F(the)4.143 E/F1 10/Times-Italic@0 SF
-(vi/e)4.143 E(x)-.2 E F0 1.643(Reference manual section entitled)4.143 F
--.74(``)144 136.8 S(Reco).74 E -.15(ve)-.15 G(ry').15 E 2.5('f)-.74 G
-(or more information.)-2.5 E(SIGINT)108 153.6 Q .868(When an interrupt occurs, the current operation is halted, and the editor returns to the command)
-144 165.6 R(le)144 177.6 Q -.15(ve)-.25 G 3.215(l. If).15 F .715
-(interrupted during te)3.215 F .715(xt input, the te)-.15 F .715
-(xt already input is resolv)-.15 F .715(ed into the \214le as if the te)
--.15 F(xt)-.15 E(input had been normally terminated.)144 189.6 Q
-(SIGWINCH)108 206.4 Q 1.271(The screen is resized.)144 218.4 R 1.271
-(See the)6.271 F F1(vi/e)3.771 E(x)-.2 E F0 1.271
-(Reference manual section entitled `)3.771 F 1.27(`Sizing the Screen')
--.74 F 3.77('f)-.74 G(or)-3.77 E(more information.)144 230.4 Q(SIGCONT)
-108 247.2 Q(SIGQ)108 264 Q(UIT)-.1 E(SIGTSTP)108 280.8 Q F1 -.74(Vi)144
-292.8 S(/e).74 E(x)-.2 E F0(ignores these signals.)2.5 E/F2 9
-/Times-Bold@0 SF(FILES)72 309.6 Q F0 6.27(/bin/sh The)108 321.6 R(def)
-2.5 E(ault user shell.)-.1 E(/etc/vi.e)108 338.4 Q(xrc)-.15 E
-(System-wide vi startup \214le.)144 350.4 Q 15.16(/tmp T)108 367.2 R
-(emporary \214le directory)-.7 E(.)-.65 E(/v)108 384 Q(ar/tmp/vi.reco)
--.25 E -.15(ve)-.15 G(r).15 E(The def)144 396 Q(ault reco)-.1 E -.15(ve)
--.15 G(ry \214le directory).15 E(.)-.65 E($HOME/.ne)108 412.8 Q(xrc)-.15
-E(1st choice for user')144 424.8 Q 2.5(sh)-.55 G
-(ome directory startup \214le.)-2.5 E($HOME/.e)108 441.6 Q(xrc)-.15 E
-(2nd choice for user')144 453.6 Q 2.5(sh)-.55 G
-(ome directory startup \214le.)-2.5 E(.ne)108 470.4 Q 8.94(xrc 1st)-.15
-F(choice for local directory startup \214le.)2.5 E(.e)108 487.2 Q 13.94
-(xrc 2nd)-.15 F(choice for local directory startup \214le.)2.5 E F2
-(SEE ALSO)72 504 Q F1(cta)108 516 Q(gs)-.1 E F0(\(1\),).27 E F1(mor)2.5
-E(e)-.37 E F0(\(3\),).18 E F1(cur)2.5 E(ses)-.1 E F0(\(3\),).27 E F1
-(dbopen)2.5 E F0(\(3\)).24 E(The `)108 540 Q(`V)-.74 E 2.5(iQ)-.6 G
-(uick Reference')-2.5 E 2.5('c)-.74 G(ard.)-2.5 E -.74(``)108 564 S .743
-(An Introduction to Display Editing with V)-.06 F(i')-.6 E .743
-(', found in the `)-.74 F .743(`UNIX User')-.74 F 3.243(sM)-.55 G .743
-(anual Supplementary Docu-)-3.243 F(ments')108 576 Q 3.014('s)-.74 G
-.513(ection of both the 4.3BSD and 4.4BSD manual sets.)-3.014 F .513
-(This document is the closest thing a)5.513 F -.25(va)-.2 G(ilable).25 E
-(to an introduction to the)108 588 Q F1(vi)2.5 E F0(screen editor)2.5 E
-(.)-.55 E -.74(``)108 612 S 1.116(Ex Reference Manual \(V).74 F 1.116
-(ersion 3.7\)')-1.11 F 1.117(', found in the `)-.74 F 1.117(`UNIX User')
--.74 F 3.617(sM)-.55 G 1.117(anual Supplementary Documents')-3.617 F(')
--.74 E .194(section of both the 4.3BSD and 4.4BSD manual sets.)108 624 R
-.194(This document is the \214nal reference for the)5.194 F F1 -.2(ex)
-2.693 G F0(editor)2.893 E(,)-.4 E(as distrib)108 636 Q
-(uted in most historic 4BSD and System V systems.)-.2 E -.74(``)108 660
-S .279(Edit: A tutorial').74 F .279(', found in the `)-.74 F .279
-(`UNIX User')-.74 F 2.779(sM)-.55 G .279(anual Supplementary Documents')
--2.779 F 2.78('s)-.74 G .28(ection of the 4.3BSD)-2.78 F(manual set.)108
-672 Q(This document is an introduction to a simple v)5 E(ersion of the)
--.15 E F1 -.2(ex)2.5 G F0(screen editor)2.7 E(.)-.55 E -.74(``)108 696 S
-(Ex/V).74 E 3.69(iR)-.6 G 1.19(eference Manual')-3.69 F 1.189
-(', found in the `)-.74 F 1.189(`UNIX User')-.74 F 3.689(sM)-.55 G 1.189
-(anual Supplementary Documents')-3.689 F 3.689('s)-.74 G 1.189
-(ection of)-3.689 F .781(the 4.4BSD manual set.)108 708 R .781
-(This document is the \214nal reference for the)5.781 F F1(ne)3.281 E
-(x/n)-.2 E(vi)-.4 E F0(te)3.281 E .782(xt editors, as distrib)-.15 F
-.782(uted in)-.2 F(4.4BSD and 4.4BSD-Lite.)108 720 Q(May 18, 1996)
-278.085 768 Q(15)196.085 E EP
-%%Page: 16 16
-%%BeginPageSetup
-BP
-%%EndPageSetup
-/F0 10/Times-Roman@0 SF 421.08(VI\(1\) VI\(1\))72 48 R/F1 10
-/Times-Italic@0 SF(Rof)108 84 Q(f)-.18 E F0 .107
-(source for all of these documents is distrib)2.608 F .107(uted with)-.2
-F F1(ne)2.607 E(x/n)-.2 E(vi)-.4 E F0 .107(in the)2.607 F F1 -.4(nv)
-2.607 G(i/USD.doc).4 E F0 .107(directory of the)2.607 F F1(ne)2.607 E
-(x/n)-.2 E(vi)-.4 E F0(source code.)108 96 Q .131(The \214les `)108 120
-R(`auto)-.74 E(write')-.25 E .131(', `)-.74 F(`input')-.74 E .131(', `)
--.74 F(`quoting')-.74 E 2.631('a)-.74 G .131(nd `)-2.631 F(`structures')
--.74 E 2.632('f)-.74 G .132(ound in the)-2.632 F F1 -.4(nv)2.632 G
-(i/docs/internals).4 E F0 .132(directory of the)2.632 F F1(ne)108 132 Q
-(x/n)-.2 E(vi)-.4 E F0(source code.)2.5 E/F2 9/Times-Bold@0 SF(HIST)72
-148.8 Q(OR)-.162 E(Y)-.315 E F0(The)108 160.8 Q F1(ne)2.5 E(x/n)-.2 E
-(vi)-.4 E F0(replacements for the)2.5 E F1 -.2(ex)2.5 G(/vi).2 E F0
-(editor \214rst appeared in 4.4BSD.)2.5 E F2(ST)72 177.6 Q(AND)-.81 E
-(ARDS)-.315 E F1(Ne)108 189.6 Q(x/n)-.2 E(vi)-.4 E F0 1.341
-(is close to IEEE Std1003.2 \(`)3.841 F(`POSIX')-.74 E 3.841('\). That)
--.74 F 1.341(document dif)3.841 F 1.341(fers from historical)-.25 F F1
--.2(ex)3.84 G(/vi).2 E F0 1.34(practice in)3.84 F(se)108 201.6 Q -.15
-(ve)-.25 G(ral places; there are changes to be made on both sides.).15 E
-(May 18, 1996)278.085 768 Q(16)196.085 E EP
-%%Trailer
-end
-%%EOF
diff --git a/usr.bin/vi/docs/USD.doc/vi.man/vi.1 b/usr.bin/vi/docs/USD.doc/vi.man/vi.1
index 1cc30aa4592..757e842a216 100644
--- a/usr.bin/vi/docs/USD.doc/vi.man/vi.1
+++ b/usr.bin/vi/docs/USD.doc/vi.man/vi.1
@@ -31,9 +31,9 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.\" @(#)vi.1 8.39 (Berkeley) 5/18/96
+.\" @(#)vi.1 8.44 (Berkeley) 6/28/96
.\"
-.TH VI 1 "May 18, 1996"
+.TH VI 1 "June 28, 1996"
.UC
.SH NAME
ex, vi, view \- text editors
@@ -859,9 +859,9 @@ Delete the lines from the file.
.B "di[splay] b[uffers] | c[onnections] | s[creens] | t[ags]"
Display buffers, Cscope connections, screens or tags.
.TP
-.B "e[dit][!] [+cmd] [file]"
+.B "[Ee][dit][!] [+cmd] [file]"
.TP
-.B "ex[!] [+cmd] [file]"
+.B "[Ee]x[!] [+cmd] [file]"
Edit a different file.
.TP
.B "exu[sage] [command]"
@@ -872,7 +872,7 @@ command.
.B "f[ile] [file]"
Display and optionally change the file name.
.TP
-.B "fg [name]"
+.B "[Ff]g [name]"
.I \&Vi
mode only.
Foreground the specified screen.
@@ -912,7 +912,7 @@ Move the specified lines after the target line.
Write the abbreviations, editor options and maps to the specified
file.
.TP
-.B "n[ext][!] [file ...]"
+.B "[Nn][ext][!] [file ...]"
Edit the next file from the argument list.
.TP
.B "[line] o[pen] /pattern/ [flags]"
@@ -924,7 +924,7 @@ Save the file in a form that can later be recovered using the
.B \-r
option.
.TP
-.B "prev[ious][!]"
+.B "[Pp]rev[ious][!]"
Edit the previous file from the argument list.
.TP
.B "[range] p[rint] [count] [flags]"
@@ -977,7 +977,7 @@ Make substitutions.
.B <suspend>
Suspend the edit session.
.TP
-.B "ta[g][!] tagstring"
+.B "[Tt]a[g][!] tagstring"
Edit the file containing the specified tag.
.TP
.B "tagn[ext][!]"
@@ -1003,7 +1003,7 @@ mode only.
Enter
.IR \&vi .
.TP
-.B "vi[sual][!] [+cmd] [file]"
+.B "[Vi]i[sual][!] [+cmd] [file]"
.I \&Vi
mode only.
Edit a new file.
@@ -1091,7 +1091,7 @@ Set the number of columns in the screen.
.B "comment [off]"
.I \&Vi
only.
-Skip leading comments in files.
+Skip leading comments in shell and C-language files.
.TP
.B "directory, dir [environment variable TMPDIR, or /tmp]"
The directory where temporary files are created.
@@ -1302,7 +1302,7 @@ Set the autoindent and shift command indentation width.
only.
Note matching ``{'' and ``('' for ``}'' and ``)'' characters.
.TP
-.B "showmode [off]"
+.B "showmode, smd [off]"
.I \&Vi
only.
Display the current editor mode and a ``modified'' flag.
@@ -1336,7 +1336,7 @@ Set the terminal type.
This option has historically made editor messages less verbose.
It has no effect in this implementation.
.TP
-.B "tildeop"
+.B "tildeop [off]"
Modify the
.B \&~
command to take an associated motion.
@@ -1380,6 +1380,10 @@ command.
.B "window, w, wi [environment variable LINES]"
Set the window size for the screen.
.TP
+.B "windowname [off]"
+Change the icon/window name to the current file name even if it can't
+be restored on editor exit.
+.TP
.B "wraplen, wl [0]"
.I \&Vi
only.
diff --git a/usr.bin/vi/docs/USD.doc/vi.ref/ex.cmd.roff b/usr.bin/vi/docs/USD.doc/vi.ref/ex.cmd.roff
index 0e6d45b3b7a..0771f67545e 100644
--- a/usr.bin/vi/docs/USD.doc/vi.ref/ex.cmd.roff
+++ b/usr.bin/vi/docs/USD.doc/vi.ref/ex.cmd.roff
@@ -31,7 +31,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.\" @(#)ex.cmd.roff 8.38 (Berkeley) 5/8/96
+.\" @(#)ex.cmd.roff 8.39 (Berkeley) 6/28/96
.\"
.SH 1 "Ex Description"
.pp
@@ -534,6 +534,11 @@ None.
.CO Vi
mode only.
Background the current screen.
+The screen is unchanged,
+but is no longer accessible and disappears from the display.
+Use the
+.CO fg
+command to bring the screen back to the display foreground.
.SS
.SP Line:
Set to the current line when the screen was last edited.
@@ -737,8 +742,19 @@ None.
.CO Vi
mode only.
Foreground the specified screen.
-Swap the current screen with the specified backgrounded screen.
-If no screen is specified, the first background screen is foregrounded.
+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 foregrounded.
+.sp
+By default,
+foregrounding causes the current screen to be swapped with the backgrounded
+screen.
+Capitalizing the first letter of the command, i.e.
+.CO Fg ,
+will foreground the backgrounded screen in a new screen instead of
+swapping it with the current screen.
.SS
.SP Line:
Set to the current line when the screen was last edited.
diff --git a/usr.bin/vi/docs/USD.doc/vi.ref/ref.so b/usr.bin/vi/docs/USD.doc/vi.ref/ref.so
index c0fddc3f6c7..ecc91575275 100644
--- a/usr.bin/vi/docs/USD.doc/vi.ref/ref.so
+++ b/usr.bin/vi/docs/USD.doc/vi.ref/ref.so
@@ -1,5 +1,7 @@
.\" Copyright (c) 1994
.\" The Regents of the University of California. All rights reserved.
+.\" Copyright (c) 1994, 1995
+.\" Keith Bostic. All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
@@ -29,7 +31,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.\" @(#)ref.so 8.6 (Berkeley) 7/15/94
+.\" @(#)ref.so 8.8 (Berkeley) 1/11/95
.\"
.\"
.\" indented paragraph, with spaces between the items, bold font
diff --git a/usr.bin/vi/docs/USD.doc/vi.ref/set.opt.roff b/usr.bin/vi/docs/USD.doc/vi.ref/set.opt.roff
index 35a62135beb..c91aaae9773 100644
--- a/usr.bin/vi/docs/USD.doc/vi.ref/set.opt.roff
+++ b/usr.bin/vi/docs/USD.doc/vi.ref/set.opt.roff
@@ -31,7 +31,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.\" @(#)set.opt.roff 8.59 (Berkeley) 5/16/96
+.\" @(#)set.opt.roff 8.63 (Berkeley) 6/26/96
.\"
.SH 1 "Set Options"
.pp
@@ -384,11 +384,13 @@ more information.
.CO Vi
only.
If the first non-empty line of the file begins with the string
-.QT /\&* ,
+.QT /\&*
+or
+.QT # ,
this option causes
.CO vi
-to skip to the end of that C-language comment (probably a terribly boring
-legal notice) before displaying the file.
+to skip to the end of that C-language or shell comment (probably a
+terribly boring legal notice) before displaying the file.
.KY directory
.IP "directory, dir [environment variable TMPDIR, or /tmp]"
The directory where temporary files are created.
@@ -1034,7 +1036,7 @@ See the
.OP matchtime
option for more information.
.KY showmode
-.IP "showmode [off]"
+.IP "showmode, smd [off]"
.CO Vi
only.
This option causes
@@ -1104,7 +1106,7 @@ See the
.OP verbose
option for more information.
.KY tildeop
-.IP "tildeop"
+.IP "tildeop [off]"
Modify the
.CO ~
command to take an associated motion.
@@ -1219,6 +1221,21 @@ scrolled by the
and
.CO <control-U>
commands.
+.KY windowname
+.IP "windowname [off]"
+.CO Vi
+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
+.OP windowname
+edit option is set,
+.CO vi
+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
+.XR xterm 1 ).
.KY wraplen
.IP "wraplen, wl [0]"
This option is identical to the
diff --git a/usr.bin/vi/docs/USD.doc/vi.ref/spell.ok b/usr.bin/vi/docs/USD.doc/vi.ref/spell.ok
index a60d438f2df..041d648cbcf 100644
--- a/usr.bin/vi/docs/USD.doc/vi.ref/spell.ok
+++ b/usr.bin/vi/docs/USD.doc/vi.ref/spell.ok
@@ -18,6 +18,7 @@ Englar
Ev
FF
Fa
+Fg
FindScreen
Fl
Foregrounding
@@ -171,6 +172,7 @@ filesystem
filesystems
foo
foregrounded
+foregrounding
ftp.cs.berkeley.edu
ftp.uu.net
gdb
@@ -264,6 +266,7 @@ recover.XXXXXX
recover.c
recover.script
redist
+redistributable
reimplementations
remapmax
remapped
diff --git a/usr.bin/vi/docs/USD.doc/vi.ref/vi.ref b/usr.bin/vi/docs/USD.doc/vi.ref/vi.ref
index 14a14f684ff..912004d5953 100644
--- a/usr.bin/vi/docs/USD.doc/vi.ref/vi.ref
+++ b/usr.bin/vi/docs/USD.doc/vi.ref/vi.ref
@@ -31,7 +31,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.\" @(#)vi.ref 8.74 (Berkeley) 5/17/96
+.\" @(#)vi.ref 8.76 (Berkeley) 6/28/96
.\"
.\"
.so ref.so
@@ -577,7 +577,7 @@ value in the recovery script.
If the path of your system's
.CO sendmail
program (or whatever mailer you're using) is not
-.LI /usr/sbin/sendmail ,
+.LI /usr/lib/sendmail ,
be sure to substitute the correct pathname for the
.LI SENDMAIL
value in the recovery script.
@@ -671,6 +671,7 @@ the set of screens that are currently displayed.
The
.CO Edit ,
.CO Ex ,
+.CO Fg ,
.CO Next ,
.CO Previous ,
.CO Tag
@@ -721,18 +722,22 @@ backgrounded screens in the window.
.pp
The
.CO "fg [file]"
-command
-.QQ foregrounds
-the first screen in the list of backgrounded screens that is
-associated with its argument.
+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.
-Foregrounding consists of backgrounding the current screen,
+By default,
+foregrounding consists of backgrounding the current screen,
and replacing its space in the window with the foregrounded screen.
.pp
-If the last screen in the window is exited, and there are backgrounded
-screens, the first screen on the list of backgrounded screens takes over
-the window.
+Capitalizing the first letter of the command, i.e.
+.CO Fg ,
+will foreground the backgrounded screen in a new screen instead of
+swapping it with the current screen.
+.pp
+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.
.SH 1 "Tags, Tag Stacks, and Cscope"
.pp
.CO Nvi
@@ -1203,7 +1208,6 @@ The
editor currently supports two scripting languages, Tcl/Tk and Perl5.
(Note that Perl4 isn't sufficient, and that the Perl5 must be version
5.002 or later.
-See the )
See the
.QB "Building Nvi"
section for more information.
diff --git a/usr.bin/vi/docs/USD.doc/vi.ref/vi.ref.ps b/usr.bin/vi/docs/USD.doc/vi.ref/vi.ref.ps
deleted file mode 100644
index 48e14ab6189..00000000000
--- a/usr.bin/vi/docs/USD.doc/vi.ref/vi.ref.ps
+++ /dev/null
@@ -1,5557 +0,0 @@
-%!PS-Adobe-3.0
-%%Creator: groff version 1.10
-%%CreationDate: Sat May 18 15:39:22 1996
-%%DocumentNeededResources: font Times-Bold
-%%+ font Times-Italic
-%%+ font Times-Roman
-%%+ font Courier
-%%DocumentSuppliedResources: procset grops 1.10 0
-%%Pages: 68
-%%PageOrder: Ascend
-%%Orientation: Portrait
-%%EndComments
-%%BeginProlog
-%%BeginResource: procset grops 1.10 0
-/setpacking where{
-pop
-currentpacking
-true setpacking
-}if
-/grops 120 dict dup begin
-/SC 32 def
-/A/show load def
-/B{0 SC 3 -1 roll widthshow}bind def
-/C{0 exch ashow}bind def
-/D{0 exch 0 SC 5 2 roll awidthshow}bind def
-/E{0 rmoveto show}bind def
-/F{0 rmoveto 0 SC 3 -1 roll widthshow}bind def
-/G{0 rmoveto 0 exch ashow}bind def
-/H{0 rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def
-/I{0 exch rmoveto show}bind def
-/J{0 exch rmoveto 0 SC 3 -1 roll widthshow}bind def
-/K{0 exch rmoveto 0 exch ashow}bind def
-/L{0 exch rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def
-/M{rmoveto show}bind def
-/N{rmoveto 0 SC 3 -1 roll widthshow}bind def
-/O{rmoveto 0 exch ashow}bind def
-/P{rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def
-/Q{moveto show}bind def
-/R{moveto 0 SC 3 -1 roll widthshow}bind def
-/S{moveto 0 exch ashow}bind def
-/T{moveto 0 exch 0 SC 5 2 roll awidthshow}bind def
-/SF{
-findfont exch
-[exch dup 0 exch 0 exch neg 0 0]makefont
-dup setfont
-[exch/setfont cvx]cvx bind def
-}bind def
-/MF{
-findfont
-[5 2 roll
-0 3 1 roll
-neg 0 0]makefont
-dup setfont
-[exch/setfont cvx]cvx bind def
-}bind def
-/level0 0 def
-/RES 0 def
-/PL 0 def
-/LS 0 def
-/MANUAL{
-statusdict begin/manualfeed true store end
-}bind def
-/PLG{
-gsave newpath clippath pathbbox grestore
-exch pop add exch pop
-}bind def
-/BP{
-/level0 save def
-1 setlinecap
-1 setlinejoin
-72 RES div dup scale
-LS{
-90 rotate
-}{
-0 PL translate
-}ifelse
-1 -1 scale
-}bind def
-/EP{
-level0 restore
-showpage
-}bind def
-/DA{
-newpath arcn stroke
-}bind def
-/SN{
-transform
-.25 sub exch .25 sub exch
-round .25 add exch round .25 add exch
-itransform
-}bind def
-/DL{
-SN
-moveto
-SN
-lineto stroke
-}bind def
-/DC{
-newpath 0 360 arc closepath
-}bind def
-/TM matrix def
-/DE{
-TM currentmatrix pop
-translate scale newpath 0 0 .5 0 360 arc closepath
-TM setmatrix
-}bind def
-/RC/rcurveto load def
-/RL/rlineto load def
-/ST/stroke load def
-/MT/moveto load def
-/CL/closepath load def
-/FL{
-currentgray exch setgray fill setgray
-}bind def
-/BL/fill load def
-/LW/setlinewidth load def
-/RE{
-findfont
-dup maxlength 1 index/FontName known not{1 add}if dict begin
-{
-1 index/FID ne{def}{pop pop}ifelse
-}forall
-/Encoding exch def
-dup/FontName exch def
-currentdict end definefont pop
-}bind def
-/DEFS 0 def
-/EBEGIN{
-moveto
-DEFS begin
-}bind def
-/EEND/end load def
-/CNT 0 def
-/level1 0 def
-/PBEGIN{
-/level1 save def
-translate
-div 3 1 roll div exch scale
-neg exch neg exch translate
-0 setgray
-0 setlinecap
-1 setlinewidth
-0 setlinejoin
-10 setmiterlimit
-[]0 setdash
-/setstrokeadjust where{
-pop
-false setstrokeadjust
-}if
-/setoverprint where{
-pop
-false setoverprint
-}if
-newpath
-/CNT countdictstack def
-userdict begin
-/showpage{}def
-}bind def
-/PEND{
-clear
-countdictstack CNT sub{end}repeat
-level1 restore
-}bind def
-end def
-/setpacking where{
-pop
-setpacking
-}if
-%%EndResource
-%%IncludeResource: font Times-Bold
-%%IncludeResource: font Times-Italic
-%%IncludeResource: font Times-Roman
-%%IncludeResource: font Courier
-grops begin/DEFS 1 dict def DEFS begin/u{.001 mul}bind def end/RES 72
-def/PL 792 def/LS false def/ENC0[/asciicircum/asciitilde/Scaron/Zcaron
-/scaron/zcaron/Ydieresis/trademark/quotesingle/.notdef/.notdef/.notdef
-/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef
-/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef
-/.notdef/.notdef/space/exclam/quotedbl/numbersign/dollar/percent
-/ampersand/quoteright/parenleft/parenright/asterisk/plus/comma/hyphen
-/period/slash/zero/one/two/three/four/five/six/seven/eight/nine/colon
-/semicolon/less/equal/greater/question/at/A/B/C/D/E/F/G/H/I/J/K/L/M/N/O
-/P/Q/R/S/T/U/V/W/X/Y/Z/bracketleft/backslash/bracketright/circumflex
-/underscore/quoteleft/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y
-/z/braceleft/bar/braceright/tilde/.notdef/quotesinglbase/guillemotleft
-/guillemotright/bullet/florin/fraction/perthousand/dagger/daggerdbl
-/endash/emdash/ff/fi/fl/ffi/ffl/dotlessi/dotlessj/grave/hungarumlaut
-/dotaccent/breve/caron/ring/ogonek/quotedblleft/quotedblright/oe/lslash
-/quotedblbase/OE/Lslash/.notdef/exclamdown/cent/sterling/currency/yen
-/brokenbar/section/dieresis/copyright/ordfeminine/guilsinglleft
-/logicalnot/minus/registered/macron/degree/plusminus/twosuperior
-/threesuperior/acute/mu/paragraph/periodcentered/cedilla/onesuperior
-/ordmasculine/guilsinglright/onequarter/onehalf/threequarters
-/questiondown/Agrave/Aacute/Acircumflex/Atilde/Adieresis/Aring/AE
-/Ccedilla/Egrave/Eacute/Ecircumflex/Edieresis/Igrave/Iacute/Icircumflex
-/Idieresis/Eth/Ntilde/Ograve/Oacute/Ocircumflex/Otilde/Odieresis
-/multiply/Oslash/Ugrave/Uacute/Ucircumflex/Udieresis/Yacute/Thorn
-/germandbls/agrave/aacute/acircumflex/atilde/adieresis/aring/ae/ccedilla
-/egrave/eacute/ecircumflex/edieresis/igrave/iacute/icircumflex/idieresis
-/eth/ntilde/ograve/oacute/ocircumflex/otilde/odieresis/divide/oslash
-/ugrave/uacute/ucircumflex/udieresis/yacute/thorn/ydieresis]def
-/Courier@0 ENC0/Courier RE/Times-Roman@0 ENC0/Times-Roman RE
-/Times-Italic@0 ENC0/Times-Italic RE/Times-Bold@0 ENC0/Times-Bold RE
-%%EndProlog
-%%Page: 1 1
-%%BeginPageSetup
-BP
-%%EndPageSetup
-/F0 12/Times-Bold@0 SF(Ex/V)225.006 100.2 Q 3(iR)-.444 G(efer)-3 E
-(ence Manual)-.216 E/F1 10/Times-Italic@0 SF -.35(Ke)263.59 124.2 S
-(ith Bostic).35 E/F2 10/Times-Roman@0 SF(Computer Science Di)232.85
-148.2 Q(vision)-.25 E
-(Department of Electrical Engineering and Computer Science)166.36 160.2
-Q(Uni)219.725 172.2 Q -.15(ve)-.25 G(rsity of California, Berk).15 E
-(ele)-.1 E(y)-.15 E(Berk)232.625 184.2 Q(ele)-.1 E 1.3 -.65(y, C)-.15 H
-2.5(alifornia 94720).65 F(May 18, 1996)260.085 208.2 Q F1(Abstr)271.13
-256.2 Q(act)-.15 E F2 1.406
-(This document is the reference guide for the 4.4BSD implementations of)
-97 292.8 R/F3 10/Times-Bold@0 SF(nex)3.906 E F2(/)A F3 -.4(nv)C(i).4 E
-F2 3.906(,w)C 1.406(hich are)-3.906 F
-(reimplementations of the historic Berk)72 304.8 Q(ele)-.1 E(y)-.15 E F3
-(ex)2.5 E F2(/)A F3(vi)A F2(editors.)2.5 E F1(Ac)249.825 361.2 Q
-(knowledg)-.2 E(ements)-.1 E F2 2.356
-(Bruce Englar encouraged the early de)97 397.8 R -.15(ve)-.25 G 2.357
-(lopment of the historic).15 F F3(ex)4.857 E F2(/)A F3(vi)A F2(editor)
-4.857 E 7.357(.P)-.55 G 2.357(eter K)-7.357 F(essler)-.25 E .143
-(helped bring sanity to v)72 409.8 R .143(ersion 2')-.15 F 2.643(sc)-.55
-G .142(ommand layout.)-2.643 F .142(Bill Jo)5.142 F 2.642(yw)-.1 G .142
-(rote v)-2.642 F .142(ersions 1 and 2.0 through 2.7, and)-.15 F .57
-(created the frame)72 421.8 R -.1(wo)-.25 G .57
-(rk that users see in the present editor).1 F 5.571(.M)-.55 G .571
-(ark Horton added macros and other fea-)-5.571 F(tures and made)72 433.8
-Q F3(ex)2.5 E F2(/)A F3(vi)A F2 -.1(wo)2.5 G(rk on a lar).1 E
-(ge number of terminals and Unix systems.)-.18 E F3(Nvi)97 450 Q F2 .476
-(is originally deri)2.976 F -.15(ve)-.25 G 2.976(df).15 G .476
-(rom softw)-2.976 F .475(are contrib)-.1 F .475(uted to the Uni)-.2 F
--.15(ve)-.25 G .475(rsity of California, Berk).15 F(ele)-.1 E 2.975(yb)
--.15 G(y)-2.975 E(Ste)72 462 Q .3 -.15(ve K)-.25 H(irk).15 E
-(endall, the author of the)-.1 E F3(vi)2.5 E F2(clone)2.5 E F3(elvis)2.5
-E F2(.)A 2.908(IEEE Standard Portable Operating System Interf)97 478.2 R
-2.908(ace for Computer En)-.1 F 2.908(vironments \(POSIX\))-.4 F
-(1003.2 style Re)72 490.2 Q(gular Expression support w)-.15 E
-(as done by Henry Spencer)-.1 E(.)-.55 E 1.384(The curses library w)97
-506.4 R 1.384(as originally done by K)-.1 F 1.384(en Arnold.)-.25 F
-1.383(Scrolling and re)6.383 F -.1(wo)-.25 G 1.383(rking for).1 F F3 -.4
-(nv)3.883 G(i).4 E F2 -.1(wa)3.883 G(s).1 E(done by Elan Amir)72 518.4 Q
-(.)-.55 E .381
-(The Institute of Electrical and Electronics Engineers has gi)97 534.6 R
--.15(ve)-.25 G 2.881(nu).15 G 2.881(sp)-2.881 G .381
-(ermission to reprint portions)-2.881 F 2.36(of their documentation.)72
-546.6 R 2.359
-(Portions of this document are reprinted and reproduced from IEEE Std)
-7.36 F 3.71(1003.2-1992, IEEE Standard Portable Operating System Interf)
-72 558.6 R 3.71(ace for Computer En)-.1 F(vironments)-.4 E
-(\(POSIX\), cop)72 570.6 Q(yright 1992 by the Institute of Electrical and Electronics Engineers, Inc.)
--.1 E(The \214nancial support of UUNET Communications Services is gratefully ackno)
-97 586.8 Q(wledged.)-.25 E(Cop)72 679.2 Q(yright \(c\) 1991, 1993, 1994)
--.1 E(The Re)122 691.2 Q(gents of the Uni)-.15 E -.15(ve)-.25 G
-(rsity of California.).15 E(All Rights Reserv)5 E(ed.)-.15 E(Cop)72
-707.4 Q(yright \(c\) 1994, 1995)-.1 E -.25(Ke)122 719.4 S(ith Bostic.)
-.25 E(All Rights Reserv)5 E(ed.)-.15 E EP
-%%Page: 3 2
-%%BeginPageSetup
-BP
-%%EndPageSetup
-/F0 10/Times-Bold@0 SF(Nvi/Nex Refer)72 60 Q 308.33(ence USD:13-3)-.18 F
-2.5(1. Description)72 96 R -.37(Vi)97 112.2 S/F1 10/Times-Roman@0 SF
-.265(is a screen oriented te)3.135 F .265(xt editor)-.15 F(.)-.55 E F0
-(Ex)5.265 E F1 .264(is a line-oriented te)2.765 F .264(xt editor)-.15 F
-(.)-.55 E F0(Ex)5.264 E F1(and)2.764 E F0(vi)2.764 E F1 .264(are dif)
-2.764 F .264(ferent interf)-.25 F(aces)-.1 E .452(to the same program, and it is possible to switch back and forth during an edit session.)
-72 124.2 R F0 -.37(Vi)5.453 G(ew).37 E F1 .453(is the equi)2.953 F(v-)
--.25 E(alent of using the)72 136.2 Q F0<ad52>2.5 E F1
-(\(read-only\) option of)2.5 E F0(vi)2.5 E F1(.)A 2.49
-(This reference manual is the one pro)97 152.4 R 2.489(vided with the)
--.15 F F0(nex)4.989 E F1(/)A F0 -.4(nv)C(i).4 E F1 -.15(ve)4.989 G 2.489
-(rsions of the).15 F F0(ex)4.989 E F1(/)A F0(vi)A F1(te)4.989 E 2.489
-(xt editors.)-.15 F F0(Nex)72 164.4 Q F1(/)A F0 -.4(nv)C(i).4 E F1 1.363
-(are intended as b)3.863 F(ug-for)-.2 E(-b)-.2 E 1.363
-(ug compatible replacements for the original F)-.2 F 1.364(ourth Berk)
--.15 F(ele)-.1 E 3.864(yS)-.15 G(oftw)-3.864 E(are)-.1 E(Distrib)72
-176.4 Q .745(ution \(4BSD\))-.2 F F0(ex)3.245 E F1(/)A F0(vi)A F1 3.244
-(programs. This)3.244 F .744
-(reference manual is accompanied by a traditional-style manual)3.244 F
-3.746(page. That)72 188.4 R 1.246
-(manual page describes the functionality found in)3.746 F F0(ex)3.746 E
-F1(/)A F0(vi)A F1 1.246(in f)3.746 F 1.247
-(ar less detail than the description)-.1 F 3.467(here. In)72 200.4 R
-.967(addition, it describes the system interf)3.467 F .967(ace to)-.1 F
-F0(ex)3.467 E F1(/)A F0(vi)A F1 3.467(,e)C .966
-(.g. command line options, session reco)-3.467 F -.15(ve)-.15 G(ry).15 E
-(,)-.65 E(signals, en)72 212.4 Q(vironmental v)-.4 E
-(ariables, and similar things.)-.25 E .325
-(This reference is intended for users already f)97 228.6 R .325
-(amiliar with)-.1 F F0(ex)2.825 E F1(/)A F0(vi)A F1 5.325(.A)C -.15(ny)
--5.325 G .325(one else should almost certainly).15 F .3
-(read a good tutorial on the editor \214rst.)72 240.6 R .299
-(If you are in an unf)5.3 F .299(amiliar en)-.1 F .299
-(vironment, and you absolutely ha)-.4 F .599 -.15(ve t)-.2 H(o).15 E
-1.458(get w)72 252.6 R 1.458(ork done immediately)-.1 F 3.958(,s)-.65 G
-1.458(ee the section entitled \231)-3.958 F F0 -.25(Fa)C 1.458
-(st Startup).25 F F1 3.958<9a69>C 3.958(nt)-3.958 G 1.458
-(he manual page.)-3.958 F 1.459(It is probably)6.458 F
-(enough to get you started.)72 264.6 Q .166(There are a fe)97 280.8 R
-2.666(wf)-.25 G .166(eatures in)-2.666 F F0(nex)2.666 E F1(/)A F0 -.4
-(nv)C(i).4 E F1 .166(that are not found in historic v)2.666 F .166
-(ersions of)-.15 F F0(ex)2.666 E F1(/)A F0(vi)A F1 5.165(.S)C .165
-(ome of the more)-5.165 F .656
-(interesting of those features are brie\215y described in the ne)72
-292.8 R .656(xt section, entitled \231)-.15 F F0 .656(Additional F)B
-(eatur)-.25 E(es)-.18 E F1 3.156(\232. F)B(or)-.15 E .098
-(the rest of this document,)72 304.8 R F0(nex)2.598 E F1(/)A F0 -.4(nv)C
-(i).4 E F1 .097(is used only when it is necessary to distinguish it from the historic imple-)
-2.598 F(mentations of)72 316.8 Q F0(ex)2.5 E F1(/)A F0(vi)A F1(.)A 1.046
-(Future v)97 333 R 1.046(ersions of this softw)-.15 F 1.046
-(are will be periodically made a)-.1 F -.25(va)-.2 G 1.046
-(ilable by anon).25 F 1.046(ymous ftp, and can be)-.15 F(retrie)72 345 Q
--.15(ve)-.25 G 2.5(df).15 G(rom)-2.5 E/F2 10/Courier@0 SF
-(ftp.cs.berkeley.edu)2.5 E F1 2.5(,i)C 2.5(nt)-2.5 G(he directory)-2.5 E
-F2(ucb/4bsd)2.5 E F1(.)A F0 2.5(2. Additional)72 369 R -.25(Fe)2.5 G
-(atur).25 E(es in Nex/Nvi)-.18 E F1 .166(There are a fe)97 385.2 R 2.666
-(wf)-.25 G .166(eatures in)-2.666 F F0(nex)2.666 E F1(/)A F0 -.4(nv)C(i)
-.4 E F1 .166(that are not found in historic v)2.666 F .166(ersions of)
--.15 F F0(ex)2.666 E F1(/)A F0(vi)A F1 5.165(.S)C .165(ome of the more)
--5.165 F(interesting of these are as follo)72 397.2 Q(ws:)-.25 E F0
-(8-bit clean data, lar)72 421.2 Q(ge lines, \214les)-.1 E(Nex)97 433.2 Q
-F1(/)A F0 -.4(nv)C(i).4 E F1 1.116(will edit an)3.616 F 3.616(yf)-.15 G
-1.116(ormat \214le.)-3.616 F 1.116(Line lengths are limited by a)6.116 F
--.25(va)-.2 G 1.116(ilable memory).25 F 3.617(,a)-.65 G 1.117
-(nd \214le sizes are)-3.617 F .309(limited by a)97 445.2 R -.25(va)-.2 G
-.309(ilable disk space.).25 F(The)5.309 E F0(vi)2.809 E F1(te)2.809 E
-.309(xt input mode command)-.15 F F0(<contr)2.808 E(ol-X>)-.18 E F1 .308
-(can insert an)2.808 F 2.808(yp)-.15 G(ossi-)-2.808 E(ble character v)97
-457.2 Q(alue into the te)-.25 E(xt.)-.15 E F0(Backgr)72 481.2 Q
-(ound and f)-.18 E(or)-.25 E(egr)-.18 E(ound scr)-.18 E(eens)-.18 E F1
-(The)97 493.2 Q F0(bg)3.543 E F1 1.043
-(command backgrounds the current screen, and the)3.543 F F0(fg)3.544 E
-F1 1.044(command fore)3.544 F 1.044(grounds backgrounded)-.15 F 2.5
-(screens. The)97 505.2 R F0(display)2.5 E F1
-(command can be used to list the background screens.)2.5 E F0
-(Command Editing)72 529.2 Q F1 -1.1(Yo)97 541.2 S 3.831(uc)1.1 G 1.331
-(an enter a normal editing windo)-3.831 F 3.831(wo)-.25 G 3.831(nt)
--3.831 G 1.331(he collected commands that you')-3.831 F 1.63 -.15(ve e)
--.5 H 1.33(ntered on the).15 F F0(vi)3.83 E F1 .942
-(colon command-line, and then modify and/or e)97 553.2 R -.15(xe)-.15 G
-.942(cute the commands.).15 F .942(See the)5.942 F F0(cedit)3.442 E F1
-.943(edit option for)3.442 F(more information.)97 565.2 Q F0(Displays)72
-589.2 Q F1(The)97 601.2 Q F0(display)2.984 E F1 .483
-(command can be used to display the current b)2.984 F(uf)-.2 E .483
-(fers, the backgrounded screens, and the)-.25 F(tags stack.)97 613.2 Q
-F0(Extended Regular Expr)72 637.2 Q(essions)-.18 E F1(The)97 649.2 Q F0
-(extended)3.387 E F1 .887(option causes Re)3.387 F .888
-(gular Expressions to be interpreted as as Extended Re)-.15 F .888
-(gular Expres-)-.15 F(sions, \(i.e.)97 661.2 Q/F3 10/Times-Italic@0 SF
--.4(eg)2.5 G -.37(re).4 G(p).37 E F1(\(1\) style Re)A
-(gular Expressions\).)-.15 E F0(File Name Completion)72 685.2 Q F1 .724
-(It is possible to do \214le name completion and \214le name displays when entering commands on the)
-97 697.2 R F0(vi)3.223 E F1(colon command-line.)97 709.2 Q(See the)5 E
-F0(\214lec)2.5 E F1(option for more information.)2.5 E EP
-%%Page: 4 3
-%%BeginPageSetup
-BP
-%%EndPageSetup
-/F0 10/Times-Bold@0 SF 308.33(USD:13-4 Nvi/Nex)72 60 R(Refer)2.5 E(ence)
--.18 E(In\214nite undo)72 96 Q/F1 10/Times-Roman@0 SF .577
-(Changes made during an edit session may be rolled backw)97 108 R .577
-(ard and forw)-.1 F 3.078(ard. A)-.1 F F0(.)3.078 E F1 .578
-(command immedi-)5.578 F .098(ately after a)97 120 R F0(u)2.598 E F1
-.097(command continues either forw)2.598 F .097(ard or backw)-.1 F .097
-(ard depending on whether the)-.1 F F0(u)2.597 E F1(command)2.597 E -.1
-(wa)97 132 S 2.5(sa).1 G 2.5(nu)-2.5 G(ndo or a redo.)-2.5 E F0
-(Left-right scr)72 156 Q(olling)-.18 E F1(The)97 168 Q F0(leftright)
-4.181 E F1 1.681(option causes)4.181 F F0 -.4(nv)4.181 G(i).4 E F1 1.681
-(to do left-right screen scrolling, instead of the traditional)4.181 F
-F0(vi)4.182 E F1(line)4.182 E(wrapping.)97 180 Q F0(Message Catalogs)72
-204 Q F1 .442
-(It is possible to display informational and error messages in dif)97
-216 R .442(ferent languages by pro)-.25 F .442(viding a cata-)-.15 F
-(log of messages.)97 228 Q(See the)5 E F0(msgcat)2.5 E F1
-(option and the \214le)2.5 E/F2 10/Courier@0 SF(catalog/README)2.5 E F1
-(for more information.)2.5 E F0(Incr)72 252 Q(ementing numbers)-.18 E F1
-(The)97 264 Q F0(#)2.5 E F1
-(command increments or decrements the number referenced by the cursor)
-2.5 E(.)-.55 E F0(Pr)72 288 Q -.15(ev)-.18 G(ious \214le).15 E F1(The)97
-300 Q F0(pr)2.5 E -.15(ev)-.18 G(ious).15 E F1(command edits the pre)2.5
-E(vious \214le from the ar)-.25 E(gument list.)-.18 E F0
-(Scripting languages)72 324 Q F1(The)97 336 Q F0 1.487(:pe[rl] cmd)3.986
-F F1(,)A F0 1.487(:perld[o] cmd)3.987 F F1(and)3.987 E F0 1.487
-(:tc[l] cmd)3.987 F F1 1.487(commands e)3.987 F -.15(xe)-.15 G 1.487
-(cute Perl5 and Tcl/Tk commands,).15 F(respecti)97 348 Q -.15(ve)-.25 G
-(ly).15 E 3.329(,o)-.65 G 3.329(nl)-3.329 G .829(ines from the edit b)
--3.329 F(uf)-.2 E(fer)-.25 E 5.829(.S)-.55 G .829(ee the \231)-5.829 F
-F0 .828(Scripting Languages)B F1 3.328<9a73>C .828
-(ection and the speci\214c)-3.328 F(commands for more information.)97
-360 Q F0(Split scr)72 384 Q(eens)-.18 E F1(The)97 396 Q F0(Edit)2.951 E
-F1(,)A F0(Ex)2.951 E F1(,)A F0(Next)2.951 E F1(,)A F0(Pr)2.951 E -.15
-(ev)-.18 G(ious).15 E F1(,)A F0 -.92(Ta)2.951 G(g).92 E F1(and)2.951 E
-F0 -.37(Vi)2.951 G(sual).37 E F1(\(in)2.951 E F0(vi)2.951 E F1 .451
-(mode\) commands di)2.951 F .452(vide the screen into multi-)-.25 F .659
-(ple editing re)97 408 R .659
-(gions and then perform their normal function in a ne)-.15 F 3.158(ws)
--.25 G .658(creen area.)-3.158 F(The)5.658 E F0(<contr)3.158 E(ol-W>)
--.18 E F1 1.739(command rotates between the fore)97 420 R 1.739
-(ground screens.)-.15 F(The)6.739 E F0 -.18(re)4.239 G(size).18 E F1
-1.74(command can be used to gro)4.239 F 4.24(wo)-.25 G(r)-4.24 E
-(shrink a particular screen.)97 432 Q F0 -.92(Ta)72 456 S 2.5(gs).92 G
-(tacks)-2.5 E F1 -.8(Ta)97 468 S .254(gs are no).8 F 2.754(wm)-.25 G
-.254(aintained in a stack.)-2.754 F(The)5.254 E F0(<contr)2.754 E(ol-T>)
--.18 E F1 .254(command returns to the pre)2.754 F .254
-(vious tag location.)-.25 F(The)97 480 Q F0(tagpop)3.283 E F1 .784
-(command returns to the most recent tag location by def)3.283 F .784
-(ault, or)-.1 F 3.284(,o)-.4 G .784(ptionally to a speci\214c)-3.284 F
-.592(tag number in the tag stack, or the most recent tag from a speci\214ed \214le.)
-97 492 R(The)5.592 E F0(display)3.092 E F1 .592(command can)3.092 F
-(be used to list the tags stack.)97 504 Q(The)5 E F0(tagtop)2.5 E F1
-(command returns to the top of the tag stack.)2.5 E F0(Usage inf)72 528
-Q(ormation)-.25 E F1(The)97 540 Q F0(exusage)2.568 E F1(and)2.568 E F0
-(viusage)2.568 E F1 .068(commands pro)2.568 F .068
-(vide usage information for all of the)-.15 F F0(ex)2.568 E F1(and)2.568
-E F0(vi)2.568 E F1 .069(commands by)2.569 F(def)97 552 Q(ault, or)-.1 E
-2.5(,o)-.4 G(ptionally)-2.5 E 2.5(,f)-.65 G
-(or a speci\214c command or k)-2.5 E -.15(ey)-.1 G(.)-.5 E F0 -.75(Wo)72
-576 S(rd sear).75 E(ch)-.18 E F1(The)97 588 Q F0(<contr)2.5 E(ol-A>)-.18
-E F1(command searches for the w)2.5 E(ord referenced by the cursor)-.1 E
-(.)-.55 E F0 2.5(3. Startup)72 612 R(Inf)2.5 E(ormation)-.25 E(Ex)97
-628.2 Q F1(/)A F0(vi)A F1 1.104(interprets one of tw)3.604 F 3.604(op)
--.1 G 1.104(ossible en)-3.604 F 1.104(vironmental v)-.4 F 1.104
-(ariables and reads up to three of \214v)-.25 F 3.604(ep)-.15 G(ossible)
--3.604 E 1.073(\214les during startup.)72 640.2 R 1.073(The v)6.073 F
-1.074(ariables and \214les are e)-.25 F 1.074(xpected to contain)-.15 F
-F0(ex)3.574 E F1 1.074(commands, not)3.574 F F0(vi)3.574 E F1 3.574
-(commands. In)3.574 F .308(addition, the)72 652.2 R 2.808(ya)-.15 G .308
-(re interpreted)-2.808 F/F3 10/Times-Italic@0 SF(befor)2.808 E(e)-.37 E
-F1 .307(the \214le to be edited is read, and therefore man)2.807 F(y)
--.15 E F0(ex)2.807 E F1 .307(commands may not)2.807 F .103(be used.)72
-664.2 R(Generally)5.103 E 2.603(,a)-.65 G .403 -.15(ny c)-2.603 H .104(ommand that requires output to the screen or that needs a \214le upon which to oper)
-.15 F(-)-.2 E
-(ate, will cause an error if included in a startup \214le or en)72 676.2
-Q(vironmental v)-.4 E(ariable.)-.25 E 1.056(Because the)97 692.4 R F0
-(ex)3.556 E F1 1.056(command set supported by)3.556 F F0(nex)3.556 E F1
-(/)A F0 -.4(nv)C(i).4 E F1 1.055
-(is a superset of the command set supported by)3.556 F 1.305
-(historical implementations of)72 704.4 R F0(ex)3.805 E F1(,)A F0(nex)
-3.805 E F1(/)A F0 -.4(nv)C(i).4 E F1 1.306
-(can use the startup \214les created for the historical implementa-)
-3.806 F(tions, b)72 716.4 Q(ut the con)-.2 E -.15(ve)-.4 G
-(rse may not be true.).15 E EP
-%%Page: 5 4
-%%BeginPageSetup
-BP
-%%EndPageSetup
-/F0 10/Times-Bold@0 SF(Nvi/Nex Refer)72 60 Q 308.33(ence USD:13-5)-.18 F
-/F1 10/Times-Roman@0 SF .425(If the)97 96 R F0<ad73>2.925 E F1 .424(\(the historic \255 option\) is speci\214ed, or if standard input is redirected from a \214le, all en)
-2.925 F(viron-)-.4 E(mental v)72 108 Q
-(ariables and startup \214les are ignored.)-.25 E
-(Otherwise, startup \214les and en)97 124.2 Q(vironmental v)-.4 E
-(ariables are handled in the follo)-.25 E(wing order:)-.25 E 12.5
-(\(1\) The)77 140.4 R(\214le)2.659 E/F2 10/Courier@0 SF(/etc/vi.exrc)
-2.659 E F1 .159(is read, as long as it is o)2.659 F .16
-(wned by root or the ef)-.25 F(fecti)-.25 E .46 -.15(ve u)-.25 H .16
-(ser ID of the user).15 F(.)-.55 E 12.5(\(2\) The)77 156.6 R(en)3.5 E 1
-(vironmental v)-.4 F(ariable)-.25 E F2(NEXINIT)3.5 E F1 .999(\(or the v)
-3.5 F(ariable)-.25 E F2(EXINIT)3.499 E F1 3.499(,i)C(f)-3.499 E F2
-(NEXINIT)3.499 E F1 .999(is not set\) is inter)3.499 F(-)-.2 E(preted.)
-103.66 168.6 Q 12.5(\(3\) If)77 184.8 R(neither)4.35 E F2(NEXINIT)4.35 E
-F1(or)4.35 E F2(EXINIT)4.35 E F1 -.1(wa)4.35 G 4.35(ss).1 G 1.85
-(et, and the)-4.35 F F2(HOME)4.35 E F1(en)4.35 E 1.85(vironmental v)-.4
-F 1.85(ariable is set, the \214le)-.25 F F2($HOME/.nexrc)103.66 196.8 Q
-F1 .531(\(or the \214le)3.031 F F2($HOME/.exrc)3.031 E F1 3.031(,i)C(f)
--3.031 E F2($HOME/.nexrc)3.031 E F1 .531(does not e)3.031 F .53
-(xist\) is read, as long)-.15 F(as the ef)103.66 208.8 Q(fecti)-.25 E .3
--.15(ve u)-.25 H(ser ID of the user is root or is the same as the o).15
-E(wner of the \214le.)-.25 E .088
-(When the $HOME directory is being used for both)103.66 232.8 R F0(nex)
-2.589 E F1(/)A F0 -.4(nv)C(i).4 E F1 .089
-(and an historic implementation of)2.589 F F0(ex)2.589 E F1(/)A F0(vi)A
-F1(,)A 3.277(ap)103.66 244.8 S .777(ossible solution is to put)-3.277 F
-F0(nex)3.276 E F1(/)A F0 -.4(nv)C(i).4 E F1 .776
-(speci\214c commands in the)3.276 F F2(.nexrc)3.276 E F1 .776
-(\214le, along with a)3.276 F F0(:sour)3.276 E(ce)-.18 E($HOME/.exr)
-103.66 256.8 Q(c)-.18 E F1
-(command to read in the commands common to both implementations.)2.5 E
-12.5(\(4\) If)77 273 R(the)4.728 E F0(exr)4.728 E(c)-.18 E F1 2.228
-(option w)4.728 F 2.228(as turned on by one of the pre)-.1 F 2.228
-(vious startup information sources, the \214le)-.25 F F2(.nexrc)103.66
-285 Q F1 .499(\(or the \214le)2.999 F F2(.exrc)2.999 E F1 2.999(,i)C(f)
--2.999 E F2(.nexrc)2.999 E F1 .499(does not e)2.999 F .499
-(xist\) is read, as long as the ef)-.15 F(fecti)-.25 E .799 -.15(ve u)
--.25 H .499(ser ID of).15 F(the user is the same as the o)103.66 297 Q
-(wner of the \214le.)-.25 E
-(No startup \214le is read if it is writable by an)97 313.2 Q
-(yone other than its o)-.15 E(wner)-.25 E(.)-.55 E
-(It is not an error for an)97 329.4 Q 2.5(yo)-.15 G 2.5(ft)-2.5 G
-(he startup en)-2.5 E(vironmental v)-.4 E(ariables or \214les not to e)
--.25 E(xist.)-.15 E 1.663(Once all en)97 345.6 R 1.663(vironmental v)-.4
-F 1.664(ariables are interpreted, and all startup \214les are read, the \214rst \214le to be)
--.25 F 1.057(edited is read in \(or a temporary \214le is created\).)72
-357.6 R 1.057(Then, an)6.057 F 3.557(yc)-.15 G 1.057
-(ommands speci\214ed using the)-3.557 F F0<ad63>3.557 E F1 1.057
-(option are)3.557 F -.15(exe)72 369.6 S(cuted, in the conte).15 E
-(xt of that \214le.)-.15 E F0 2.5(4. Reco)72 393.6 R -.1(ve)-.1 G(ry).1
-E F1 1.046(There is no reco)97 409.8 R -.15(ve)-.15 G 1.046
-(ry program for).15 F F0(nex)3.547 E F1(/)A F0 -.4(nv)C(i).4 E F1 3.547
-(,n)C 1.047(or does)-3.547 F F0(nex)3.547 E F1(/)A F0 -.4(nv)C(i).4 E F1
-1.047(run setuid.)3.547 F(Reco)6.047 E -.15(ve)-.15 G 1.047
-(ry \214les are created).15 F .001(readable and writable by the o)72
-421.8 R .001(wner only)-.25 F 5.001(.U)-.65 G .001(sers may reco)-5.001
-F -.15(ve)-.15 G 2.501(ra).15 G .3 -.15(ny \214)-2.501 H(le which the)
-.15 E 2.5(yc)-.15 G(an read, and the superuser)-2.5 E(may reco)72 433.8
-Q -.15(ve)-.15 G 2.5(ra).15 G .3 -.15(ny e)-2.5 H(dit session.).15 E
-2.989(Edit sessions are back)97 450 R 2.989
-(ed by \214les in the directory named by the)-.1 F F0 -.18(re)5.49 G
-(cdir).18 E F1 2.99(option \(the directory)5.49 F F2
-(/var/tmp/vi.recover)72 462 Q F1 .948(by def)3.448 F .947
-(ault\), and are named \231)-.1 F F0(vi.XXXXXX)A F1 .947
-(\232, where \231)B F0(XXXXXX)A F1 3.447<9a69>C 3.447(san)-3.447 G
-(umber)-3.447 E .301(related to the process ID.)72 474 R .302
-(When a \214le is \214rst modi\214ed, a second reco)5.301 F -.15(ve)-.15
-G .302(ry \214le containing an email message).15 F .989
-(for the user is created, and is named \231)72 486 R F0 -.18(re)C(co).18
-E -.1(ve)-.1 G -1(r.).1 G(XXXXXX)1 E F1 .988(\232, where, ag)B .988
-(ain, \231)-.05 F F0(XXXXXX)A F1 3.488<9a69>C 3.488(sa)-3.488 G .988
-(ssociated with)-3.488 F .598(the process ID.)72 498 R .598
-(Both \214les are remo)5.598 F -.15(ve)-.15 G 3.098(da).15 G 3.098(tt)
--3.098 G .598(he end of a normal edit session, b)-3.098 F .598
-(ut will remain if the edit ses-)-.2 F
-(sion is abnormally terminated or the user runs the)72 510 Q F0(ex pr)
-2.5 E(eser)-.18 E -.1(ve)-.1 G F1(command.)2.6 E(The)97 526.2 Q F0 -.18
-(re)2.632 G(cdir).18 E F1 .132(option may be set in either the user')
-2.632 F 2.632(so)-.55 G 2.632(rs)-2.632 G(ystem')-2.632 E 2.632(ss)-.55
-G .132(tartup information, changing the reco)-2.632 F(v-)-.15 E .2
-(ery directory)72 538.2 R 5.2(.\()-.65 G .2(Note, ho)-5.2 F(we)-.25 E
--.15(ve)-.25 G 1 -.4(r, t).15 H .201
-(hat if a memory based \214le system is used as the backup directory).4
-F 2.701(,e)-.65 G .201(ach sys-)-2.701 F .018
-(tem reboot will delete all of the reco)72 550.2 R -.15(ve)-.15 G .018
-(ry \214les!).15 F .018(The same caution applies to directories such as)
-5.018 F F2(/tmp)2.517 E F1(which)2.517 E .211
-(are cleared of their contents by a system reboot, or)72 562.2 R F2
-(/usr/tmp)2.711 E F1 .211
-(which is periodically cleared of old \214les on)2.711 F(man)72 574.2 Q
-2.5(ys)-.15 G(ystems.\))-2.5 E .008(The reco)97 590.4 R -.15(ve)-.15 G
-.008(ry directory should be o).15 F .008
-(wned by root, or at least by a pseudo-user)-.25 F 5.007(.I)-.55 G 2.507
-(na)-5.007 G .007(ddition, if directory)-2.507 F(\231stick)72 602.4 Q
-1.013(y-bit\232 semantics are a)-.15 F -.25(va)-.2 G 1.013
-(ilable, the directory should ha).25 F 1.313 -.15(ve t)-.2 H 1.013
-(he stick).15 F 1.013(y-bit set so that \214les may only be)-.15 F(remo)
-72 614.4 Q -.15(ve)-.15 G 2.529(db).15 G 2.529(yt)-2.529 G .029(heir o)
--2.529 F 2.529(wners. The)-.25 F(reco)2.528 E -.15(ve)-.15 G .028
-(ry directory must be read, write, and e).15 F -.15(xe)-.15 G .028
-(cutable by an).15 F 2.528(yu)-.15 G(ser)-2.528 E 2.528(,i)-.4 G .028
-(.e. mode)-2.528 F(1777.)72 626.4 Q .203(If the reco)97 642.6 R -.15(ve)
--.15 G .203(ry directory does not e).15 F(xist,)-.15 E F0(ex)2.703 E F1
-(/)A F0(vi)A F1 .203(will attempt to create it.)2.703 F .204
-(This can result in the reco)5.204 F -.15(ve)-.15 G(ry).15 E 1.172
-(directory being o)72 654.6 R 1.171(wned by a normal user)-.25 F 3.671
-(,w)-.4 G 1.171(hich means that that user will be able to remo)-3.671 F
-1.471 -.15(ve o)-.15 H 1.171(ther user').15 F(s)-.55 E(reco)72 666.6 Q
--.15(ve)-.15 G .38(ry and backup \214les.).15 F .38(This is anno)5.38 F
-.38(ying, b)-.1 F .38
-(ut is not a security issue as the user cannot otherwise access)-.2 F
-(or modify the \214les.)72 678.6 Q .537(The reco)97 694.8 R -.15(ve)-.15
-G .536(ry \214le has all of the necessary information in it to enable the user to reco)
-.15 F -.15(ve)-.15 G 3.036(rt).15 G .536(he edit ses-)-3.036 F 3.128
-(sion. In)72 706.8 R .628
-(addition, it has all of the necessary email headers for)3.128 F/F3 10
-/Times-Italic@0 SF(sendmail)3.128 E F1 3.128(\(8\). When)B .629
-(the system is rebooted,)3.129 F .682(all of the \214les in)72 718.8 R
-F2(/var/tmp/vi.recover)3.182 E F1 .682(named \231)3.182 F F0 -.18(re)C
-(co).18 E -.1(ve)-.1 G -1(r.).1 G(XXXXXX)1 E F1 3.181<9a73>C .681
-(hould be sent to their o)-3.181 F(wners,)-.25 E EP
-%%Page: 6 5
-%%BeginPageSetup
-BP
-%%EndPageSetup
-/F0 10/Times-Bold@0 SF 308.33(USD:13-6 Nvi/Nex)72 60 R(Refer)2.5 E(ence)
--.18 E/F1 10/Times-Roman@0 SF 1.007(by email, using the)72 96 R F0<ad74>
-3.507 E F1 1.008(option of)3.508 F F0(sendmail)3.508 E F1 1.008
-(\(or a similar mechanism in other mailers\).)3.508 F(If)6.008 E F0(ex)
-3.508 E F1(/)A F0(vi)A F1(recei)3.508 E -.15(ve)-.25 G 3.508(sa).15 G
-.017(hangup \(SIGHUP\) signal, or the user e)72 108 R -.15(xe)-.15 G
-.017(cutes the).15 F F0 .017(ex pr)2.517 F(eser)-.18 E -.1(ve)-.1 G F1
-(command,)2.617 E F0(ex)2.516 E F1(/)A F0(vi)A F1 .016
-(will automatically email the)2.516 F(reco)72 120 Q -.15(ve)-.15 G
-(ry information to the user).15 E(.)-.55 E .538
-(If your system does not ha)97 136.2 R .838 -.15(ve t)-.2 H(he).15 E F0
-(sendmail)3.038 E F1 .538
-(utility \(or a mailer program which supports its interf)3.038 F(ace\))
--.1 E .723(the source \214le)72 148.2 R/F2 10/Courier@0 SF
-(nvi/common/recover.c)3.223 E F1 .723(will ha)3.223 F 1.023 -.15(ve t)
--.2 H 3.223(ob).15 G 3.223(em)-3.223 G .722
-(odi\214ed to use your local mail deli)-3.223 F -.15(ve)-.25 G .722
-(ry pro-).15 F 2.794(grams. Note,)72 160.2 R(if)2.794 E F0(nex)2.794 E
-F1(/)A F0 -.4(nv)C(i).4 E F1 .295(is changed to use another mailer)2.794
-F 2.795(,i)-.4 G 2.795(ti)-2.795 G 2.795(si)-2.795 G .295
-(mportant to remember that the o)-2.795 F .295(wner of the)-.25 F .024
-(\214le gi)72 172.2 R -.15(ve)-.25 G 2.524(nt).15 G 2.524(ot)-2.524 G
-.023(he mailer is the)-2.524 F F0(nex)2.523 E F1(/)A F0 -.4(nv)C(i).4 E
-F1(user)2.523 E 2.523(,s)-.4 G 2.523(on)-2.523 G .023
-(othing in the \214le should be trusted as it may ha)-2.523 F .323 -.15
-(ve b)-.2 H .023(een modi-).15 F(\214ed in an ef)72 184.2 Q
-(fort to compromise the system.)-.25 E(Finally)97 200.4 Q 3.162(,t)-.65
-G .662(he o)-3.162 F .662(wner e)-.25 F -.15(xe)-.15 G .662
-(cute bit is set on backup \214les when the).15 F 3.162(ya)-.15 G .663
-(re created, and unset when the)-3.162 F 3.163(ya)-.15 G(re)-3.163 E
-.586(\214rst modi\214ed, e.g. backup \214les that ha)72 212.4 R .886
--.15(ve n)-.2 H 3.086(oa).15 G .586(ssociated email reco)-3.086 F -.15
-(ve)-.15 G .586(ry \214le will ha).15 F .886 -.15(ve t)-.2 H .586
-(his bit set.).15 F .586(\(There is)5.586 F 1.382(also a small windo)72
-224.4 R 3.883(ww)-.25 G 1.383
-(here empty \214les can be created and not yet ha)-3.883 F 1.683 -.15
-(ve t)-.2 H 1.383(his bit set.).15 F 1.383(This is due to the)6.383 F
-(method in which the \214les are created.\))72 236.4 Q
-(Such \214les should be deleted when the system reboots.)5 E 6.329(As)97
-252.6 S 3.829(imple w)-6.329 F 3.828
-(ay to do this cleanup is to insert the follo)-.1 F 3.828
-(wing Bourne shell script into your)-.25 F F2(/etc/rc.local)72 264.6 Q
-F1 .46(\(or other startup\) \214le.)2.96 F .461(The script should w)5.46
-F .461(ork with the historic Bourne shell, a POSIX)-.1 F .403
-(1003.2 shell or the K)72 276.6 R .403(orn shell.)-.35 F .403(\(A cop)
-5.403 F 2.903(yo)-.1 G 2.903(ft)-2.903 G .403(his script is included as)
--2.903 F F2(nvi/install/recover.script)2.902 E F1(in the)72 288.6 Q F0
-(nex)2.5 E F1(/)A F0 -.4(nv)C(i).4 E F1(distrib)2.5 E(ution.\))-.2 E EP
-%%Page: 7 6
-%%BeginPageSetup
-BP
-%%EndPageSetup
-/F0 10/Times-Bold@0 SF(Nvi/Nex Refer)72 60 Q 308.33(ence USD:13-7)-.18 F
-/F1 10/Courier@0 SF 30(#@)112 96 S 30(\(#\)recover.script 8.7)-30 F
-(\(Berkeley\) 8/16/94)6 E(#)112 108 Q 6(#S)112 120 S
-(cript to recover nvi edit sessions.)-6 E(#)112 132 Q
-(RECDIR=/var/tmp/vi.recover)112 144 Q(SENDMAIL=/usr/lib/sendmail)112 156
-Q(echo 'Recovering nvi editor sessions.')112 168 Q 6(#C)112 192 S
-(heck editor backup files.)-6 E(vibackup=`echo $RECDIR/vi.*`)112 204 Q
-(if [ "$vibackup" != "$RECDIR/vi.*" ]; then)112 216 Q
-(for i in $vibackup; do)148 228 Q 6(#O)184 240 S
-(nly test files that are readable.)-6 E(if test ! -r $i; then)184 252 Q
-(continue)220 264 Q(fi)184 276 Q 6(#U)184 300 S
-(nmodified nvi editor backup files either have the)-6 E 6(#e)184 312 S
-(xecute bit set or are zero length.)-6 E(Delete them.)12 E
-(if test -x $i -o ! -s $i; then)184 324 Q(rm $i)220 336 Q(fi)184 348 Q
-(done)148 360 Q(fi)112 372 Q 6(#I)112 396 S 6(ti)-6 G 6(sp)-6 G
-(ossible to get incomplete recovery files, if the editor crashes)-6 E 6
-(#a)112 408 S 6(tt)-6 G(he right time.)-6 E
-(virecovery=`echo $RECDIR/recover.*`)112 420 Q
-(if [ "$virecovery" != "$RECDIR/recover.*" ]; then)112 432 Q
-(for i in $virecovery; do)148 444 Q 6(#O)184 456 S
-(nly test files that are readable.)-6 E(if test ! -r $i; then)184 468 Q
-(continue)220 480 Q(fi)184 492 Q 6(#D)184 516 S
-(elete any recovery files that are zero length, corrupted,)-6 E 6(#o)184
-528 S 6(rt)-6 G(hat have no corresponding backup file.)-6 E
-(Else send mail)12 E 6(#t)184 540 S 6(ot)-6 G(he user.)-6 E
-(recfile=`awk '/^X-vi-recover-path:/{print $2}' < $i`)184 552 Q
-(if test -n "$recfile" -a -s "$recfile"; then)184 564 Q
-($SENDMAIL -t < $i)220 576 Q(else)184 588 Q(rm $i)220 600 Q(fi)184 612 Q
-(done)148 624 Q(fi)112 636 Q/F2 10/Times-Roman@0 SF 1.281
-(If you are not using the def)97 668.4 R 1.282(ault v)-.1 F 1.282
-(alue for the)-.25 F F0 -.18(re)3.782 G(cdir).18 E F2 1.282
-(option, be sure to substitute the v)3.782 F 1.282(alue you')-.25 F(re)
--.5 E(using for the)72 680.4 Q F1(RECDIR)2.5 E F2 -.25(va)2.5 G
-(lue in the reco).25 E -.15(ve)-.15 G(ry script.).15 E 4.219
-(If the path of your system')97 696.6 R(s)-.55 E F0(sendmail)6.719 E F2
-4.219(program \(or whate)6.719 F -.15(ve)-.25 G 6.718(rm).15 G 4.218
-(ailer you')-6.718 F 4.218(re using\) is not)-.5 F F1(/usr/lib/sendmail)
-72 708.6 Q F2 2.695(,b)C 2.695(es)-2.695 G .196
-(ure to substitute the correct pathname for the)-2.695 F F1(SENDMAIL)
-2.696 E F2 -.25(va)2.696 G .196(lue in the reco).25 F(v-)-.15 E
-(ery script.)72 720.6 Q(Consult the manual page for details on reco)5 E
--.15(ve)-.15 G(ring preserv).15 E(ed or aborted editing sessions.)-.15 E
-EP
-%%Page: 8 7
-%%BeginPageSetup
-BP
-%%EndPageSetup
-/F0 10/Times-Bold@0 SF 308.33(USD:13-8 Nvi/Nex)72 60 R(Refer)2.5 E(ence)
--.18 E 2.5(5. Sizing)72 96 R(the Scr)2.5 E(een)-.18 E/F1 10
-/Times-Roman@0 SF .745
-(The size of the screen can be set in a number of w)97 112.2 R(ays.)-.1
-E F0(Ex)5.745 E F1(/)A F0(vi)A F1(tak)3.245 E .744(es the follo)-.1 F
-.744(wing steps until v)-.25 F(alues)-.25 E
-(are obtained for both the number of ro)72 124.2 Q
-(ws and number of columns in the screen.)-.25 E 12.5(\(1\) If)77 140.4 R
-(the en)2.5 E(vironmental v)-.4 E(ariable)-.25 E/F2 10/Courier@0 SF
-(LINES)2.5 E F1 -.15(ex)2.5 G
-(ists, it is used to specify the number of ro).15 E(ws in the screen.)
--.25 E 12.5(\(2\) If)77 156.6 R .799(the en)3.299 F .799(vironmental v)
--.4 F(ariable)-.25 E F2(COLUMNS)3.299 E F1 -.15(ex)3.299 G .8
-(ists, it is used to specify the number of columns in the).15 F(screen.)
-103.66 168.6 Q 12.5(\(3\) The)77 184.8 R(TIOCGWINSZ)2.5 E/F3 10
-/Times-Italic@0 SF(ioctl)2.5 E F1
-(\(2\) is attempted on the standard error \214le descriptor)A(.)-.55 E
-12.5(\(4\) The)77 201 R .848
-(termcap entry \(or terminfo entry on System V machines\) is check)3.348
-F .847(ed for the \231li\232 entry \(ro)-.1 F(ws\))-.25 E
-(and the \231co\232 entry \(columns\).)103.66 213 Q 12.5(\(5\) The)77
-229.2 R(number of ro)2.5 E
-(ws is set to 24, and the number of columns is set to 80.)-.25 E .314
-(If a windo)97 245.4 R 2.814(wc)-.25 G .314
-(hange size signal \(SIGWINCH\) is recei)-2.814 F -.15(ve)-.25 G .314
-(d, the ne).15 F 2.815(ww)-.25 G(indo)-2.815 E 2.815(ws)-.25 G .315
-(ize is retrie)-2.815 F -.15(ve)-.25 G 2.815(du).15 G .315(sing the)
--2.815 F(TIOCGWINSZ)72 257.4 Q F3(ioctl)2.5 E F1
-(\(2\) call, and all other information is ignored.)A F0 2.5
-(6. Character)72 281.4 R(Display)2.5 E F1 .444(In both)97 297.6 R F0(ex)
-2.944 E F1(and)2.943 E F0(vi)2.943 E F1 .443
-(printable characters as de\214ned by)2.943 F F3(isprint)2.943 E F1 .443
-(\(3\) are displayed using the local character)B(set.)72 309.6 Q .066
-(Non-printable characters, for which)97 325.8 R F3(iscntrl)2.566 E F1
-.066(\(3\) returns true, and which are less than octal \\040, are dis-)B
-.233(played as the string \231)72 337.8 R F2(^<character>)A F1 .232
-(\232, where)B F2(<character>)2.732 E F1 .232
-(is the character that is the original charac-)2.732 F(ter')72 349.8 Q
-2.603(sv)-.55 G .103(alue of)-2.853 F .103(fset from the \231)-.25 F F2
-(@)A F1 2.603<9a63>C(haracter)-2.603 E 5.103(.F)-.55 G .103(or e)-5.253
-F .103(xample, the octal character \\001 is displayed as \231)-.15 F F2
-(^A)A F1 2.604(\232. If)B F3(isc-)2.604 E(ntrl)72 361.8 Q F1 .638(\(3\) returns true for the octal character \\177, it is displayed as the string \231)
-B F2(^?)A F1 3.138(\232. All)B .638(other characters are)3.138 F 1.65
-(displayed as either he)72 373.8 R 1.65(xadecimal v)-.15 F 1.65
-(alues, in the form \231)-.25 F F2 1.65
-(0x<high-halfbyte> ... 0x<low-half-)B(byte>)72 385.8 Q F1 2.728
-(\232, or as octal v)B 2.728(alues, in the form \231)-.25 F F2 2.728
-(\\<high-one-or-two-bits> ... \\<low-three-)B(bits>)72 397.8 Q F1 2.5
-(\232. The)B(display of unkno)2.5 E(wn characters is based on the v)-.25
-E(alue of the)-.25 E F0(octal)2.5 E F1(option.)2.5 E(In)97 414 Q F0(vi)
-2.802 E F1 .302(command mode, the cursor is al)2.802 F -.1(wa)-.1 G .303
-(ys positioned on the last column of characters which tak).1 F 2.803(eu)
--.1 G(p)-2.803 E .457(more than one column on the screen.)72 426 R(In)
-5.457 E F0(vi)2.957 E F1(te)2.957 E .456
-(xt input mode, the cursor is positioned on the \214rst column of)-.15 F
-(characters which tak)72 438 Q 2.5(eu)-.1 G 2.5(pm)-2.5 G
-(ore than one column on the screen.)-2.5 E F0 2.5(7. Multiple)72 462 R
-(Scr)2.5 E(eens)-.18 E(Nvi)97 478.2 Q F1 .16
-(supports multiple screens by di)2.66 F .16(viding the windo)-.25 F 2.66
-(wi)-.25 G .16(nto re)-2.66 F 2.66(gions. It)-.15 F .16
-(also supports stacks of screens)2.66 F(by permitting the user to change the set of screens that are currently displayed.)
-72 490.2 Q(The)97 506.4 Q F0(Edit)2.71 E F1(,)A F0(Ex)2.71 E F1(,)A F0
-(Next)2.71 E F1(,)A F0(Pr)2.71 E -.15(ev)-.18 G(ious).15 E F1(,)A F0
--.92(Ta)2.71 G(g).92 E F1(and)2.71 E F0 -.37(Vi)2.709 G(sual).37 E F1
-(\(in)2.709 E F0(vi)2.709 E F1 .209(mode\) commands di)2.709 F .209
-(vide the current screen into)-.25 F(tw)72 518.4 Q 3.447(or)-.1 G -.15
-(eg)-3.447 G .947(ions of approximately equal size and then perform their usual action in a ne)
-.15 F 3.448(ws)-.25 G .948(creen area.)-3.448 F .948(If the)5.948 F .712
-(cursor is in the lo)72 530.4 R .712
-(wer half of the screen, the screen will split up, i.e. the ne)-.25 F
-3.212(ws)-.25 G .711(creen will be abo)-3.212 F 1.011 -.15(ve t)-.15 H
-.711(he old).15 F 2.5(one. If)72 542.4 R
-(the cursor is in the upper half of the screen, the ne)2.5 E 2.5(ws)-.25
-G(creen will be belo)-2.5 E 2.5(wt)-.25 G(he old one.)-2.5 E .665
-(When more than one screen is editing a \214le, changes in an)97 558.6 R
-3.166(ys)-.15 G .666(creen are re\215ected in all other screens)-3.166 F
-.055(editing the same \214le.)72 570.6 R .055
-(Exiting a screen without sa)5.055 F .055(ving an)-.2 F 2.555(yc)-.15 G
-.055(hanges \(or e)-2.555 F .055(xplicitly discarding them\) is permit-)
--.15 F(ted until the last screen editing the \214le is e)72 582.6 Q
-(xited, at which time the changes must be sa)-.15 E -.15(ve)-.2 G 2.5
-(do).15 G 2.5(rd)-2.5 G(iscarded.)-2.5 E(The)97 598.8 Q F0 -.18(re)2.868
-G(size).18 E F1 .368(command permits resizing of indi)2.868 F .369
-(vidual screens.)-.25 F .369(Screens may be gro)5.369 F .369
-(wn, shrunk or set to)-.25 F(an absolute number of ro)72 610.8 Q(ws.)
--.25 E(The)97 627 Q F0(^W)2.655 E F1 .155
-(command is used to switch between screens.)2.655 F(Each)5.154 E F0(^W)
-2.654 E F1(mo)2.654 E -.15(ve)-.15 G 2.654(st).15 G 2.654(ot)-2.654 G
-.154(he ne)-2.654 F .154(xt lo)-.15 F .154(wer screen in the)-.25 F
-(windo)72 639 Q 1.3 -.65(w, o)-.25 H 2.5(rt).65 G 2.5(ot)-2.5 G
-(he \214rst screen in the windo)-2.5 E 2.5(wi)-.25 G 2.5(ft)-2.5 G
-(here are no lo)-2.5 E(wer screens.)-.25 E(The)97 655.2 Q F0(bg)3.628 E
-F1 1.128(command \231backgrounds\232 the current screen.)3.628 F 1.129
-(The screen disappears from the windo)6.128 F 2.429 -.65(w, a)-.25 H(nd)
-.65 E 1.066(the ro)72 667.2 R 1.066(ws it occupied are tak)-.25 F 1.065
-(en o)-.1 F -.15(ve)-.15 G 3.565(rb).15 G 3.565(yan)-3.565 G 1.065
-(eighboring screen.)-3.565 F 1.065
-(It is an error to attempt to background the)6.065 F
-(only screen in the windo)72 679.2 Q -.65(w.)-.25 G(The)97 695.4 Q F0
-1.865(display scr)4.365 F(eens)-.18 E F1 1.866(command displays the names of the \214les associated with the current back-)
-4.365 F(grounded screens in the windo)72 707.4 Q -.65(w.)-.25 G EP
-%%Page: 9 8
-%%BeginPageSetup
-BP
-%%EndPageSetup
-/F0 10/Times-Bold@0 SF(Nvi/Nex Refer)72 60 Q 308.33(ence USD:13-9)-.18 F
-/F1 10/Times-Roman@0 SF(The)97 96 Q F0 .314(fg [\214le])2.814 F F1 .313
-(command \231fore)2.813 F .313(grounds\232 the \214rst screen in the list of backgrounded screens that is asso-)
--.15 F .382(ciated with its ar)72 108 R 2.882(gument. If)-.18 F .382
-(no \214le ar)2.882 F .382
-(gument is speci\214ed, the \214rst screen on the list is fore)-.18 F
-2.883(grounded. F)-.15 F(ore-)-.15 E 1.303(grounding consists of backgrounding the current screen, and replacing its space in the windo)
-72 120 R 3.802(ww)-.25 G 1.302(ith the)-3.802 F(fore)72 132 Q
-(grounded screen.)-.15 E .416(If the last screen in the windo)97 148.2 R
-2.917(wi)-.25 G 2.917(se)-2.917 G .417
-(xited, and there are backgrounded screens, the \214rst screen on the)
--3.067 F(list of backgrounded screens tak)72 160.2 Q(es o)-.1 E -.15(ve)
--.15 G 2.5(rt).15 G(he windo)-2.5 E -.65(w.)-.25 G F0 2.5(8. T)72 184.2
-R(ags, T)-.92 E(ag Stacks, and Cscope)-.92 E(Nvi)97 200.4 Q F1 .537
-(supports the historic)3.037 F F0(vi)3.037 E F1 .537(tag command)3.037 F
-F0(<contr)3.037 E(ol-]>)-.18 E F1 3.037(,a)C .537(nd the historic)-3.037
-F F0(ex)3.036 E F1 .536(tag command)3.036 F F0(tag)3.036 E F1 5.536(.T)C
-(hese)-5.536 E .317(commands change the current \214le conte)72 212.4 R
-.318(xt to a ne)-.15 F 2.818(wl)-.25 G .318
-(ocation, based on information found in the)-2.818 F/F2 10/Courier@0 SF
-(tags)2.818 E F1(\214les.)2.818 E .222(If you are unf)72 224.4 R .222
-(amiliar with these commands, you should re)-.1 F(vie)-.25 E 2.722(wt)
--.25 G .222(heir description in the)-2.722 F F0(ex)2.721 E F1(and)2.721
-E F0(vi)2.721 E F1(commands)2.721 E .748(section of this manual.)72
-236.4 R -.15(Fo)5.748 G 3.248(ra).15 G .748
-(dditional information on tags \214les, see the discussion of the)-3.248
-F F0(tags)3.249 E F1 .749(edit option)3.249 F(and the system)72 248.4 Q
-/F3 10/Times-Italic@0 SF(cta)2.5 E(gs)-.1 E F1(\(1\) manual page.)A .989
-(In addition,)97 264.6 R F0 -.4(nv)3.489 G(i).4 E F1 .989
-(supports the notion of \231tags stacks\232, using the)3.489 F F0
-(<contr)3.488 E(ol-T>)-.18 E F1 3.488(command. The)3.488 F F0(<con-)
-3.488 E(tr)72 276.6 Q(ol-T>)-.18 E F1 .55
-(command returns the user to the pre)3.05 F .55(vious conte)-.25 F .55
-(xt, i.e., the last place from which a)-.15 F F0(<contr)3.05 E(ol-]>)
--.18 E F1(or)3.05 E F0(tag)72 288.6 Q F1 .264(command w)2.764 F .264
-(as entered.)-.1 F .264(These three commands pro)5.264 F .264
-(vide the basic functionality which allo)-.15 F .264(ws you to use)-.25
-F F0(vi)72 300.6 Q F1(to re)2.5 E(vie)-.25 E 2.5(ws)-.25 G
-(ource code in a structured manner)-2.5 E(.)-.55 E F0(Nvi)97 316.8 Q F1
-1.17(also pro)3.67 F 1.17(vides tw)-.15 F 3.67(oo)-.1 G 1.17(ther basic)
--3.67 F F0(ex)3.671 E F1 1.171(commands for tag support:)3.671 F F0
-(tagpop)3.671 E F1(and)3.671 E F0(tagtop)3.671 E F1 6.171(.T)C(he)-6.171
-E F0(tagpop)3.671 E F1 .395(command is identical to the)72 328.8 R F0
-(<contr)2.895 E(ol-T>)-.18 E F1 .395
-(command, with the additional functionality that you may specify)2.895 F
-.392(that modi\214cations to the current \214le are to be discarded.)72
-340.8 R .393(This cannot be done using the)5.392 F F0(<contr)2.893 E
-(ol-T>)-.18 E F1(com-)2.893 E 2.553(mand. The)72 352.8 R F0(tagtop)2.553
-E F1 .053(command discards all of the conte)2.553 F .053(xts that ha)
--.15 F .353 -.15(ve b)-.2 H .053
-(een pushed onto the tag stack, returning).15 F(to the conte)72 364.8 Q
-(xt from which the \214rst)-.15 E F0(<contr)2.5 E(ol-]>)-.18 E F1(or)2.5
-E F0(tag)2.5 E F1(command w)2.5 E(as entered.)-.1 E .957(The historic)97
-381 R F3(cta)3.457 E(gs)-.1 E F1 .957(\(1\) tags \214le format supports only a single location per tag, normally the function)
-B 1.131(declaration or structure or string de\214nition.)72 393 R 1.131
-(More sophisticated source code tools often pro)6.131 F 1.13
-(vide multiple)-.15 F .402(locations per tag, e.g., a list of the places from which a function is called or a string de\214nition is used.)
-72 405 R(An)5.402 E -.15(ex)72 417 S
-(ample of this functionality is the System V source code tool,).15 E F0
-(cscope)2.5 E F1(.)A F0(Cscope)72 441 Q F1 .103(creates a database of information on source code \214les, and supports a query language for that infor)
-2.603 F(-)-.2 E .38(mation as described in the)72 453 R F3(cscope)2.88 E
-F1 .38(\(1\) manual page.)B F0(Nvi)5.381 E F1 .381(contains an interf)
-2.881 F .381(ace to the)-.1 F F0(cscope)2.881 E F1 .381(query language)
-2.881 F 1.378(which permits you to query)72 465 R F0(cscope)3.878 E F1
-1.377(and then sequentially step through the locations in the sources \214les)
-3.878 F(which)72 477 Q F0(cscope)3.835 E F1 3.835(returns. There)3.835 F
-1.335(are tw)3.835 F(o)-.1 E F0 -.4(nv)3.835 G(i).4 E F1 1.336
-(commands which support this ability to step through multiple)3.835 F
-2.515(locations. The)72 489 R 2.515(ya)-.15 G .015(re the)-2.515 F F0
-(ex)2.515 E F1(commands)2.515 E F0(tagnext)2.515 E F1(and)2.514 E F0
-(tagpr)2.514 E -.15(ev)-.18 G F1 5.014(.T).15 G(he)-5.014 E F0(tagnext)
-2.514 E F1 .014(command mo)2.514 F -.15(ve)-.15 G 2.514(st).15 G 2.514
-(ot)-2.514 G .014(he ne)-2.514 F .014(xt loca-)-.15 F .164
-(tion for the current tag.)72 501 R(The)5.164 E F0(tagpr)2.664 E -.15
-(ev)-.18 G F1 .164(command mo)2.814 F -.15(ve)-.15 G 2.664(st).15 G
-2.664(ot)-2.664 G .165(he pre)-2.664 F .165
-(vious location for the current tag.)-.25 F .165(\(See the)5.165 F F0
-(tagnext)72 513 Q F1(and)3.456 E F0(tagpr)3.456 E -.15(ev)-.18 G F1 .956
-(command discussion in the)3.606 F F0(ex)3.455 E F1 .955
-(commands section of this manual for more informa-)3.455 F 3.167
-(tion.\) At)72 525 R(an)3.167 E 3.167(yt)-.15 G .667
-(ime during this sequential w)-3.167 F .668(alk, you may use the)-.1 F
-F0(<contr)3.168 E(ol-]>)-.18 E F1(,)A F0(tag)3.168 E F1(or)3.168 E F0
-(cscope)3.168 E F1 .668(commands to)3.168 F(mo)72 537 Q .432 -.15(ve t)
--.15 H 2.632(oan).15 G .632 -.25(ew t)-2.632 H .132(ag conte).25 F .132
-(xt, and then use the)-.15 F F0(<contr)2.632 E(ol-T>)-.18 E F1(or)2.632
-E F0(tagpop)2.632 E F1 .131(commands to return and continue step-)2.631
-F .624(ping through the locations for this tag.)72 549 R .625
-(This is similar to the pre)5.625 F .625
-(vious model of a simple tag stack, e)-.25 F(xcept)-.15 E
-(that each entry in the tag stack may ha)72 561 Q .3 -.15(ve m)-.2 H
-(ore than one \214le conte).15 E(xt that is of interest.)-.15 E .555
-(Although there is no widely distrib)97 577.2 R .555(uted v)-.2 F .555
-(ersion of)-.15 F F3(cta)3.055 E(gs)-.1 E F1 .554
-(\(1\) that creates tags \214les with multiple loca-)B .568
-(tions per tag,)72 589.2 R F0 -.4(nv)3.068 G(i).4 E F1 .568
-(has been written to understand the ob)3.068 F .568(vious e)-.15 F .569
-(xtension to the historic tags \214le format, i.e.,)-.15 F 1.044(more than a single line in the tags \214le with the same initial tag name.)
-72 601.2 R 1.043(If you wish to e)6.043 F 1.043(xtend your)-.15 F F0
-(ctags)3.543 E F1 1.657(implementation or other tool with which you b)72
-613.2 R 1.657(uild tags \214les, this e)-.2 F 1.657
-(xtension should be simple and will)-.15 F(require no changes to)72
-625.2 Q F0 -.4(nv)2.5 G(i).4 E F1(.)A(The)97 641.4 Q F0 -.4(nv)2.599 G
-(i).4 E F1(and)2.599 E F0(cscope)2.599 E F1(interf)2.599 E .099
-(ace is based on the ne)-.1 F(w)-.25 E F0(ex)2.599 E F1(command)2.599 E
-F0(cscope)2.599 E F1 2.598(,w)C .098(hich has \214v)-2.598 F 2.598(es)
--.15 G(ubcommands:)-2.598 E F0(add)72 653.4 Q F1(,)A F0(\214nd)2.669 E
-F1(,)A F0(help)2.669 E F1(,)A F0(kill)2.669 E F1(and)2.669 E F0 -.18(re)
-2.669 G(set).18 E F1 5.169(.T)C .169(he subcommand)-5.169 F F0(\214nd)
-2.669 E F1 .17(itself has eight subcommands:)2.669 F F0(c)2.67 E F1(,)A
-F0(d)2.67 E F1(,)A F0(e)2.67 E F1(,)A F0(f)2.67 E F1(,)A F0(g)2.67 E F1
-(,)A F0(i)2.67 E F1(,)A F0(s)2.67 E F1(and)2.67 E F0(t)2.67 E F1(.)A F0
-(cs[cope] a[dd] dir)72 669.6 Q(ectory)-.18 E F1(The)97 681.6 Q F0(add)
-3.034 E F1 .534(command attaches to the)3.034 F F0(cscope)3.033 E F1
-.533(database in the speci\214ed directory)3.033 F 5.533(.T)-.65 G .533
-(he directory name is)-5.533 F -.15(ex)97 693.6 S 1.069
-(panded using the standard \214lename e).15 F 3.569(xpansions. After)
--.15 F F0 -.4(nv)3.569 G(i).4 E F1 1.069(attaches to a ne)3.569 F 3.57
-(wd)-.25 G 1.07(atabase, all subse-)-3.57 F(quent)97 705.6 Q F0(cscope)
-3.078 E F1 .578(queries will be ask)3.078 F .578(ed of that database.)
--.1 F .578(The result of an)5.578 F 3.077(ys)-.15 G .577
-(ingle query is the collection)-3.077 F
-(of responses from all of the databases to the query)97 717.6 Q(.)-.65 E
-EP
-%%Page: 10 9
-%%BeginPageSetup
-BP
-%%EndPageSetup
-/F0 10/Times-Bold@0 SF 303.33(USD:13-10 Nvi/Nex)72 60 R(Refer)2.5 E
-(ence)-.18 E/F1 10/Times-Roman@0 SF 2.511(If the \231CSCOPE_DIRS\232 en)
-97 96 R 2.511(vironmental v)-.4 F 2.511(ariable is set when)-.25 F F0
--.4(nv)5.011 G(i).4 E F1 2.511(is run, it is e)5.011 F 2.512
-(xpected to be a)-.15 F
-(<blank>-separated list of directories containing)97 108 Q F0(cscope)2.5
-E F1(databases to which the user wishes to attach.)2.5 E F0
-(:cs[cope] f[ind] c|d|e|f|g|i|s|t b)72 132 Q(uffer|patter)-.2 E(n)-.15 E
-F1(The)97 144 Q F0(\214nd)2.6 E F1 .1(command is the)2.6 F F0(cscope)2.6
-E F1 .099(query command for)2.6 F F0 -.4(nv)2.599 G(i).4 E F1 5.099(.F)C
-.099(or this command,)-5.249 F F0 -.4(nv)2.599 G(i).4 E F1 .099
-(queries all attached)2.599 F F0(cscope)97 156 Q F1 .226
-(databases for the pattern.)2.726 F .226
-(If the pattern is a double-quote character follo)5.226 F .227
-(wed by a v)-.25 F .227(alid b)-.25 F(uf)-.2 E(fer)-.25 E .402
-(name \(e.g.,)97 168 R/F2 10/Courier@0 SF("<character>)2.902 E F1 .401
-(\), then the contents of the named b)B(uf)-.2 E .401
-(fer are used as the pattern.)-.25 F(Other)5.401 E(-)-.2 E
-(wise, the pattern is a Re)97 180 Q(gular Expression.)-.15 E(The)97 204
-Q F0(\214nd)3.095 E F1 .596(command pushes the current location onto the tags stack, and switches to the \214rst location)
-3.095 F(resulting from the query)97 216 Q 2.5(,i)-.65 G 2.5(ft)-2.5 G
-(he query returned at least one result.)-2.5 E .463
-(File names returned by the)97 240 R F0(cscope)2.963 E F1(query)2.963 E
-2.963(,i)-.65 G 2.963(fn)-2.963 G .463
-(ot absolute paths, are searched for relati)-2.963 F .763 -.15(ve t)-.25
-H 2.963(ot).15 G .462(he direc-)-2.963 F .443(tory where the)97 252 R F0
-(cscope)2.943 E F1 .443(database is located.)2.943 F .443
-(In addition, if the \214le \231cscope.tpath\232 appears in the same)
-5.443 F .89(directory as the)97 264 R F0(cscope)3.39 E F1 .89
-(database, it is e)3.39 F .89
-(xpected to contain a colon-separated list of directory names)-.15 F
-(where \214les referenced by its associated)97 276 Q F0(cscope)2.5 E F1
-(database may be found.)2.5 E(The)97 300 Q F0(\214nd)2.5 E F1
-(subcommand is one of the follo)2.5 E(wing:)-.25 E 40.56(cF)97 324 S
-(ind callers of the name.)-40.56 E 40(dF)97 336 S
-(ind all function calls made from name.)-40 E 40.56(eF)97 348 S
-(ind pattern.)-40.56 E 41.67(fF)97 360 S
-(ind \214les with name as substring.)-41.67 E 40(gF)97 372 S
-(ind de\214nition of name.)-40 E 42.22(iF)97 384 S
-(ind \214les #including name.)-42.22 E 41.11(sF)97 396 S
-(ind all uses of name.)-41.11 E 42.22(tF)97 408 S
-(ind assignments to name.)-42.22 E F0(:cs[cope] h[elp] [command])72 432
-Q F1(List the)97 444 Q F0(cscope)2.5 E F1
-(commands, or optionally list usage help for an)2.5 E 2.5(ys)-.15 G
-(ingle)-2.5 E F0(cscope)2.5 E F1(command.)2.5 E F0
-(:display c[onnections])72 468 Q F1(Display the list of)97 480 Q F0
-(cscope)2.5 E F1(databases to which)2.5 E F0 -.4(nv)2.5 G(i).4 E F1
-(is currently connected.)2.5 E F0(:cs[cope] k[ill] #)72 504 Q F1 .638
-(Disconnect from a speci\214c)97 516 R F0(cscope)3.138 E F1 3.139
-(database. The)3.138 F .639
-(connection number is the one displayed by the)3.139 F F0(ex)3.139 E
-(display connections)97 528 Q F1(command.)2.5 E F0(:cs[cope] r[eset])72
-552 Q F1(Disconnect from all attached)97 564 Q F0(cscope)2.5 E F1
-(databases.)2.5 E .87(Cscope is not freely redistrib)97 580.2 R .869
-(utable softw)-.2 F .869(are, b)-.1 F .869(ut is f)-.2 F .869(airly ine)
--.1 F(xpensi)-.15 E 1.169 -.15(ve a)-.25 H .869(nd easily a).15 F -.25
-(va)-.2 G 3.369(ilable. T).25 F 3.369(op)-.8 G(ur)-3.369 E(-)-.2 E
-(chase a cop)72 592.2 Q 2.5(yo)-.1 G(f)-2.5 E F0(cscope)2.5 E F1 2.5(,s)
-C(ee http://www)-2.5 E(.att.com/ssg/products/toolchest.html.)-.65 E F0
-2.5(9. Regular)72 616.2 R(Expr)2.5 E(essions and Replacement Strings)
--.18 E F1(Re)97 632.4 Q 1.085(gular e)-.15 F 1.086
-(xpressions are used in line addresses, as the \214rst part of the)-.15
-F F0 1.086(ex substitute)3.586 F F1(,)A F0(global)3.586 E F1 3.586(,a)C
-(nd)-3.586 E F0(v)3.586 E F1(commands, and in search patterns.)72 644.4
-Q .992(The re)97 660.6 R .992(gular e)-.15 F .992
-(xpressions supported by)-.15 F F0(ex)3.492 E F1(/)A F0(vi)A F1 .992
-(are, by def)3.492 F .991(ault, the Basic Re)-.1 F .991
-(gular Expressions \(BRE')-.15 F(s\))-.55 E .676
-(described in the IEEE POSIX Standard 1003.2.)72 672.6 R(The)5.676 E F0
-(extended)3.176 E F1 .676(option causes all re)3.176 F .676(gular e)-.15
-F .676(xpressions to be)-.15 F 1.562(interpreted as the Extended Re)72
-684.6 R 1.562(gular Expressions \(ERE')-.15 F 1.561
-(s\) described by the same standard.)-.55 F(\(See)6.561 E/F3 10
-/Times-Italic@0 SF -.37(re)4.061 G(_for).37 E(-)-.2 E(mat)72 696.6 Q F1
-.575(\(7\) for more information.\))B .576(Generally speaking, BRE')5.575
-F 3.076(sa)-.55 G .576(re the Re)-3.076 F .576
-(gular Expressions found in)-.15 F F3(ed)3.076 E F1 .576(\(1\) and)B F3
-(gr)72 708.6 Q(ep)-.37 E F1(\(1\), and ERE')A 2.5(sa)-.55 G(re the Re)
--2.5 E(gular Expressions found in)-.15 E F3 -.4(eg)2.5 G -.37(re).4 G(p)
-.37 E F1(\(1\).)A EP
-%%Page: 11 10
-%%BeginPageSetup
-BP
-%%EndPageSetup
-/F0 10/Times-Bold@0 SF(Nvi/Nex Refer)72 60 Q 303.33(ence USD:13-11)-.18
-F/F1 10/Times-Roman@0 SF .265(The follo)97 96 R .265
-(wing is not intended to pro)-.25 F .265(vide a description of Re)-.15 F
-.265(gular Expressions.)-.15 F .265(The information here)5.265 F .559
-(only describes strings and characters which ha)72 108 R .859 -.15(ve s)
--.2 H .559(pecial meanings in the).15 F F0(ex)3.06 E F1(/)A F0(vi)A F1
--.15(ve)3.06 G .56(rsion of RE').15 F .56(s, or options)-.55 F
-(which change the meanings of characters that normally ha)72 120 Q .3
--.15(ve s)-.2 H(pecial meanings in RE').15 E(s.)-.55 E 12.5(\(1\) An)77
-136.2 R(empty RE \(e.g.)2.5 E<99>5 E/F2 10/Courier@0 SF(//)A F1 2.5
-<9a6f>C 2.5<7299>-2.5 G F2(??)-2.5 E F1 5<9a69>C 2.5(se)-5 G(qui)-2.5 E
--.25(va)-.25 G(lent to the last RE used.).25 E 12.5(\(2\) The)77 152.4 R
-(construct \231)2.5 E F2(\\<)A F1 2.5<9a6d>C(atches the be)-2.5 E
-(ginning of a w)-.15 E(ord.)-.1 E 12.5(\(3\) The)77 168.6 R
-(construct \231)2.5 E F2(\\>)A F1 2.5<9a6d>C(atches the end of a w)-2.5
-E(ord.)-.1 E 12.5(\(4\) The)77 184.8 R(character \231)2.5 E F2(~)A F1
-2.5<9a6d>C(atches the replacement part of the last)-2.5 E F0(substitute)
-2.5 E F1(command.)2.5 E .849(When the)97 201 R F0(magic)3.349 E F1 .849
-(option is)3.349 F/F3 10/Times-Italic@0 SF(not)3.349 E F1 .849
-(set, the only characters with special meanings are a \231)3.349 F F2(^)
-A F1 3.348<9a63>C .848(haracter at)-3.348 F .542(the be)72 213 R .542
-(ginning of an RE, a \231)-.15 F F2($)A F1 3.042<9a63>C .543
-(haracter at the end of an RE, and the escaping character \231)-3.042 F
-F2(\\)A F1 3.043(\232. The)B(charac-)3.043 E .188(ters \231)72 225 R F2
-(.)A F1 .188<9a2c2099>B F2(*)A F1 .188<9a2c2099>B F2([)A F1 2.688<9a61>C
-.188(nd \231)-2.688 F F2(~)A F1 2.688<9a61>C .187
-(re treated as ordinary characters unless preceded by a \231)-2.688 F F2
-(\\)A F1 .187(\232; when preceded by a)B<99>72 237 Q F2(\\)A F1 2.5
-<9a74>C(he)-2.5 E 2.5(yr)-.15 G -2.25 -.15(eg a)-2.5 H
-(in their special meaning.).15 E
-(Replacement strings are the second part of a)97 253.2 Q F0(substitute)
-2.5 E F1(command.)2.5 E .062(The character \231)97 269.4 R F2(&)A F1
-2.562<9a28>C .062(or \231)-2.562 F F2(\\&)A F1 2.562<9a69>C 2.562(ft)
--2.562 G(he)-2.562 E F0(magic)2.562 E F1 .062(option is)2.562 F F3(not)
-2.562 E F1 .062(set\) in the replacement string stands for the te)2.562
-F(xt)-.15 E .121(matched by the RE that is being replaced.)72 281.4 R
-.121(The character \231)5.121 F F2(~)A F1 2.621<9a28>C .121(or \231)
--2.621 F F2(\\~)A F1 2.621<9a69>C 2.621(ft)-2.621 G(he)-2.621 E F0
-(magic)2.621 E F1 .121(option is)2.621 F F3(not)2.621 E F1 .121
-(set\) stands)2.621 F .542(for the replacement part of the pre)72 293.4
-R(vious)-.25 E F0(substitute)3.042 E F1 3.042(command. It)3.042 F .542
-(is only v)3.042 F .542(alid after a)-.25 F F0(substitute)3.042 E F1
-(command)3.042 E(has been performed.)72 305.4 Q .12(The string \231)97
-321.6 R F2(\\#)A F1 .12(\232, where \231)B F2(#)A F1 2.62<9a69>C 2.62
-(sa)-2.62 G 2.62(ni)-2.62 G(nte)-2.62 E .12(ger v)-.15 F .12
-(alue from 1 to 9, stands for the te)-.25 F .12
-(xt matched by the portion)-.15 F 3.095(of the RE enclosed in the \231)
-72 333.6 R F2(#)A F1<9a27>A 3.095(th set of escaped parentheses, e.g.)
--.18 F<99>8.095 E F2(\\\()A F1 5.595<9a61>C 3.095(nd \231)-5.595 F F2
-(\\\))A F1 5.595(\232. F)B 3.095(or e)-.15 F(xample,)-.15 E<99>72 345.6
-Q F2(s/abc\\\(.*\\\)def/\\1/)A F1 2.5<9a64>C(eletes the strings \231)
--2.5 E F2(abc)A F1 2.5<9a61>C(nd \231)-2.5 E F2(def)A F1 2.5<9a66>C
-(rom the matched pattern.)-2.5 E .722(The strings \231)97 361.8 R F2
-(\\l)A F1 .722<9a2c2099>B F2(\\u)A F1 .722<9a2c2099>B F2(\\L)A F1 3.222
-<9a61>C .722(nd \231)-3.222 F F2(\\U)A F1 3.222<9a63>C .721
-(an be used to modify the case of elements in the replace-)-3.222 F
-1.919(ment string.)72 373.8 R 1.919(The string \231)6.919 F F2(\\l)A F1
-4.419<9a63>C 1.919(auses the ne)-4.419 F 1.919(xt character to be con)
--.15 F -.15(ve)-.4 G 1.92(rted to lo).15 F 1.92
-(wercase; the string \231)-.25 F F2(\\u)A F1<9a>A(beha)72 385.8 Q -.15
-(ve)-.2 G 3.098(ss).15 G(imilarly)-3.098 E 3.098(,b)-.65 G .598(ut con)
--3.298 F -.15(ve)-.4 G .598(rts to uppercase \(e.g.).15 F F2
-(s/abc/\\U&/)5.598 E F1 .598(replaces the string)3.098 F F2(abc)3.098 E
-F1(with)3.098 E F2(ABC)3.097 E F1 3.097(\). The)B .257(string \231)72
-397.8 R F2(\\L)A F1 2.757<9a63>C .257
-(auses characters up to the end of the string or the ne)-2.757 F .258
-(xt occurrence of the strings \231)-.15 F F2(\\e)A F1 2.758<9a6f>C 2.758
-<7299>-2.758 G F2(\\E)-2.758 E F1<9a>A(to be con)72 409.8 Q -.15(ve)-.4
-G(rted to lo).15 E(wercase; the string \231)-.25 E F2(\\U)A F1 2.5<9a62>
-C(eha)-2.5 E -.15(ve)-.2 G 2.5(ss).15 G(imilarly)-2.5 E 2.5(,b)-.65 G
-(ut con)-2.7 E -.15(ve)-.4 G(rts to uppercase.).15 E
-(If the entire replacement pattern is \231)97 426 Q F2(%)A F1
-(\232, then the last replacement pattern is used ag)A(ain.)-.05 E(In)97
-442.2 Q F0(vi)3.138 E F1 3.138(,i)C .638(nserting a)-3.138 F F2
-(<control-M>)3.138 E F1 .637
-(into the replacement string will cause the matched line to be split)
-3.138 F(into tw)72 454.2 Q 2.5(ol)-.1 G(ines at that point.)-2.5 E
-(\(The)5 E F2(<control-M>)2.5 E F1(will be discarded.\))2.5 E F0 2.5
-(10. Scripting)72 478.2 R(Languages)2.5 E F1(The)97 494.4 Q F0 -.4(nv)
-3.467 G(i).4 E F1 .968(editor currently supports tw)3.467 F 3.468(os)-.1
-G .968(cripting languages, Tcl/Tk and Perl5.)-3.468 F .968
-(\(Note that Perl4 isn')5.968 F(t)-.18 E(suf)72 506.4 Q .728
-(\214cient, and that the Perl5 must be v)-.25 F .727
-(ersion 5.002 or later)-.15 F 5.727(.S)-.55 G .727
-(ee the \) See the \231)-5.727 F F0 .727(Building Nvi)B F1 3.227<9a73>C
-.727(ection for)-3.227 F(more information.)72 518.4 Q .127
-(The scripting language interf)97 534.6 R .127(ace is still being w)-.1
-F(ork)-.1 E .127(ed on, therefore the follo)-.1 F .128
-(wing information is prob-)-.25 F .163
-(ably incomplete, probably wrong in cases, and lik)72 546.6 R .163
-(ely to change.)-.1 F .162(See the)5.163 F F2(perl_api)2.662 E F1(and)
-2.662 E F2(tcl_api)2.662 E F1(source)2.662 E .722
-(directories for more information.)72 558.6 R .722
-(As a quick reference, the follo)5.722 F .722
-(wing function calls are pro)-.25 F .722(vided for both)-.15 F 1.07
-(the Perl and Tcl interf)72 570.6 R 3.57(aces. The)-.1 F 1.069
-(Perl interf)3.569 F 1.069(ace uses a slightly dif)-.1 F 1.069
-(ferent naming con)-.25 F -.15(ve)-.4 G 1.069(ntion, e.g. `).15 F
-(`viFind-)-.74 E(Screen')72 582.6 Q 2.5('i)-.74 G 2.5(sn)-2.5 G(amed `)
--2.5 E(`VI:FindScreen')-.74 E('.)-.74 E F0(viFindScr)72 606.6 Q
-(een \214le)-.18 E F1(Return the)97 618.6 Q F2(screenId)2.5 E F1
-(associated)A F2(file)2.5 E F1(.)A F0(viA)72 642.6 Q(ppendLine scr)-.25
-E(eenId lineNumber text)-.18 E F1(Append)97 654.6 Q F2(text)2.5 E F1
-(as a ne)2.5 E 2.5(wl)-.25 G(ine after line number)-2.5 E F2(lineNumber)
-2.5 E F1 2.5(,i)C 2.5(nt)-2.5 G(he screen)-2.5 E F2(screenId)2.5 E F1(.)
-A F0(viDelLine scr)72 678.6 Q(eenId lineNum)-.18 E F1(Delete the line)97
-690.6 Q F2(lineNumber)2.5 E F1(from the screen)2.5 E F2(screenId)2.5 E
-F1(.)A EP
-%%Page: 12 11
-%%BeginPageSetup
-BP
-%%EndPageSetup
-/F0 10/Times-Bold@0 SF 303.33(USD:13-12 Nvi/Nex)72 60 R(Refer)2.5 E
-(ence)-.18 E(viGetLine scr)72 96 Q(eenId lineNumber)-.18 E/F1 10
-/Times-Roman@0 SF(Return the line)97 108 Q/F2 10/Courier@0 SF
-(lineNumber)2.5 E F1(from the screen)2.5 E F2(screenId)2.5 E F1(.)A F0
-(viInsertLine scr)72 132 Q(eenId lineNumber text)-.18 E F1(Insert)97 144
-Q F2(text)2.5 E F1(as a ne)2.5 E 2.5(wl)-.25 G(ine before line number)
--2.5 E F2(lineNumber)2.5 E F1(in the screen)2.5 E F2(screenId)2.5 E F1
-(.)A F0(viLastLine scr)72 168 Q(eenId)-.18 E F1
-(Return the line number of the last line in the screen)97 180 Q F2
-(screenId)2.5 E F1(.)A F0(viSetLine scr)72 204 Q(eenId lineNumber text)
--.18 E F1(Change the line)97 216 Q F2(lineNumber)2.5 E F1(in the screen)
-2.5 E F2(screenId)2.5 E F1(to match the speci\214ed)2.5 E F2(text)2.5 E
-F1(.)A F0(viGetMark scr)72 240 Q(eenId mark)-.18 E F1
-(Return the current line and column for the speci\214ed)97 252 Q F2
-(mark)2.5 E F1(from the screen)2.5 E F2(screenId)2.5 E F1(.)A F0
-(viSetMark scr)72 276 Q(eenId mark line column)-.18 E F1
-(Set the speci\214ed)97 288 Q F2(mark)2.5 E F1(to be at line)2.5 E F2
-(line)2.5 E F1 2.5(,c)C(olumn)-2.5 E F2(column)2.5 E F1 2.5(,i)C 2.5(nt)
--2.5 G(he screen)-2.5 E F2(screenId)2.5 E F1(.)A F0(viGetCursor scr)72
-312 Q(eenId)-.18 E F1
-(Return the current line and column for the cursor in the screen)97 324
-Q F2(screenId)2.5 E F1(.)A F0(viSetCursor scr)72 348 Q
-(eenId line column)-.18 E F1(Set the cursor in the screen)97 360 Q F2
-(screenId)2.5 E F1(to the speci\214ed)2.5 E F2(line)2.5 E F1(and)2.5 E
-F2(column)2.5 E F1(.)A F0(viMsg scr)72 384 Q(eenId text)-.18 E F1
-(Display the speci\214ed)97 396 Q F2(text)2.5 E F1
-(as a vi message in the screen)2.5 E F2(screenId)2.5 E F1(.)A F0
-(viNewScr)72 420 Q(een scr)-.18 E(eenId [\214le])-.18 E F1(Create a ne)
-97 432 Q 2.5(ws)-.25 G(creen.)-2.5 E F0(viEndScr)72 456 Q(een scr)-.18 E
-(eenId)-.18 E F1(Exit the screen)97 468 Q F2(screenId)2.5 E F1(.)A F0
-(viSwitchScr)72 492 Q(een scr)-.18 E(eenId scr)-.18 E(eenId)-.18 E F1
-(Switch from the screen)97 504 Q F2(screenId)2.5 E F1(to the screen)2.5
-E F2(screenId)2.5 E F1(.)A F0(viMapK)72 528 Q(ey scr)-.25 E(eenId k)-.18
-E(ey tclpr)-.1 E(oc)-.18 E F1(Map the speci\214ed)97 540 Q F2(key)2.5 E
-F1(in the screen)2.5 E F2(screenId)2.5 E F1(to the Tcl procedure)2.5 E
-F2(tclproc)2.5 E F1(.)A F0(viUnmMapK)72 564 Q(ey scr)-.25 E(eenId k)-.18
-E(ey)-.1 E F1(Unmap the speci\214ed)97 576 Q F2(key)2.5 E F1
-(in the screen)2.5 E F2(screenId)2.5 E F0(viGetOpt scr)72 600 Q
-(eenId option)-.18 E F1(Return the v)97 612 Q(alue of the speci\214ed)
--.25 E F2(option)2.5 E F1(from the screen)2.5 E F2(screenId)2.5 E F1(.)A
-F0(viSetOpt scr)72 636 Q(eenId command)-.18 E F1
-(Set one or more options in the screen)97 648 Q F2(screenId)2.5 E F1(.)A
-F0 2.5(11. General)72 672 R(Editor Description)2.5 E F1(When)97 688.2 Q
-F0(ex)2.717 E F1(or)2.717 E F0(vi)2.717 E F1 .217(are e)2.717 F -.15(xe)
--.15 G .217(cuted, the te).15 F .217(xt of a \214le is read \(or a temporary \214le is created\), and then all edit-)
--.15 F .22(ing changes happen within the conte)72 700.2 R .22
-(xt of the cop)-.15 F 2.72(yo)-.1 G 2.72(ft)-2.72 G .219(he \214le.)
--2.72 F/F3 10/Times-Italic@0 SF .219(No c)5.219 F(hang)-.15 E .219
-(es af)-.1 F .219(fect the actual \214le until the \214le)-.18 F 1.8
-(is written out)72 712.2 R F1 4.3(,e)C 1.8
-(ither using a write command or another command which is af)-4.3 F 1.8
-(fected by the)-.25 F F0(auto)4.3 E(write)-.1 E F1(option.)72 724.2 Q EP
-%%Page: 13 12
-%%BeginPageSetup
-BP
-%%EndPageSetup
-/F0 10/Times-Bold@0 SF(Nvi/Nex Refer)72 60 Q 303.33(ence USD:13-13)-.18
-F/F1 10/Times-Roman@0 SF .254(All \214les are lock)97 96 R .254
-(ed \(using the)-.1 F/F2 10/Times-Italic@0 SF(\215oc)2.754 E(k)-.2 E F1
-.254(\(2\) or)B F2(fcntl)2.754 E F1 .254(\(2\) interf)B .254
-(aces\) during the edit session, to a)-.1 F -.2(vo)-.2 G .253(id inadv)
-.2 F(er)-.15 E(-)-.2 E .385
-(tently making modi\214cations to multiple copies of the \214le.)72 108
-R .385(If a lock cannot be obtained for a \214le because it)5.385 F .013
-(is lock)72 120 R .013
-(ed by another process, the edit session is read-only \(as if the)-.1 F
-F0 -.18(re)2.512 G(adonly).18 E F1 .012(option or the)2.512 F F0<ad52>
-2.512 E F1 .012(\215ag had been)2.512 F 3.088(speci\214ed\). If)72 132 R
-3.088(al)3.088 G .588(ock cannot be obtained for other reasons, the edit session will continue, b)
--3.088 F .589(ut the \214le status)-.2 F(information \(see the)72 144 Q
-F0(<contr)2.5 E(ol-G>)-.18 E F1(command\) will re\215ect this f)2.5 E
-(act.)-.1 E(Both)97 160.2 Q F0(ex)3.752 E F1(and)3.752 E F0(vi)3.752 E
-F1 1.252(are modeful editors, i.e. the)3.752 F 3.752(yh)-.15 G -2.25 -.2
-(av e)-3.752 H(tw)3.952 E 3.752(om)-.1 G 1.252
-(odes, \231command\232 mode and \231te)-3.752 F 1.251(xt input\232)-.15
-F 2.855(mode. The)72 172.2 R .355(former is intended to permit you to enter commands which modi\214es already e)
-2.855 F .355(xisting te)-.15 F 2.855(xt. The)-.15 F .261
-(latter is intended to permit you to enter ne)72 184.2 R 2.761(wt)-.25 G
--.15(ex)-2.761 G 2.761(t. When).15 F F0(ex)2.76 E F1 .26
-(\214rst starts running, it is in command mode, and)2.76 F 1.353
-(usually displays a prompt \(see the)72 196.2 R F0(pr)3.854 E(ompt)-.18
-E F1 1.354(option for more information\).)3.854 F 1.354
-(The prompt is a single colon)6.354 F<2899>72 208.2 Q/F3 10/Courier@0 SF
-(:)A F1 1.859(\232\) character)B 6.859(.T)-.55 G 1.859
-(here are three commands that switch)-6.859 F F0(ex)4.359 E F1 1.859
-(into te)4.359 F 1.858(xt input mode:)-.15 F F0(append)4.358 E F1(,)A F0
-(change)4.358 E F1(and)4.358 E F0(insert)72 220.2 Q F1 5.159(.O)C .159(nce in input mode, entering a line containing only a single period \(\231)
--5.159 F F3(.)A F1 2.66(\232\) ends)B(te)2.66 E .16(xt input mode and)
--.15 F(returns to command mode, where the prompt is redisplayed.)72
-232.2 Q(When)97 248.4 Q F0(vi)2.775 E F1 .275
-(\214rst starts running, it is in command mode as well.)2.775 F .274
-(There are ele)5.275 F -.15(ve)-.25 G 2.774(nc).15 G .274
-(ommands that switch)-2.774 F F0(vi)72 260.4 Q F1 .066(into te)2.566 F
-.066(xt input mode:)-.15 F F0(A)2.566 E F1(,)A F0(a)2.566 E F1(,)A F0(C)
-2.566 E F1(,)A F0(c)2.566 E F1(,)A F0(I)2.567 E F1(,)A F0(i)2.567 E F1
-(,)A F0(O)2.567 E F1(,)A F0(o)2.567 E F1(,)A F0(R)2.567 E F1(,)A F0(S)
-2.567 E F1(and)2.567 E F0(s)2.567 E F1 5.067(.O)C .067
-(nce in input mode, entering an)-5.067 F F3(<escape>)2.567 E F1(char)
-2.567 E(-)-.2 E(acter ends te)72 272.4 Q
-(xt input mode and returns to command mode.)-.15 E F0(Ex)97 288.6 Q F1
-(/)A F0(vi)A F1 .182(present three dif)2.682 F .182(ferent interf)-.25 F
-.182(aces to editing a \214le.)-.1 F F0(Ex)5.182 E F1 .182
-(presents a line oriented interf)2.682 F(ace.)-.1 E F0 -.37(Vi)5.181 G
-F1(pre-)3.051 E 1.27(sents a full screen display oriented interf)72
-300.6 R 1.27(ace, also kno)-.1 F 1.27(wn as \231visual mode\232.)-.25 F
-1.27(In addition, there is a third)6.27 F .244
-(mode, \231open mode\232, which is line oriented, b)72 312.6 R .243
-(ut supports cursor mo)-.2 F -.15(ve)-.15 G .243
-(ment and editing within the displayed).15 F
-(line, similarly to visual mode.)72 324.6 Q
-(Open mode is not yet implemented in)5 E F0 -.4(nv)2.5 G(i).4 E F1(.)A
-(The follo)97 340.8 Q(wing w)-.25 E(ords ha)-.1 E .3 -.15(ve s)-.2 H
-(pecial meanings in both the).15 E F0(ex)2.5 E F1(and)2.5 E F0(vi)2.5 E
-F1(command descriptions:)2.5 E F0(<interrupt>)72 364.8 Q F1 .853
-(The interrupt character is used to interrupt the current operation.)97
-376.8 R(Normally)5.854 E F3(<control-C>)3.354 E F1 3.354(,w)C(hat-)
--3.354 E -2.15 -.25(ev e)97 388.8 T 2.5(rc).25 G
-(haracter is set for the current terminal is used.)-2.5 E F0
-(<literal-next>)72 412.8 Q F1 .364(The literal ne)97 424.8 R .364
-(xt character is used to escape the subsequent character from an)-.15 F
-2.864(ys)-.15 G .364(pecial meaning.)-2.864 F(This)5.364 E 1.247
-(character is al)97 436.8 R -.1(wa)-.1 G(ys).1 E F3(<control-V>)3.747 E
-F1 6.247(.I)C 3.747(ft)-6.247 G 1.247
-(he terminal is not set up to do XON/XOFF \215o)-3.747 F 3.748(wc)-.25 G
-(ontrol,)-3.748 E(then)97 448.8 Q F3(<control-Q>)2.5 E F1
-(is used to mean literal ne)2.5 E(xt as well.)-.15 E F0(curr)72 472.8 Q
-(ent pathname)-.18 E F1 .278
-(The pathname of the \214le currently being edited by vi.)97 484.8 R
-.278(When the percent character \(\231)5.278 F F3(%)A F1 .278
-(\232\) appears in a)B .624(\214le name entered as part of an)97 496.8 R
-F0(ex)3.124 E F1 .624(command ar)3.124 F .624
-(gument, it is replaced by the current pathname.)-.18 F(\(The)5.625 E
-<99>97 508.8 Q F3(%)A F1 2.5<9a63>C
-(haracter can be escaped by preceding it with a backslash.\))-2.5 E F0
-(alter)72 532.8 Q(nate pathname)-.15 E F1 .151
-(The name of the last \214le name mentioned in an)97 544.8 R F0(ex)2.651
-E F1 .151(command, or)2.651 F 2.651(,t)-.4 G .151(he pre)-2.651 F .151
-(vious current pathname if the)-.25 F 1.006
-(last \214le mentioned becomes the current \214le.)97 556.8 R 1.006
-(When the hash mark character \(\231)6.006 F F3(#)A F1 1.007
-(\232\) appears in a \214le)B .142(name entered as part of an)97 568.8 R
-F0(ex)2.641 E F1 .141(command ar)2.641 F .141
-(gument, it is replaced by the alternate pathname.)-.18 F .141
-(\(The \231)5.141 F F3(#)A F1<9a>A
-(character can be escaped by preceding it with a backslash.\))97 580.8 Q
-F0 -.2(bu)72 604.8 S(ffer).2 E F1 .298
-(One of a number of named areas for sa)97 616.8 R .298
-(ving copies of te)-.2 F 2.798(xt. Commands)-.15 F .299
-(that change or delete te)2.799 F .299(xt can)-.15 F(sa)97 628.8 Q .597
--.15(ve t)-.2 H .297(he changed or deleted te).15 F .296
-(xt into a speci\214c b)-.15 F(uf)-.2 E(fer)-.25 E 2.796(,f)-.4 G .296
-(or later use, if the command allo)-2.796 F .296(ws it \(i.e. the)-.25 F
-F0 .242(ex change)97 640.8 R F1 .243(command cannot sa)2.743 F .543 -.15
-(ve t)-.2 H .243(he changed te).15 F .243(xt in a named b)-.15 F(uf)-.2
-E 2.743(fer\). Buf)-.25 F .243(fers are named with a sin-)-.25 F .161
-(gle character)97 652.8 R 2.661(,p)-.4 G .161
-(receded by a double quote, e.g.)-2.661 F F3("<character>)5.161 E F1(in)
-2.661 E F0(vi)2.661 E F1 .16(and without the double quote,)2.66 F(e.g.)
-97 664.8 Q F3(<character>)6.512 E F1 4.012(,i)C(n)-4.012 E F0(ex)4.012 E
-F1 6.512(.\()C 1.512(The double quote isn')-6.512 F 4.012(tn)-.18 G
-1.512(ecessary for)-4.012 F F0(ex)4.012 E F1 1.512(because b)4.012 F(uf)
--.2 E 1.513(fers names are)-.25 F .612
-(denoted by their position in the command line.\))97 676.8 R .611
-(Historic implementations of)5.611 F F0(ex)3.111 E F1(/)A F0(vi)A F1
-(limited)3.111 E F3(<char-)3.111 E(acter>)97 688.8 Q F1 1.129
-(to the alphanumeric characters;)3.629 F F0(nex)3.629 E F1(/)A F0 -.4
-(nv)C(i).4 E F1 1.129(permits the use of an)3.629 F 3.63(yc)-.15 G 1.13
-(haracter without another)-3.63 F(meaning in the position where a b)97
-700.8 Q(uf)-.2 E(fer name is e)-.25 E(xpected.)-.15 E(Buf)97 724.8 Q
-.718(fers named by uppercase characters are the same as b)-.25 F(uf)-.2
-E .718(fers named by lo)-.25 F .717(wercase characters, e.g.)-.25 F EP
-%%Page: 14 13
-%%BeginPageSetup
-BP
-%%EndPageSetup
-/F0 10/Times-Bold@0 SF 303.33(USD:13-14 Nvi/Nex)72 60 R(Refer)2.5 E
-(ence)-.18 E/F1 10/Times-Roman@0 SF .442(the b)97 96 R(uf)-.2 E .442
-(fer named by the English character \231)-.25 F/F2 10/Courier@0 SF(A)A
-F1 2.943<9a69>C 2.943(st)-2.943 G .443(he same as the b)-2.943 F(uf)-.2
-E .443(fer named by the character \231)-.25 F F2(a)A F1<9a2c>A .296
-(with the e)97 108 R .296(xception that, if the b)-.15 F(uf)-.2 E .296
-(fer contents are being changed \(as with a te)-.25 F .295
-(xt deletion or)-.15 F F0 .295(vi change)2.795 F F1(command\), the te)97
-120 Q(xt is)-.15 E/F3 10/Times-Italic@0 SF(appended)2.5 E F1(to the b)
-2.5 E(uf)-.2 E(fer)-.25 E 2.5(,i)-.4 G
-(nstead of replacing the current contents.)-2.5 E .565(The b)97 144 R
-(uf)-.2 E .565(fers named by the numeric characters \(in English, \231)
--.25 F F2(1)A F1 3.066<9a74>C .566(hrough \231)-3.066 F F2(9)A F1 .566
-(\232\), are special.)B .566(If a re)5.566 F(gion)-.15 E .213(of te)97
-156 R .212(xt including characters from more than one line, or a single line of te)
--.15 F .212(xt speci\214ed by using a line-)-.15 F .304
-(oriented motion, is changed or deleted in the \214le using the)97 168 R
-F0 .305(vi change)2.805 F F1(or)2.805 E F0(delete)2.805 E F1 .305
-(commands, a cop)2.805 F 2.805(yo)-.1 G(f)-2.805 E 1.519(the te)97 180 R
-1.518(xt is placed into the numeric b)-.15 F(uf)-.2 E 1.518(fer \231)
--.25 F F2(1)A F1 1.518(\232, re)B -.05(ga)-.15 G 1.518
-(rdless of the user specifying another b).05 F(uf)-.2 E 1.518(fer in)
--.25 F .394(which to sa)97 192 R .694 -.15(ve i)-.2 H 2.894(t. In).15 F
-.395(addition, there are a fe)2.894 F 2.895(wc)-.25 G .395
-(ommands which, when used as a)-2.895 F F2(motion)2.895 E F1 .395
-(with the)2.895 F F0(vi)2.895 E(change)97 204 Q F1(and)4.275 E F0
-(delete)4.275 E F1(commands,)4.275 E F3(always)4.275 E F1(cop)4.275 E
-4.275(yt)-.1 G 1.775(he speci\214ed re)-4.275 F 1.775(gion of te)-.15 F
-1.775(xt into the numeric b)-.15 F(uf)-.2 E(fers)-.25 E(re)97 216 Q -.05
-(ga)-.15 G(rdless of the re).05 E
-(gion including characters from more than one line.)-.15 E
-(These commands are:)5 E F2 9(<control-A> % \( \))103 244.2 R 9
-(`<character> / ? N)97 256.2 R 15(n{})163 268.2 S F1 1.262
-(Before this cop)97 296.4 R 3.763(yi)-.1 G 3.763(sd)-3.763 G 1.263
-(one, the pre)-3.763 F 1.263(vious contents of b)-.25 F(uf)-.2 E 1.263
-(fer \231)-.25 F F2(1)A F1 3.763<9a61>C 1.263(re mo)-3.763 F -.15(ve)
--.15 G 3.763(di).15 G 1.263(nto b)-3.763 F(uf)-.2 E 1.263(fer \231)-.25
-F F2(2)A F1 1.263<9a2c2099>B F2(2)A F1 3.763<9a69>C(nto)-3.763 E -.2(bu)
-97 308.4 S -.25(ff).2 G .474(er \231).25 F F2(3)A F1 .474
-(\232, and so on.)B .473(The contents of b)5.474 F(uf)-.2 E .473
-(fer \231)-.25 F F2(9)A F1 2.973<9a61>C .473(re discarded.)-2.973 F(In)
-5.473 E F0(vi)2.973 E F1 2.973(,t)C -.15(ex)-2.973 G 2.973(tm).15 G .473
-(ay be e)-2.973 F .473(xplicitly stored)-.15 F .554(into the numeric b)
-97 320.4 R(uf)-.2 E 3.054(fers. In)-.25 F .555(this case, the b)3.054 F
-(uf)-.2 E .555(fer rotation described abo)-.25 F .855 -.15(ve o)-.15 H
-.555(ccurs before the replace-).15 F .488(ment of the b)97 332.4 R(uf)
--.2 E(fer')-.25 E 2.988(sc)-.55 G 2.988(ontents. The)-2.988 F .487
-(numeric b)2.987 F(uf)-.2 E .487(fers are only a)-.25 F -.25(va)-.2 G
-.487(ilable in).25 F F2(visual)2.987 E F1(and)2.987 E F2(open)2.987 E F1
-(modes,)2.987 E .405(and are not accessible by)97 344.4 R F0(ex)2.905 E
-F1 .405(in an)2.905 F 2.905(yw)-.15 G(ay)-3.005 E 2.905(,a)-.65 G .405
-(lthough changed and deleted te)-2.905 F .405
-(xt is still stored there while)-.15 F(in)97 356.4 Q F0(ex)2.5 E F1
-(mode.)2.5 E .552(When a)97 380.4 R F0(vi)3.052 E F1 .552
-(command synopsis sho)3.052 F .552(ws both a)-.25 F F2([buffer])3.052 E
-F1 .552(and a)3.052 F F2([count])3.052 E F1 3.052(,t)C(he)-3.052 E 3.052
-(ym)-.15 G .551(ay be presented in)-3.052 F(an)97 392.4 Q 2.5(yo)-.15 G
-(rder)-2.5 E(.)-.55 E(Finally)97 416.4 Q 3.241(,a)-.65 G .741(ll b)
--3.241 F(uf)-.2 E .741
-(fers are either \231line\232 or \231character\232 oriented.)-.25 F(All)
-5.741 E F0(ex)3.241 E F1 .742(commands which store te)3.242 F .742
-(xt into)-.15 F -.2(bu)97 428.4 S -.25(ff).2 G .005
-(ers are line oriented.).25 F(Some)5.005 E F0(vi)2.505 E F1 .004
-(commands which store te)2.505 F .004(xt into b)-.15 F(uf)-.2 E .004
-(fers are line oriented, and some)-.25 F .16
-(are character oriented; the description for each applicable)97 440.4 R
-F0(vi)2.661 E F1 .161(command notes whether te)2.661 F .161
-(xt copied into)-.15 F -.2(bu)97 452.4 S -.25(ff).2 G 2.341
-(ers using the command is line or character oriented.).25 F 2.341
-(In addition, the)7.341 F F0(vi)4.84 E F1(command)4.84 E F0(display)4.84
-E -.2(bu)97 464.4 S(ffers).2 E F1 .901
-(displays the current orientation for each b)3.401 F(uf)-.2 E(fer)-.25 E
-5.902(.G)-.55 G(enerally)-5.902 E 3.402(,t)-.65 G .902
-(he only importance attached to)-3.402 F .628
-(this orientation is that if the b)97 476.4 R(uf)-.2 E .628
-(fer is subsequently inserted into the te)-.25 F .628
-(xt, line oriented b)-.15 F(uf)-.2 E .628(fers create)-.25 F(ne)97 488.4
-Q 3.319(wl)-.25 G .819(ines for each of the lines the)-3.319 F 3.319(yc)
--.15 G .819(ontain, and character oriented b)-3.319 F(uf)-.2 E .82
-(fers create ne)-.25 F 3.32(wl)-.25 G .82(ines for an)-3.32 F(y)-.15 E
-(lines)97 500.4 Q F3(other)2.561 E F1 .061
-(than the \214rst and last lines the)2.561 F 2.561(yc)-.15 G 2.561
-(ontain. The)-2.561 F .061
-(\214rst and last lines are inserted into the te)2.561 F .061(xt at)-.15
-F .964(the current cursor position, becoming part of the current line.)
-97 512.4 R .964(If there is more than one line in the)5.964 F -.2(bu)97
-524.4 S -.25(ff).2 G(er).25 E 2.5(,h)-.4 G -.25(ow)-2.5 G -2.15 -.25
-(ev e).25 H .8 -.4(r, t).25 H(he current line itself will be split.).4 E
-F0(unnamed b)72 548.4 Q(uffer)-.2 E F1 .239(The unnamed b)97 560.4 R(uf)
--.2 E .239(fer is a te)-.25 F .239
-(xt storage area which is used by commands that use or operate on a b)
--.15 F(uf)-.2 E(fer)-.25 E .923(when no b)97 572.4 R(uf)-.2 E .923
-(fer is speci\214ed by the user)-.25 F 5.924(.I)-.55 G 3.424(ft)-5.924 G
-.924(he command stores te)-3.424 F .924(xt into a b)-.15 F(uf)-.2 E(fer)
--.25 E 3.424(,t)-.4 G .924(he te)-3.424 F .924(xt is stored)-.15 F .203
-(into the unnamed b)97 584.4 R(uf)-.2 E .203(fer e)-.25 F -.15(ve)-.25 G
-2.703(ni).15 G 2.703(fab)-2.703 G(uf)-2.903 E .203
-(fer is also speci\214ed by the user)-.25 F 5.203(.I)-.55 G 2.703(ti)
--5.203 G 2.703(sn)-2.703 G .203(ot possible to append te)-2.703 F(xt)
--.15 E .36(to the unnamed b)97 596.4 R(uf)-.2 E(fer)-.25 E 5.36(.I)-.55
-G 2.86(ft)-5.36 G -.15(ex)-2.86 G 2.86(ti).15 G 2.86(sa)-2.86 G .36
-(ppended to a named b)-2.86 F(uf)-.2 E(fer)-.25 E 2.86(,t)-.4 G .36
-(he named b)-2.86 F(uf)-.2 E .36(fer contains both the old)-.25 F .153
-(and ne)97 608.4 R 2.653(wt)-.25 G -.15(ex)-2.653 G .153
-(t, while the unnamed b).15 F(uf)-.2 E .152(fer contains only the ne)
--.25 F 2.652(wt)-.25 G -.15(ex)-2.652 G 2.652(t. There).15 F .152
-(is no w)2.652 F .152(ay to e)-.1 F .152(xplicitly ref-)-.15 F
-(erence the unnamed b)97 620.4 Q(uf)-.2 E(fer)-.25 E(.)-.55 E
-(Historically)97 644.4 Q 3.298(,t)-.65 G .798
-(he contents of the unnamed b)-3.298 F(uf)-.2 E .799
-(fer were discarded by man)-.25 F 3.299(yd)-.15 G(if)-3.299 E .799
-(ferent commands, e)-.25 F -.15(ve)-.25 G(n).15 E 1.095(ones that didn')
-97 656.4 R 3.595(ts)-.18 G 1.095(tore te)-3.595 F 1.095(xt into it.)-.15
-F F0(Nex)6.094 E F1(/)A F0 -.4(nv)C(i).4 E F1(ne)3.594 E -.15(ve)-.25 G
-3.594(rd).15 G 1.094(iscards the contents of the unnamed b)-3.594 F(uf)
--.2 E 1.094(fer until)-.25 F(ne)97 668.4 Q 2.5(wt)-.25 G -.15(ex)-2.5 G
-2.5(tr).15 G(eplaces them.)-2.5 E F0(whitespace)72 692.4 Q F1
-(The characters <tab> and <space>.)97 704.4 Q EP
-%%Page: 15 14
-%%BeginPageSetup
-BP
-%%EndPageSetup
-/F0 10/Times-Bold@0 SF(Nvi/Nex Refer)72 60 Q 303.33(ence USD:13-15)-.18
-F(<carriage-r)72 96 Q(etur)-.18 E(n>)-.15 E/F1 10/Times-Roman@0 SF 1.636
-(The character represented by an ASCII)97 108 R/F2 10/Courier@0 SF
-(<control-M>)4.136 E F1 6.636(.T)C 1.636(his character is almost al)
--6.636 F -.1(wa)-.1 G 1.636(ys treated).1 F .36(identically to a)97 120
-R F2(<newline>)2.86 E F1(character)2.86 E 2.86(,b)-.4 G .36(ut dif)-3.06
-F .36(fers in that it can be escaped into the \214le te)-.25 F .36
-(xt or into a)-.15 F(command.)97 132 Q F0(<newline>)72 156 Q F1 1.636
-(The character represented by an ASCII)97 168 R F2(<control-J>)4.136 E
-F1 6.636(.T)C 1.636(his character is almost al)-6.636 F -.1(wa)-.1 G
-1.636(ys treated).1 F .416(identically to a)97 180 R F2(<control-M>)
-2.916 E F1(character)2.916 E 2.916(,b)-.4 G .415(ut dif)-3.116 F .415
-(fers in that it cannot be escaped into the \214le te)-.25 F .415(xt or)
--.15 F(into a command.)97 192 Q F0 2.5(12. V)72 216 R 2.5(iD)-.37 G
-(escription)-2.5 E -.37(Vi)97 232.2 S F1(tak)3.421 E .551
-(es up the entire screen to display the edited \214le, e)-.1 F .551
-(xcept for the bottom line of the screen.)-.15 F(The)5.552 E .285
-(bottom line of the screen is used to enter)72 244.2 R F0(ex)2.785 E F1
-.285(commands, and for)2.785 F F0(vi)2.785 E F1 .284
-(error and informational messages.)2.785 F .284(If no)5.284 F .948
-(other information is being displayed, the def)72 256.2 R .949
-(ault display can sho)-.1 F 3.449(wt)-.25 G .949(he current cursor ro)
--3.449 F 3.449(wa)-.25 G .949(nd cursor col-)-3.449 F .27(umn, an indication of whether the \214le has been modi\214ed, and the current mode of the editor)
-72 268.2 R 5.269(.S)-.55 G .269(ee the)-5.269 F F0(ruler)2.769 E F1(and)
-72 280.2 Q F0(sho)2.5 E(wmode)-.1 E F1(options for more information.)2.5
-E .56(Empty lines do not ha)97 296.4 R .86 -.15(ve a)-.2 H .86 -.15
-(ny s).15 H .561(pecial representation on the screen, b).15 F .561
-(ut lines on the screen that w)-.2 F(ould)-.1 E 1.647(logically come after the end of the \214le are displayed as a single tilde \(\231)
-72 308.4 R F2(~)A F1 1.646(\232\) character)B 6.646(.T)-.55 G 4.146(od)
--7.446 G(if)-4.146 E(ferentiate)-.25 E 1.026(between empty lines and lines consisting of only whitespace characters, use the)
-72 320.4 R F0(list)3.527 E F1 3.527(option. Historically)3.527 F(,)-.65
-E .448(implementations of)72 332.4 R F0(vi)2.948 E F1(ha)2.948 E .748
--.15(ve a)-.2 H .447(lso displayed some lines as single asterisk \(\231)
-.15 F F2(@)A F1 .447(\232\) characters.)B .447(These were lines)5.447 F
-.269(that were not correctly displayed, i.e. lines on the screen that did not correspond to lines in the \214le, or lines)
-72 344.4 R(that did not \214t on the current screen.)72 356.4 Q F0(Nvi)5
-E F1(ne)2.5 E -.15(ve)-.25 G 2.5(rd).15 G(isplays lines in this f)-2.5 E
-(ashion.)-.1 E F0 -.37(Vi)97 372.6 S F1 .232(is a modeful editor)3.102 F
-2.732(,i)-.4 G .232(.e. it has tw)-2.732 F 2.732(om)-.1 G .232
-(odes, \231command\232 mode and \231te)-2.732 F .231(xt input\232 mode.)
--.15 F(When)5.231 E F0(vi)2.731 E F1(\214rst)2.731 E 1.623
-(starts, it is in command mode.)72 384.6 R 1.623(There are se)6.623 F
--.15(ve)-.25 G 1.624(ral commands that change).15 F F0(vi)4.124 E F1
-1.624(into te)4.124 F 1.624(xt input mode.)-.15 F(The)6.624 E F2
-(<escape>)72 396.6 Q F1 .061(character is used to resolv)2.562 F 2.561
-(et)-.15 G .061(he te)-2.561 F .061(xt input into the \214le, and e)-.15
-F .061(xit back into command mode.)-.15 F(In)5.061 E F0(vi)2.561 E F1
-.498(command mode, the cursor is al)72 408.6 R -.1(wa)-.1 G .499
-(ys positioned on the last column of characters which tak).1 F 2.999(eu)
--.1 G 2.999(pm)-2.999 G .499(ore than)-2.999 F .38
-(one column on the screen.)72 420.6 R(In)5.38 E F0(vi)2.88 E F1(te)2.88
-E .379(xt insert mode, the cursor is positioned on the \214rst column of characters)
--.15 F(which tak)72 432.6 Q 2.5(eu)-.1 G 2.5(pm)-2.5 G
-(ore than one column on the screen.)-2.5 E .684
-(When positioning the cursor to a ne)97 448.8 R 3.184(wl)-.25 G .684
-(ine and column, the type of mo)-3.184 F -.15(ve)-.15 G .684
-(ment is de\214ned by the dis-).15 F .433(tance to the ne)72 460.8 R
-2.933(wc)-.25 G .433(ursor position.)-2.933 F .433(If the ne)5.433 F
-2.933(wp)-.25 G .432(osition is close, the screen is scrolled to the ne)
--2.933 F 2.932(wl)-.25 G 2.932(ocation. If)-2.932 F .382(the ne)72 472.8
-R 2.882(wp)-.25 G .382(osition is f)-2.882 F .382(ar a)-.1 F -.1(wa)-.15
-G 1.682 -.65(y, t).1 H .382(he screen is repainted so that the ne).65 F
-2.883(wp)-.25 G .383(osition is on the screen.)-2.883 F .383
-(If the screen)5.383 F .098(is scrolled, it is mo)72 484.8 R -.15(ve)
--.15 G 2.598(dam).15 G .097(inimal amount, and the cursor line will usually appear at the top or bottom of the)
--2.598 F 2.717(screen. If)72 496.8 R .217(the screen is repainted, the cursor line will appear in the center of the screen, unless the cursor is)
-2.717 F(suf)72 508.8 Q .2(\214ciently close to the be)-.25 F .2
-(ginning or end of the \214le that this isn')-.15 F 2.699(tp)-.18 G
-2.699(ossible. If)-2.699 F(the)2.699 E F0(leftright)2.699 E F1 .199
-(option is set, the)2.699 F(screen may be scrolled or repainted in a horizontal direction as well as in a v)
-72 520.8 Q(ertical one.)-.15 E 3.33(Am)97 537 S .83(ajor dif)-3.33 F .83
-(ference between the historical)-.25 F F0(vi)3.33 E F1 .83
-(presentation and)3.33 F F0 -.4(nv)3.33 G(i).4 E F1 .83
-(is in the scrolling and screen ori-)3.33 F .124
-(ented position commands,)72 549 R F0(<contr)2.624 E(ol-B>)-.18 E F1(,)A
-F0(<contr)2.624 E(ol-D>)-.18 E F1(,)A F0(<contr)2.624 E(ol-E>)-.18 E F1
-(,)A F0(<contr)2.624 E(ol-F>)-.18 E F1(,)A F0(<contr)2.623 E(ol-U>)-.18
-E F1(,)A F0(<contr)2.623 E(ol-)-.18 E(Y>)72 561 Q F1(,)A F0(H)3.464 E F1
-(,)A F0(L)3.464 E F1(and)3.464 E F0(M)3.464 E F1 5.964(.I)C 3.464(nh)
--5.964 G .964(istorical implementations of)-3.464 F F0(vi)3.464 E F1
-3.464(,t)C .964(hese commands acted on ph)-3.464 F .965
-(ysical \(as opposed to)-.05 F .145(logical, or screen\) lines.)72 573 R
--.15(Fo)5.145 G 2.644(rl).15 G .144(ines that were suf)-2.644 F .144
-(\214ciently long in relation to the size of the screen, this meant)-.25
-F .444(that single line scroll commands might repaint the entire screen, scrolling or screen positioning commands)
-72 585 R .511(might not change the screen or mo)72 597 R .811 -.15(ve t)
--.15 H .51
-(he cursor at all, and some lines simply could not be displayed, e).15 F
--.15(ve)-.25 G(n).15 E(though)72 609 Q F0(vi)3.026 E F1 -.1(wo)3.026 G
-.526(uld edit the \214le that contained them.).1 F(In)5.527 E F0 -.4(nv)
-3.027 G(i).4 E F1 3.027(,t)C .527
-(hese commands act on logical, i.e. screen lines.)-3.027 F -1.1(Yo)72
-621 S 3.189(ua)1.1 G .689(re unlik)-3.189 F .689(ely to notice an)-.1 F
-3.189(yd)-.15 G(if)-3.189 E .689(ference unless you are editing \214les with lines signi\214cantly longer than a)
--.25 F(screen width.)72 633 Q F0 -.37(Vi)97 649.2 S F1 -.1(ke)4.357 G
-1.487(eps track of the currently \231most attracti).1 F -.15(ve)-.25 G
-3.988<9a63>.15 G 1.488(ursor position.)-3.988 F 1.488
-(Each command description \(for)6.488 F .932(commands that alter the current cursor position\), speci\214es if the cursor is set to a speci\214c location in the)
-72 661.2 R .416(line, or if it is mo)72 673.2 R -.15(ve)-.15 G 2.916(dt)
-.15 G 2.916(ot)-2.916 G .416(he \231most attracti)-2.916 F .716 -.15
-(ve c)-.25 H .416(ursor position\232.).15 F .416
-(The latter means that the cursor is mo)5.416 F -.15(ve)-.15 G 2.916(dt)
-.15 G(o)-2.916 E .268(the cursor position that is horizontally as close as possible to the current cursor position.)
-72 685.2 R .268(If the current line)5.268 F .508
-(is shorter than the cursor position)72 697.2 R F0(vi)3.008 E F1 -.1(wo)
-3.008 G .508(uld select, the cursor is positioned on the last character in the line.)
-.1 F .338(\(If the line is empty)72 709.2 R 2.838(,t)-.65 G .338
-(he cursor is positioned on the \214rst column of the line.\))-2.838 F
-.337(If a command mo)5.337 F -.15(ve)-.15 G 2.837(st).15 G .337(he cur)
--2.837 F(-)-.2 E .373(sor to the most attracti)72 721.2 R .673 -.15
-(ve p)-.25 H .374(osition, it does not alter the current cursor position, and a subsequent mo)
-.15 F -.15(ve)-.15 G(ment).15 E EP
-%%Page: 16 15
-%%BeginPageSetup
-BP
-%%EndPageSetup
-/F0 10/Times-Bold@0 SF 233.15(USD:13-16 Nvi/Nex)72 60 R(Refer)2.5 E
-(ence \(V)-.18 E 2.5(iC)-.37 G(ommands\))-2.5 E/F1 10/Times-Roman@0 SF
-1.009(will ag)72 96 R 1.009(ain attempt to mo)-.05 F 1.308 -.15(ve t)
--.15 H 1.008(he cursor to that position.).15 F 1.008
-(Therefore, although a mo)6.008 F -.15(ve)-.15 G 1.008
-(ment to a line shorter).15 F .086(than the currently most attracti)72
-108 R .386 -.15(ve p)-.25 H .086(osition will cause the cursor to mo).15
-F .386 -.15(ve t)-.15 H 2.586(ot).15 G .087
-(he end of that line, a subsequent)-2.586 F(mo)72 120 Q -.15(ve)-.15 G
-(ment to a longer line will cause the cursor to mo).15 E .3 -.15(ve b)
--.15 H(ack to the most attracti).15 E .3 -.15(ve p)-.25 H(osition.).15 E
-.249(In addition, the)97 136.2 R F0($)2.749 E F1 .249(command mak)2.749
-F .249(es the end of each line the most attracti)-.1 F .549 -.15(ve c)
--.25 H .248(ursor position rather than).15 F 2.5(as)72 148.2 S
-(peci\214c column.)-2.5 E(Each)97 164.4 Q F0(vi)2.837 E F1 .337
-(command described belo)2.837 F 2.837(wn)-.25 G .338
-(otes where the cursor ends up after it is e)-2.837 F -.15(xe)-.15 G
-2.838(cuted. This).15 F(position)2.838 E .926
-(is described in terms of characters on the line, i.e.)72 176.4 R .925
-(\231the pre)5.926 F .925(vious character\232, or)-.25 F 3.425<2c99>-.4
-G .925(the last character in the)-3.425 F 2.5(line\232. This)72 188.4 R
-(is to a)2.5 E -.2(vo)-.2 G(id needing to continually refer to on what part of the character the cursor rests.)
-.2 E(The follo)97 204.6 Q(wing w)-.25 E(ords ha)-.1 E .3 -.15(ve s)-.2 H
-(pecial meaning for).15 E F0(vi)2.5 E F1(commands.)2.5 E F0(pr)72 228.6
-Q -.15(ev)-.18 G(ious context).15 E F1 2.359(The position of the cursor before the command which caused the last absolute mo)
-97 240.6 R -.15(ve)-.15 G 2.359(ment w).15 F(as)-.1 E -.15(exe)97 252.6
-S 2.632(cuted. Each).15 F F0(vi)2.632 E F1 .132
-(command described in the ne)2.632 F .132
-(xt section that is considered an absolute mo)-.15 F -.15(ve)-.15 G .132
-(ment is).15 F .027(so noted.)97 264.6 R .027(In addition, specifying)
-5.027 F/F2 10/Times-Italic@0 SF(any)2.527 E F1 .027(address to an)2.527
-F F0(ex)2.527 E F1 .028(command is considered an absolute mo)2.527 F
--.15(ve)-.15 G(ment.).15 E F0(motion)72 288.6 Q F1 3.77(As)97 300.6 S
-(econd)-3.77 E F0(vi)3.77 E F1 1.27
-(command can be used as an optional trailing ar)3.77 F 1.269
-(gument to the)-.18 F F0 1.269(vi <)3.769 F F1(,)A F0(>)3.769 E F1(,)A
-F0(!)3.769 E F1(,)A F0(c)3.769 E F1(,)A F0(d)3.769 E F1(,)A F0(y)3.769 E
-F1 3.769(,a)C(nd)-3.769 E .076(\(depending on the)97 312.6 R F0(tildeop)
-2.577 E F1(option\))2.577 E F0(~)2.577 E F1 2.577(commands. This)2.577 F
-.077(command indicates the end of the re)2.577 F .077(gion of te)-.15 F
-(xt)-.15 E(that')97 324.6 Q 5.051(sa)-.55 G -.25(ff)-5.051 G 2.551
-(ected by the command.).25 F 2.551
-(The motion command may be either the command character)7.551 F .174
-(repeated \(in which case it means the current line\) or a cursor mo)97
-336.6 R -.15(ve)-.15 G .174(ment command.).15 F .175
-(In the latter case,)5.174 F .119(the re)97 348.6 R .119(gion af)-.15 F
-.118(fected by the command is from the starting or stopping cursor position which comes \214rst)
--.25 F .038(in the \214le, to immediately before the starting or stopping cursor position which comes later in the \214le.)
-97 360.6 R .016(Commands that operate on lines instead of using be)97
-372.6 R .016(ginning and ending cursor positions operate on all)-.15 F
-.194(of the lines that are wholly or partially in the re)97 384.6 R
-2.695(gion. In)-.15 F .195(addition, some other commands become line)
-2.695 F .527(oriented depending on where in the te)97 396.6 R .527
-(xt the)-.15 F 3.027(ya)-.15 G .527(re used.)-3.027 F .526
-(The command descriptions belo)5.527 F 3.026(wn)-.25 G .526(ote these)
--3.026 F(special cases.)97 408.6 Q(The follo)97 432.6 Q
-(wing commands may all be used as motion components for)-.25 E F0(vi)2.5
-E F1(commands:)2.5 E/F3 10/Courier@0 SF 15(<control-A> <control-H>)97
-460.8 R 9(<control-J> <control-M>)15 F 15(<control-N> <control-P>)97
-472.8 R 69(<space> $)39 F 15(%')157 484.8 S 69(<character> \( \))-15 F
-81(+,)157 496.8 S 75(-/)-6 G 81(0;)157 508.8 S 75(?B)-6 G 81(EF)157
-520.8 S 75(GH)-6 G 81(LM)157 532.8 S 75(NT)-6 G 75(W[)157 544.8 S 69([])
--75 G 75(]^)-69 G 15(_`)157 556.8 S 69(<character> b e)-15 F 81(fh)157
-568.8 S 75(jk)-6 G 81(ln)157 580.8 S 75(tw)-6 G 81({|)157 592.8 S(})-6 E
-F1 .422(The optional count pre\214x a)97 621 R -.25(va)-.2 G .422
-(ilable for some of the).25 F F0(vi)2.923 E F1 .423(commands that tak)
-2.923 F 2.923(em)-.1 G .423(otion commands, or the)-2.923 F .14
-(count pre\214x a)97 633 R -.25(va)-.2 G .14(ilable for the).25 F F0(vi)
-2.64 E F1 .139
-(commands that are used as motion components, may be included and)2.64 F
-(is)97 645 Q F2(always)3.462 E F1 .963(considered part of the motion ar)
-3.462 F 3.463(gument. F)-.18 F .963(or e)-.15 F .963
-(xample, the commands \231)-.15 F F3(c2w)A F1 3.463<9a61>C .963(nd \231)
--3.463 F F3(2cw)A F1<9a>A 1.111(are equi)97 657 R -.25(va)-.25 G 1.111
-(lent, and the re).25 F 1.111(gion af)-.15 F 1.111(fected by the)-.25 F
-F0(c)3.611 E F1 1.111(command is tw)3.611 F 3.61(ow)-.1 G 1.11
-(ords of te)-3.71 F 3.61(xt. In)-.15 F 1.11(addition, if the)3.61 F
-1.062(optional count pre\214x is speci\214ed for both the)97 669 R F0
-(vi)3.562 E F1 1.063(command and its motion component, the ef)3.563 F
-1.063(fect is)-.25 F(multiplicati)97 681 Q 1.491 -.15(ve a)-.25 H 1.191
-(nd is considered part of the motion ar).15 F 3.691(gument. F)-.18 F
-1.191(or e)-.15 F 1.19(xample, the commands \231)-.15 F F3(4cw)A F1<9a>A
-(and \231)97 693 Q F3(2c2w)A F1 2.5<9a61>C(re equi)-2.5 E -.25(va)-.25 G
-(lent, and the re).25 E(gion af)-.15 E(fected by the)-.25 E F0(c)2.5 E
-F1(command is four w)2.5 E(ords of te)-.1 E(xt.)-.15 E EP
-%%Page: 17 16
-%%BeginPageSetup
-BP
-%%EndPageSetup
-/F0 10/Times-Bold@0 SF(Nvi/Nex Refer)72 60 Q(ence \(V)-.18 E 2.5(iC)-.37
-G 233.15(ommands\) USD:13-17)-2.5 F(count)72 96 Q/F1 10/Times-Roman@0 SF
-2.559(Ap)97 108 S(ositi)-2.559 E .359 -.15(ve n)-.25 H .059
-(umber used as an optional ar).15 F .059
-(gument to most commands, either to gi)-.18 F .36 -.15(ve a s)-.25 H .06
-(ize or a position).15 F 1.168(\(for display or mo)97 120 R -.15(ve)-.15
-G 1.168
-(ment commands\), or as a repeat count \(for commands that modify te).15
-F 3.668(xt\). The)-.15 F .409(count ar)97 132 R .409(gument is al)-.18 F
--.1(wa)-.1 G .409(ys optional and def).1 F .41
-(aults to 1 unless otherwise noted in the command descrip-)-.1 F(tion.)
-97 144 Q 1.052(When a)97 168 R F0(vi)3.552 E F1 1.052
-(command synopsis sho)3.552 F 1.051(ws both a)-.25 F/F2 10/Courier@0 SF
-([buffer])3.551 E F1(and)3.551 E F2([count])3.551 E F1 3.551(,t)C(he)
--3.551 E 3.551(ym)-.15 G 1.051(ay be presented in)-3.551 F(an)97 180 Q
-2.5(yo)-.15 G(rder)-2.5 E(.)-.55 E F0 -.1(wo)72 204 S(rd).1 E F1
-(Generally)97 216 Q 2.665(,i)-.65 G 2.665(nl)-2.665 G .165
-(anguages where it is applicable,)-2.665 F F0(vi)2.666 E F1 .166
-(recognizes tw)2.666 F 2.666(ok)-.1 G .166(inds of w)-2.666 F 2.666
-(ords. First,)-.1 F 2.666(as)2.666 G .166(equence of)-2.666 F 1.853(letters, digits and underscores, delimited at both ends by: characters other than letters, digits, or)
-97 228 R .332(underscores, the be)97 240 R .333
-(ginning or end of a line, and the be)-.15 F .333
-(ginning or end of the \214le.)-.15 F .333(Second, a sequence)5.333 F
-.695(of characters other than letters, digits, underscores, or whitespace characters, delimited at both ends)
-97 252 R .514(by: a letter)97 264 R 3.014(,d)-.4 G .514
-(igit, underscore, or whitespace character)-3.014 F 3.015(,t)-.4 G .515
-(he be)-3.015 F .515(ginning or end of a line, and the be)-.15 F(gin-)
--.15 E .6(ning or end of the \214le.)97 276 R -.15(Fo)5.6 G 3.099(re).15
-G .599(xample, the characters \231)-3.249 F F2(!@#abc$%^)6.599 E F1
-3.099<9a63>6.599 G .599(ontain three w)-3.099 F .599(ords: \231)-.1 F F2
-(!@#)A F1<9a2c>A<99>97 288 Q F2(abc)A F1 2.5<9a61>C(nd \231)-2.5 E F2
-($%^)A F1<9a2e>A(Groups of empty lines \(or lines containing only whitespace characters\) are treated as a single w)
-97 312 Q(ord.)-.1 E F0(bigw)72 336 Q(ord)-.1 E F1 2.758(As)97 348 S .258
-(et of non-whitespace characters preceded and follo)-2.758 F .259
-(wed by whitespace characters or the be)-.25 F(ginning)-.15 E 1.88
-(or end of the \214le or line.)97 360 R -.15(Fo)6.88 G 4.38(re).15 G
-1.88(xample, the characters \231)-4.53 F F2(!@#abc$%^)7.88 E F1 4.38
-<9a63>7.88 G 1.88(ontain one bigw)-4.38 F(ord:)-.1 E<99>97 372 Q F2
-(!@#abc$%^)A F1<9a2e>A 1.121(Groups of empty lines \(or lines containing only whitespace characters\) are treated as a single big-)
-97 396 R -.1(wo)97 408 S(rd.).1 E F0(paragraph)72 432 Q F1 .693
-(An area of te)97 444 R .693(xt that be)-.15 F .693
-(gins with either the be)-.15 F .692
-(ginning of a \214le, an empty line, or a section boundary)-.15 F(,)-.65
-E(and continues until either an empty line, section boundary)97 456 Q
-2.5(,o)-.65 G 2.5(rt)-2.5 G(he end of the \214le.)-2.5 E .825(Groups of empty lines \(or lines containing only whitespace characters\) are treated as a single para-)
-97 480 R(graph.)97 492 Q
-(Additional paragraph boundaries can be de\214ned using the)97 516 Q F0
-(paragraphs)2.5 E F1(option.)2.5 E F0(section)72 540 Q F1 .021
-(An area of te)97 552 R .021(xt that starts with the be)-.15 F .021(ginning of the \214le or a line whose \214rst character is an open brace)
--.15 F<2899>97 564 Q F2({)A F1(\232\) and continues until the ne)A
-(xt section or the end of the \214le.)-.15 E
-(Additional section boundaries can be de\214ned using the)97 588 Q F0
-(sections)2.5 E F1(option.)2.5 E F0(sentence)72 612 Q F1 .215
-(An area of te)97 624 R .215(xt that be)-.15 F .215
-(gins with either the be)-.15 F .216
-(ginning of the \214le or the \214rst nonblank character follo)-.15 F
-(w-)-.25 E .448(ing the pre)97 636 R .447(vious sentence, paragraph, or section boundary and continues until the end of the \214le or a)
--.25 F .589(period \(\231)97 648 R F2(.)A F1 3.089(\232\) e)B .589
-(xclamation point \(\231)-.15 F F2(!)A F1 3.089(\232\) or)B .589
-(question mark \(\231)3.089 F F2(?)A F1 3.089(\232\) character)B 3.089
-(,f)-.4 G(ollo)-3.089 E .59(wed by either an end-)-.25 F .272
-(of-line or tw)97 660 R 2.772(ow)-.1 G .272(hitespace characters.)-2.772
-F(An)5.272 E 2.772(yn)-.15 G .271(umber of closing parentheses \(\231)
--2.772 F F2(\))A F1 .271(\232\), brack)B .271(ets \(\231)-.1 F F2(])A F1
-.271(\232\), dou-)B .138(ble-quote \(\231)97 672 R F2(")A F1 .138
-(\232\) or single quote \(\231)B F2(')A F1 .139
-(\232\) characters can appear between the period, e)B .139
-(xclamation point, or)-.15 F
-(question mark and the whitespace characters or end-of-line.)97 684 Q
-1.084(Groups of empty lines \(or lines containing only whitespace characters\) are treated as a single sen-)
-97 708 R(tence.)97 720 Q EP
-%%Page: 18 17
-%%BeginPageSetup
-BP
-%%EndPageSetup
-/F0 10/Times-Bold@0 SF 233.15(USD:13-18 Nvi/Nex)72 60 R(Refer)2.5 E
-(ence \(V)-.18 E 2.5(iC)-.37 G(ommands\))-2.5 E 2.5(13. V)72 96 R 2.5
-(iC)-.37 G(ommands)-2.5 E/F1 10/Times-Roman@0 SF .831(The follo)97 112.2
-R .831(wing section describes the commands a)-.25 F -.25(va)-.2 G .831
-(ilable in the command mode of the).25 F F0(vi)3.332 E F1(editor)3.332 E
-5.832(.I)-.55 G(n)-5.832 E .23(each entry belo)72 124.2 R 1.53 -.65
-(w, t)-.25 H .23
-(he tag line is a usage synopsis for the command character).65 F 5.229
-(.I)-.55 G 2.729(na)-5.229 G .229(ddition, the \214nal line and)-2.729 F
-(column the cursor rests upon, and an)72 136.2 Q 2.5(yo)-.15 G
-(ptions which af)-2.5 E(fect the command are noted.)-.25 E F0
-([count] <contr)72 160.2 Q(ol-A>)-.18 E F1 .558(Search forw)97 172.2 R
-(ard)-.1 E/F2 10/Courier@0 SF(count)3.058 E F1 .558
-(times for the current w)3.058 F 3.058(ord. The)-.1 F .558(current w)
-3.058 F .558(ord be)-.1 F .558(gins at the \214rst non-whites-)-.15 F
-.488(pace character on or after the current cursor position, and e)97
-184.2 R .487(xtends up to the ne)-.15 F .487(xt non-w)-.15 F .487
-(ord character)-.1 F .093(or the end of the line.)97 196.2 R .093
-(The search is literal, i.e. no characters in the w)5.093 F .093(ord ha)
--.1 F .393 -.15(ve a)-.2 H .393 -.15(ny s).15 H .093(pecial meaning in)
-.15 F .049(terms of Re)97 208.2 R .049(gular Expressions.)-.15 F .048(It is an error if no matching pattern is found between the starting posi-)
-5.049 F(tion and the end of the \214le.)97 220.2 Q(The)97 244.2 Q F0
-(<contr)3.284 E(ol-A>)-.18 E F1 .784(command is an absolute mo)3.284 F
--.15(ve)-.15 G 3.285(ment. The).15 F F0(<contr)3.285 E(ol-A>)-.18 E F1
-.785(command may be used as)3.285 F .265(the motion component of other)
-97 256.2 R F0(vi)2.764 E F1 .264(commands, in which case an)2.764 F
-2.764(yt)-.15 G -.15(ex)-2.764 G 2.764(tc).15 G .264(opied into a b)
--2.764 F(uf)-.2 E .264(fer is character)-.25 F(oriented.)97 268.2 Q
-21.39(Line: Set)97 292.2 R(to the line where the w)2.5 E(ord is found.)
--.1 E 7.49(Column: Set)97 304.2 R(to the \214rst character of the w)2.5
-E(ord.)-.1 E 8.05(Options: Af)97 316.2 R(fected by the)-.25 E F0(ignor)
-2.5 E(ecase)-.18 E F1(and)2.5 E F0(wrapscan)2.5 E F1(options.)2.5 E F0
-([count] <contr)72 340.2 Q(ol-B>)-.18 E F1 -.15(Pa)97 352.2 S .767
-(ge backw).15 F(ard)-.1 E F2(count)3.267 E F1 3.267(screens. T)3.267 F
-.967 -.1(wo l)-.8 H .767(ines of o).1 F -.15(ve)-.15 G .767
-(rlap are maintained, if possible, by displaying the).15 F(windo)97
-364.2 Q 5.907(ws)-.25 G 3.407(tarting at line)-5.907 F F2 3.407
-(\(top_line - count * window_size\) + 2)5.907 F F1 5.906(,w)C(here)
--5.906 E F2(win-)5.906 E(dow_size)97 376.2 Q F1 .506(is the v)3.006 F
-.506(alue of the)-.25 F F0(windo)3.006 E(w)-.1 E F1 3.007(option. \(In)
-3.007 F .507(the case of split screens, this size is corrected to)3.007
-F(the current screen size.\))97 388.2 Q(It is an error if the mo)5 E
--.15(ve)-.15 G(ment is past the be).15 E(ginning of the \214le.)-.15 E
-21.39(Line: Set)97 412.2 R(to the last line of te)2.5 E
-(xt displayed on the screen.)-.15 E 7.49(Column: Set)97 424.2 R
-(to the \214rst nonblank character of the line.)2.5 E 8.05(Options: Af)
-97 436.2 R(fected by the)-.25 E F0(windo)2.5 E(w)-.1 E F1(option.)2.5 E
-F0([count] <contr)72 460.2 Q(ol-D>)-.18 E F1 .447(Scroll forw)97 472.2 R
-(ard)-.1 E F2(count)2.947 E F1 2.947(lines. If)2.947 F F2(count)2.947 E
-F1 .447(is not speci\214ed, scroll forw)2.947 F .446
-(ard the number of lines speci\214ed)-.1 F .71(by the last)97 484.2 R F0
-(<contr)3.21 E(ol-D>)-.18 E F1(or)3.21 E F0(<contr)3.211 E(ol-U>)-.18 E
-F1 3.211(command. If)3.211 F .711(this is the \214rst)3.211 F F0(<contr)
-3.211 E(ol-D>)-.18 E F1(or)3.211 E F0(<contr)3.211 E(ol-U>)-.18 E F1
-1.289(command, scroll forw)97 496.2 R 1.289
-(ard half the number of lines in the screen.)-.1 F 1.289
-(\(In the case of split screens, the)6.289 F(def)97 508.2 Q .046(ault scrolling distance is corrected to half the current screen size.\))
--.1 F .046(It is an error if the mo)5.046 F -.15(ve)-.15 G .047(ment is)
-.15 F(past the end of the \214le.)97 520.2 Q 21.39(Line: Set)97 544.2 R
-(to the current line plus the number of lines scrolled.)2.5 E 7.49
-(Column: Set)97 556.2 R(to the \214rst nonblank character of the line.)
-2.5 E 8.05(Options: None.)97 568.2 R F0([count] <contr)72 592.2 Q(ol-E>)
--.18 E F1 .743(Scroll forw)97 604.2 R(ard)-.1 E F2(count)3.243 E F1 .743
-(lines, lea)3.243 F .743
-(ving the cursor on the current line and column, if possible.)-.2 F .743
-(It is an)5.743 F(error if the mo)97 616.2 Q -.15(ve)-.15 G
-(ment is past the end of the \214le.).15 E 21.39(Line: Unchanged)97
-640.2 R .43(unless the current line scrolls of)2.93 F 2.93(ft)-.25 G .43
-(he screen, in which case it is set to the \214rst)-2.93 F
-(line on the screen.)142 652.2 Q 7.49(Column: Unchanged)97 664.2 R .201
-(unless the current line scrolls of)2.702 F 2.701(ft)-.25 G .201
-(he screen, in which case it is set to the most)-2.701 F(attracti)142
-676.2 Q .3 -.15(ve c)-.25 H(ursor position.).15 E 8.05(Options: None.)97
-688.2 R F0([count] <contr)72 712.2 Q(ol-F>)-.18 E F1 -.15(Pa)97 724.2 S
-1.282(ge forw).15 F(ard)-.1 E F2(count)3.782 E F1 3.783(screens. T)3.783
-F 1.483 -.1(wo l)-.8 H 1.283(ines of o).1 F -.15(ve)-.15 G 1.283
-(rlap are maintained, if possible, by displaying the).15 F EP
-%%Page: 19 18
-%%BeginPageSetup
-BP
-%%EndPageSetup
-/F0 10/Times-Bold@0 SF(Nvi/Nex Refer)72 60 Q(ence \(V)-.18 E 2.5(iC)-.37
-G 233.15(ommands\) USD:13-19)-2.5 F/F1 10/Times-Roman@0 SF(windo)97 96 Q
-2.632(ws)-.25 G .132(tarting at line)-2.632 F/F2 10/Courier@0 SF .132
-(top_line + count * window_size - 2)2.632 F F1 2.631(,w)C(here)-2.631 E
-F2(window_size)2.631 E F1(is)2.631 E 1.291(the v)97 108 R 1.291
-(alue of the)-.25 F F0(windo)3.791 E(w)-.1 E F1 3.791(option. \(In)3.791
-F 1.292
-(the case of split screens, this size is corrected to the current)3.792
-F(screen size.\))97 120 Q(It is an error if the mo)5 E -.15(ve)-.15 G
-(ment is past the end of the \214le.).15 E 21.39(Line: Set)97 144 R
-(to the \214rst line on the screen.)2.5 E 7.49(Column: Set)97 156 R
-(to the \214rst nonblank character of the current line.)2.5 E 8.05
-(Options: Af)97 168 R(fected by the)-.25 E F0(windo)2.5 E(w)-.1 E F1
-(option.)2.5 E F0(<contr)72 192 Q(ol-G>)-.18 E F1 1.377
-(Display the \214le information.)97 204 R 1.376
-(The information includes the current pathname, the current line, the)
-6.376 F .27(number of total lines in the \214le, the current line as a percentage of the total lines in the \214le, if the \214le)
-97 216 R .354(has been modi\214ed, w)97 228 R .353(as able to be lock)
--.1 F .353(ed, if the \214le')-.1 F 2.853(sn)-.55 G .353
-(ame has been changed, and if the edit session)-2.853 F(is read-only)97
-240 Q(.)-.65 E 21.39(Line: Unchanged.)97 264 R 7.49(Column: Unchanged.)
-97 276 R 8.05(Options: None.)97 288 R F0([count] <contr)72 312 Q(ol-H>)
--.18 E([count] h)72 324 Q F1(Mo)97 336 Q .78 -.15(ve t)-.15 H .48
-(he cursor back).15 F F2(count)2.98 E F1 .48
-(characters in the current line.)2.98 F .481
-(It is an error if the cursor is on the \214rst)5.48 F
-(character in the line.)97 348 Q(The)97 372 Q F0(<contr)2.916 E(ol-H>)
--.18 E F1(and)2.916 E F0(h)2.916 E F1 .416
-(commands may be used as the motion component of other)2.916 F F0(vi)
-2.915 E F1 .415(commands, in)2.915 F(which case an)97 384 Q 2.5(yt)-.15
-G -.15(ex)-2.5 G 2.5(tc).15 G(opied into a b)-2.5 E(uf)-.2 E
-(fer is character oriented.)-.25 E 21.39(Line: Unchanged.)97 408 R 7.49
-(Column: Set)97 420 R .803(to the)3.303 F F2 .803(current - count)3.303
-F F1(character)3.303 E 3.303(,o)-.4 G 1.603 -.4(r, t)-3.303 H .803
-(he \214rst character in the line if).4 F F2(count)3.304 E F1(is)3.304 E
-(greater than or equal to the number of characters in the line before the cursor)
-142 432 Q(.)-.55 E 8.05(Options: None.)97 444 R F0([count] <contr)72 468
-Q(ol-J>)-.18 E([count] <contr)72 480 Q(ol-N>)-.18 E([count] j)72 492 Q
-F1(Mo)97 504 Q 2.373 -.15(ve t)-.15 H 2.073(he cursor do).15 F(wn)-.25 E
-F2(count)4.573 E F1 2.073(lines without changing the current column.)
-4.573 F 2.072(It is an error if the)7.072 F(mo)97 516 Q -.15(ve)-.15 G
-(ment is past the end of the \214le.).15 E(The)97 540 Q F0(<contr)3.363
-E(ol-J>)-.18 E F1(,)A F0(<contr)3.363 E(ol-N>)-.18 E F1(and)3.363 E F0
-(j)3.363 E F1 .863
-(commands may be used as the motion component of other)3.363 F F0(vi)
-3.364 E F1(commands, in which case an)97 552 Q 2.5(yt)-.15 G -.15(ex)
--2.5 G 2.5(tc).15 G(opied into a b)-2.5 E(uf)-.2 E
-(fer is line oriented.)-.25 E 21.39(Line: Set)97 576 R
-(to the current line plus)2.5 E F2(count)2.5 E F1(.)A 7.49(Column: The)
-97 588 R(most attracti)2.5 E .3 -.15(ve c)-.25 H(ursor position.).15 E
-8.05(Options: None.)97 600 R F0(<contr)72 624 Q(ol-L>)-.18 E(<contr)72
-636 Q(ol-R>)-.18 E F1(Repaint the screen.)97 648 Q 21.39
-(Line: Unchanged.)97 672 R 7.49(Column: Unchanged.)97 684 R 8.05
-(Options: None.)97 696 R EP
-%%Page: 20 19
-%%BeginPageSetup
-BP
-%%EndPageSetup
-/F0 10/Times-Bold@0 SF 233.15(USD:13-20 Nvi/Nex)72 60 R(Refer)2.5 E
-(ence \(V)-.18 E 2.5(iC)-.37 G(ommands\))-2.5 E([count] <contr)72 96 Q
-(ol-M>)-.18 E([count] +)72 108 Q/F1 10/Times-Roman@0 SF(Mo)97 120 Q
-1.125 -.15(ve t)-.15 H .825(he cursor do).15 F(wn)-.25 E/F2 10/Courier@0
-SF(count)3.325 E F1 .825
-(lines to the \214rst nonblank character of that line.)3.325 F .824
-(It is an error if the)5.825 F(mo)97 132 Q -.15(ve)-.15 G
-(ment is past the end of the \214le.).15 E(The)97 156 Q F0(<contr)2.803
-E(ol-M>)-.18 E F1(and)2.803 E F0(+)2.803 E F1 .303
-(commands may be used as the motion component of other)2.803 F F0(vi)
-2.803 E F1 .304(commands, in)2.804 F(which case an)97 168 Q 2.5(yt)-.15
-G -.15(ex)-2.5 G 2.5(tc).15 G(opied into a b)-2.5 E(uf)-.2 E
-(fer is line oriented.)-.25 E 21.39(Line: Set)97 192 R
-(to the current line plus)2.5 E F2(count)2.5 E F1(.)A 7.49(Column: Set)
-97 204 R(to the \214rst nonblank character in the line.)2.5 E 8.05
-(Options: None.)97 216 R F0([count] <contr)72 240 Q(ol-P>)-.18 E
-([count] k)72 252 Q F1(Mo)97 264 Q 2.965 -.15(ve t)-.15 H 2.665
-(he cursor up).15 F F2(count)5.165 E F1 2.664
-(lines, without changing the current column.)5.165 F 2.664
-(It is an error if the)7.664 F(mo)97 276 Q -.15(ve)-.15 G
-(ment is past the be).15 E(ginning of the \214le.)-.15 E(The)97 300 Q F0
-(<contr)3.02 E(ol-P>)-.18 E F1(and)3.02 E F0(k)3.02 E F1 .52
-(commands may be used as the motion component of other)3.02 F F0(vi)3.02
-E F1 .52(commands, in)3.02 F(which case an)97 312 Q 2.5(yt)-.15 G -.15
-(ex)-2.5 G 2.5(tc).15 G(opied into a b)-2.5 E(uf)-.2 E
-(fer is line oriented.)-.25 E 21.39(Line: Set)97 336 R
-(to the current line minus)2.5 E F2(count)2.5 E F1(.)A 7.49(Column: The)
-97 348 R(most attracti)2.5 E .3 -.15(ve c)-.25 H(ursor position.).15 E
-8.05(Options: None.)97 360 R F0(<contr)72 384 Q(ol-T>)-.18 E F1
-(Return to the most recent tag conte)97 396 Q 2.5(xt. The)-.15 F F0
-(<contr)2.5 E(ol-T>)-.18 E F1(command is an absolute mo)2.5 E -.15(ve)
--.15 G(ment.).15 E 21.39(Line: Set)97 420 R(to the conte)2.5 E
-(xt of the pre)-.15 E(vious tag command.)-.25 E 7.49(Column: Set)97 432
-R(to the conte)2.5 E(xt of the pre)-.15 E(vious tag command.)-.25 E 8.05
-(Options: None.)97 444 R F0([count] <contr)72 468 Q(ol-U>)-.18 E F1 .262
-(Scroll backw)97 480 R(ard)-.1 E F2(count)2.762 E F1 2.762(lines. If)
-2.762 F F2(count)2.762 E F1 .262(is not speci\214ed, scroll backw)2.762
-F .262(ard the number of lines speci-)-.1 F .358(\214ed by the last)97
-492 R F0(<contr)2.858 E(ol-D>)-.18 E F1(or)2.858 E F0(<contr)2.858 E
-(ol-U>)-.18 E F1 2.858(command. If)2.858 F .358(this is the \214rst)
-2.858 F F0(<contr)2.858 E(ol-D>)-.18 E F1(or)2.858 E F0(<contr)2.858 E
-(ol-)-.18 E(U>)97 504 Q F1 .823(command, scroll backw)3.323 F .823
-(ard half the number of lines in the screen.)-.1 F .823
-(\(In the case of split screens,)5.823 F 2.335(the def)97 516 R 2.335(ault scrolling distance is corrected to half the current screen size.\))
--.1 F 2.336(It is an error if the)7.335 F(mo)97 528 Q -.15(ve)-.15 G
-(ment is past the be).15 E(ginning of the \214le.)-.15 E 21.39
-(Line: Set)97 552 R(to the current line minus the amount scrolled.)2.5 E
-7.49(Column: Set)97 564 R
-(to the \214rst nonblank character in the line.)2.5 E 8.05
-(Options: None.)97 576 R F0(<contr)72 600 Q(ol-W>)-.18 E F1 .535
-(Switch to the ne)97 612 R .535(xt lo)-.15 F .535
-(wer screen in the windo)-.25 F 1.835 -.65(w, o)-.25 H 1.335 -.4(r, t)
-.65 H 3.035(ot).4 G .535(he \214rst screen if there are no lo)-3.035 F
-.535(wer screens in)-.25 F(the windo)97 624 Q -.65(w.)-.25 G 21.39
-(Line: Set)97 648 R(to the pre)2.5 E(vious cursor position in the windo)
--.25 E -.65(w.)-.25 G 7.49(Column: Set)97 660 R(to the pre)2.5 E
-(vious cursor position in the windo)-.25 E -.65(w.)-.25 G 8.05
-(Options: None.)97 672 R F0([count] <contr)72 696 Q(ol-Y>)-.18 E F1 .532
-(Scroll backw)97 708 R(ard)-.1 E F2(count)3.032 E F1 .532(lines, lea)
-3.032 F .532(ving the current line and column as is, if possible.)-.2 F
-.533(It is an error if)5.532 F(the mo)97 720 Q -.15(ve)-.15 G
-(ment is past the be).15 E(ginning of the \214le.)-.15 E EP
-%%Page: 21 20
-%%BeginPageSetup
-BP
-%%EndPageSetup
-/F0 10/Times-Bold@0 SF(Nvi/Nex Refer)72 60 Q(ence \(V)-.18 E 2.5(iC)-.37
-G 233.15(ommands\) USD:13-21)-2.5 F/F1 10/Times-Roman@0 SF 21.39
-(Line: Unchanged)97 96 R .529(unless the current line scrolls of)3.029 F
-3.028(ft)-.25 G .528(he screen, in which case it is set to the last)
--3.028 F(line of te)142 108 Q(xt displayed on the screen.)-.15 E 7.49
-(Column: Unchanged)97 120 R 1.82(unless the current line scrolls of)4.32
-F 4.321(ft)-.25 G 1.821(he screen, in which case it is the most)-4.321 F
-(attracti)142 132 Q .3 -.15(ve c)-.25 H(ursor position.).15 E 8.05
-(Options: None.)97 144 R F0(<contr)72 168 Q(ol-Z>)-.18 E F1 .325
-(Suspend the current editor session.)97 180 R .325
-(If the \214le has been modi\214ed since it w)5.325 F .325
-(as last completely written,)-.1 F .196(and the)97 192 R F0(auto)2.696 E
-(write)-.1 E F1 .196(option is set, the \214le is written before the editor session is suspended.)
-2.696 F .197(If this write)5.196 F -.1(fa)97 204 S
-(ils, the editor session is not suspended.).1 E 21.39(Line: Unchanged.)
-97 228 R 7.49(Column: Unchanged.)97 240 R 8.05(Options: Af)97 252 R
-(fected by the)-.25 E F0(auto)2.5 E(write)-.1 E F1(option.)2.5 E F0
-(<escape>)72 276 Q F1(Ex)97 288 Q(ecute)-.15 E F0(ex)2.579 E F1 .079
-(commands or cancel partial commands.)2.579 F .078(If an)5.078 F F0(ex)
-2.578 E F1 .078(command is being entered \(e.g.)2.578 F F0(/)5.078 E F1
-(,)A F0(?)2.578 E F1(,)A F0(:)2.578 E F1(or)2.578 E F0(!)97 300 Q F1
-3.67(\), the command is e)B -.15(xe)-.15 G 6.171(cuted. If).15 F 6.171
-(ap)6.171 G 3.671(artial command has been entered, e.g.)-6.171 F<99>
-8.671 E/F2 10/Courier@0 SF([0-9]*)A F1 3.671(\232, or)B<99>97 312 Q F2
-([0-9]*[!<>cdy])A F1(\232, the command is cancelled.)A
-(Otherwise, it is an error)5 E(.)-.55 E 21.39(Line: When)97 336 R(an)
-2.875 E F0(ex)2.875 E F1 .375(command is being e)2.875 F -.15(xe)-.15 G
-.374(cuted, the current line is set as described for that com-).15 F 2.5
-(mand. Otherwise,)142 348 R(unchanged.)2.5 E 7.49(Column: When)97 360 R
-(an)3.436 E F0(ex)3.436 E F1 .936(command is being e)3.436 F -.15(xe)
--.15 G .936(cuted, the current column is set as described for that).15 F
-2.5(command. Otherwise,)142 372 R(unchanged.)2.5 E 8.05(Options: None.)
-97 384 R F0(<contr)72 408 Q(ol-]>)-.18 E F1 .363
-(Push a tag reference onto the tag stack.)97 420 R .363
-(The tags \214les \(see the)5.363 F F0(tags)2.863 E F1 .362
-(option for more information\) are)2.863 F .996
-(searched for a tag matching the current w)97 432 R 3.497(ord. The)-.1 F
-.997(current w)3.497 F .997(ord be)-.1 F .997
-(gins at the \214rst non-whitespace)-.15 F .181
-(character on or after the current cursor position, and e)97 444 R .18
-(xtends up to the ne)-.15 F .18(xt non-w)-.15 F .18
-(ord character or the)-.1 F .228(end of the line.)97 456 R .228(If a matching tag is found, the current \214le is discarded and the \214le containing the tag)
-5.228 F(reference is edited.)97 468 Q .296
-(If the current \214le has been modi\214ed since it w)97 492 R .296
-(as last completely written, the command will f)-.1 F 2.795(ail. The)-.1
-F F0(<contr)97 504 Q(ol-]>)-.18 E F1(command is an absolute mo)2.5 E
--.15(ve)-.15 G(ment.).15 E 21.39(Line: Set)97 528 R
-(to the line containing the matching tag string.)2.5 E 7.49(Column: Set)
-97 540 R(to the start of the matching tag string.)2.5 E 8.05
-(Options: Af)97 552 R(fected by the)-.25 E F0(tags)2.5 E F1(and)2.5 E F0
-(taglength)2.5 E F1(options.)2.5 E F0(<contr)72 576 Q(ol-^>)-.18 E F1
-(Switch to the most recently edited \214le.)97 588 Q .34
-(If the \214le has been modi\214ed since it w)97 612 R .341
-(as last completely written, and the)-.1 F F0(auto)2.841 E(write)-.1 E
-F1 .341(option is set, the)2.841 F .804(\214le is written out.)97 624 R
-.804(If this write f)5.804 F .804(ails, the command will f)-.1 F 3.304
-(ail. Otherwise,)-.1 F .804(if the current \214le has been)3.304 F
-(modi\214ed since it w)97 636 Q
-(as last completely written, the command will f)-.1 E(ail.)-.1 E 21.39
-(Line: Set)97 660 R(to the line the cursor w)2.5 E
-(as on when the \214le w)-.1 E(as last edited.)-.1 E 7.49(Column: Set)97
-672 R(to the column the cursor w)2.5 E(as on when the \214le w)-.1 E
-(as last edited.)-.1 E 8.05(Options: Af)97 684 R(fected by the)-.25 E F0
-(auto)2.5 E(write)-.1 E F1(option.)2.5 E F0([count] <space>)72 708 Q EP
-%%Page: 22 21
-%%BeginPageSetup
-BP
-%%EndPageSetup
-/F0 10/Times-Bold@0 SF 233.15(USD:13-22 Nvi/Nex)72 60 R(Refer)2.5 E
-(ence \(V)-.18 E 2.5(iC)-.37 G(ommands\))-2.5 E([count] l)72 96 Q/F1 10
-/Times-Roman@0 SF(Mo)97 108 Q 1.358 -.15(ve t)-.15 H 1.058
-(he cursor forw).15 F(ard)-.1 E/F2 10/Courier@0 SF(count)3.558 E F1
-1.059(characters without changing the current line.)3.559 F 1.059
-(It is an error if the)6.059 F
-(cursor is on the last character in the line.)97 120 Q(The)97 144 Q F0
-(<space>)2.538 E F1(and)2.538 E F0(l)2.538 E F1 .038
-(commands may be used as the motion component of other)2.538 F F0(vi)
-2.537 E F1 .037(commands, in which)2.537 F .33(case an)97 156 R 2.83(yt)
--.15 G -.15(ex)-2.83 G 2.83(tc).15 G .33(opied into a b)-2.83 F(uf)-.2 E
-.331(fer is character oriented.)-.25 F .331
-(In addition, these commands may be used as)5.331 F .382(the motion components of other commands when the cursor is on the last character in the line, with-)
-97 168 R(out error)97 180 Q(.)-.55 E 21.39(Line: Unchanged.)97 204 R
-7.49(Column: Set)97 216 R .262(to the current character plus the ne)
-2.761 F(xt)-.15 E F2(count)2.762 E F1 .262
-(characters, or to the last character on the)2.762 F .271(line if)142
-228 R F2(count)2.771 E F1 .271(is greater than the number of characters in the line after the current charac-)
-2.771 F(ter)142 240 Q(.)-.55 E 8.05(Options: None.)97 252 R F0
-([count] ! motion shell-ar)72 276 Q(gument\(s\)<carriage-r)-.1 E(etur)
--.18 E(n>)-.15 E F1 .118(Replace te)97 288 R .118
-(xt with results from a shell command.)-.15 F -.15(Pa)5.118 G .118
-(ss the lines speci\214ed by the).15 F F2(count)2.618 E F1(and)2.619 E
-F2(motion)2.619 E F1(ar)97 300 Q .712
-(guments as standard input to the program named by the)-.18 F F0(shell)
-3.212 E F1 .712(option, and replace those lines with)3.212 F(the output \(both standard error and standard output\) of that command.)
-97 312 Q(After the motion is entered,)97 336 Q F0(vi)2.5 E F1
-(prompts for ar)2.5 E(guments to the shell command.)-.18 E -.4(Wi)97 360
-S .14(thin those ar).4 F .14(guments, \231)-.18 F F2(%)A F1 2.64<9a61>C
-.14(nd \231)-2.64 F F2(#)A F1 2.64<9a63>C .14(haracters are e)-2.64 F
-.14(xpanded to the current and alternate pathnames,)-.15 F(respecti)97
-372 Q -.15(ve)-.25 G(ly).15 E 6.089(.T)-.65 G 1.089(he \231)-6.089 F F2
-(!)A F1 6.089<9a63>C 1.089(haracter is e)-6.089 F 1.089
-(xpanded with the command te)-.15 F 1.089(xt of the pre)-.15 F(vious)
--.25 E F0(!)3.588 E F1(or)6.088 E F0(:!)3.588 E F1(com-)6.088 E 2.648
-(mands. \(Therefore,)97 384 R .148(the command)2.648 F F0(!<motion>!)
-2.648 E F1 .148(repeats the pre)5.148 F(vious)-.25 E F0(!)2.648 E F1
-2.649(command.\) The)5.149 F .149(special mean-)2.649 F .498
-(ings of \231)97 396 R F2(%)A F1 .498<9a2c2099>B F2(#)A F1 2.998<9a61>C
-.498(nd \231)-2.998 F F2(!)A F1 5.498<9a63>C .498(an be o)-5.498 F -.15
-(ve)-.15 G .498(rridden by escaping them with a backslash.).15 F .498
-(If no)5.498 F F0(!)2.998 E F1(or)5.498 E F0(:!)2.998 E F1(com-)5.498 E
-1.03(mand has yet been e)97 408 R -.15(xe)-.15 G 1.03
-(cuted, it is an error to use an unescaped \231).15 F F2(!)A F1 6.03
-<9a63>C 1.03(haracter as a shell ar)-6.03 F(gument.)-.18 E(The)97 420 Q
-F0(!)3.835 E F1 1.334(command does)6.335 F/F3 10/Times-Italic@0 SF(not)
-3.834 E F1 1.334(do shell e)3.834 F 1.334(xpansion on the strings pro)
--.15 F 1.334(vided as ar)-.15 F 3.834(guments. If)-.18 F(an)3.834 E
-3.834(yo)-.15 G 3.834(ft)-3.834 G(he)-3.834 E(abo)97 432 Q .949 -.15
-(ve ex)-.15 H .649(pansions change the ar).15 F .649
-(guments the user entered, the command is redisplayed at the bottom)-.18
-F(of the screen.)97 444 Q F0 -.37(Vi)97 468 S F1 .863(then e)3.733 F
--.15(xe)-.15 G .863(cutes the program named by the).15 F F0(shell)3.363
-E F1 .863(option, with a)3.363 F F0<ad63>3.363 E F1 .863(\215ag follo)
-3.363 F .863(wed by the ar)-.25 F(guments)-.18 E(\(which are b)97 480 Q
-(undled into a single ar)-.2 E(gument\).)-.18 E(The)97 504 Q F0(!)2.5 E
-F1(command is permitted in an empty \214le.)5 E
-(If the \214le has been modi\214ed since it w)97 528 Q
-(as last completely written, the)-.1 E F0(!)2.5 E F1(command will w)5 E
-(arn you.)-.1 E 21.39(Line: The)97 552 R
-(\214rst line of the replaced te)2.5 E(xt.)-.15 E 7.49(Column: The)97
-564 R(\214rst column of the replaced te)2.5 E(xt.)-.15 E 8.05
-(Options: Af)97 576 R(fected by the)-.25 E F0(shell)2.5 E F1(option.)2.5
-E F0([count] # #|+|-)72 600 Q F1 .238
-(Increment or decrement the number referenced by the cursor)97 612 R
-5.238(.I)-.55 G 2.738(ft)-5.238 G .238(he trailing character is a)-2.738
-F F2(+)2.739 E F1(or)2.739 E F2(#)2.739 E F1 2.739(,t)C(he)-2.739 E 1.3
-(number is incremented by)97 624 R F2(count)3.8 E F1 6.3(.I)C 3.8(ft)
--6.3 G 1.3(he trailing character is a)-3.8 F F2(-)3.8 E F1 3.8(,t)C 1.3
-(he number is decremented by)-3.8 F F2(count)97 636 Q F1(.)A 2.79(Al)97
-660 S .29(eading \231)-2.79 F F2(0X)A F1 2.79<9a6f>C 2.79<7299>-2.79 G
-F2(0x)-2.79 E F1 2.79<9a63>C .29
-(auses the number to be interpreted as a he)-2.79 F .29
-(xadecimal number)-.15 F 5.29(.O)-.55 G .29(therwise, a)-5.29 F .316
-(leading \231)97 672 R F2(0)A F1 2.816<9a63>C .315
-(auses the number to be interpreted as an octal number)-2.816 F 2.815
-(,u)-.4 G .315(nless a non-octal digit is found)-2.815 F 1
-(as part of the number)97 684 R 6(.O)-.55 G 1
-(therwise, the number is interpreted as a decimal number)-6 F 3.5(,a)-.4
-G 1(nd may ha)-3.5 F 1.3 -.15(ve a)-.2 H(leading)97 696 Q F2(+)2.699 E
-F1(or)2.699 E F2(-)2.699 E F1 2.699(sign. The)2.699 F .199
-(current number be)2.699 F .199
-(gins at the \214rst non-blank character at or after the current)-.15 F
-.155(cursor position, and e)97 708 R .156
-(xtends up to the end of the line or the \214rst character that isn')
--.15 F 2.656(tap)-.18 G .156(ossible charac-)-2.656 F .083
-(ter for the numeric type.)97 720 R .083
-(The format of the number \(e.g. leading 0')5.083 F .082
-(s, signs\) is retained unless the ne)-.55 F(w)-.25 E EP
-%%Page: 23 22
-%%BeginPageSetup
-BP
-%%EndPageSetup
-/F0 10/Times-Bold@0 SF(Nvi/Nex Refer)72 60 Q(ence \(V)-.18 E 2.5(iC)-.37
-G 233.15(ommands\) USD:13-23)-2.5 F/F1 10/Times-Roman@0 SF -.25(va)97 96
-S(lue cannot be represented in the pre).25 E(vious format.)-.25 E 2.402
-(Octal and he)97 120 R 2.403(xadecimal numbers, and the result of the operation, must \214t into an \231)
--.15 F/F2 10/Courier@0 SF(unsigned)A(long)97 132 Q F1 2.911
-(\232. Similarly)B 2.911(,d)-.65 G .411
-(ecimal numbers and their result must \214t into a \231)-2.911 F F2 .41
-(signed long)B F1 2.91(\232. It)B .41(is an error)2.91 F
-(to use this command when the cursor is not positioned at a number)97
-144 Q(.)-.55 E 21.39(Line: Unchanged.)97 180 R 7.49(Column: Set)97 192 R
-(to the \214rst character in the cursor number)2.5 E(.)-.55 E 8.05
-(Options: None.)97 204 R F0([count] $)72 228 Q F1(Mo)97 240 Q 1.177 -.15
-(ve t)-.15 H .878(he cursor to the end of a line.).15 F(If)5.878 E F2
-(count)3.378 E F1 .878(is speci\214ed, the cursor mo)3.378 F -.15(ve)
--.15 G 3.378(sd).15 G -.25(ow)-3.378 G(n).25 E F2 .878(count - 1)3.378 F
-F1(lines.)97 252 Q .079(It is not an error to use the)97 276 R F0($)
-2.578 E F1 .078(command when the cursor is on the last character in the line or when the)
-2.578 F(line is empty)97 288 Q(.)-.65 E(The)97 312 Q F0($)2.646 E F1
-.146(command may be used as the motion component of other)2.646 F F0(vi)
-2.646 E F1 .146(commands, in which case an)2.646 F 2.647(yt)-.15 G -.15
-(ex)-2.647 G(t).15 E .069(copied into a b)97 324 R(uf)-.2 E .069(fer is character oriented, unless the cursor is at, or before the \214rst nonblank character)
--.25 F .161(in the line, in which case it is line oriented.)97 336 R
-.161(It is not an error to use the)5.161 F F0($)2.662 E F1 .162
-(command as a motion com-)2.662 F 1.117(ponent when the cursor is on the last character in the line, although it is an error when the line is)
-97 348 R(empty)97 360 Q(.)-.65 E 21.39(Line: Set)97 384 R
-(to the current line plus)2.5 E F2(count)2.5 E F1(minus 1.)2.5 E 7.49
-(Column: Set)97 396 R(to the last character in the line.)2.5 E 8.05
-(Options: None.)97 408 R F0(%)72 432 Q F1(Mo)97 444 Q .915 -.15(ve t)
--.15 H 3.115(ot).15 G .615(he matching character)-3.115 F 5.615(.T)-.55
-G .615(he cursor mo)-5.615 F -.15(ve)-.15 G 3.115(st).15 G 3.115(ot)
--3.115 G .616(he parenthesis or curly brace which)-3.115 F/F3 10
-/Times-Italic@0 SF(matc)3.116 E(hes)-.15 E F1 .702(the parenthesis or curly brace found at the current cursor position or which is the closest one to the)
-97 456 R .205(right of the cursor on the line.)97 468 R .206
-(It is an error to e)5.206 F -.15(xe)-.15 G .206(cute the).15 F F0(%)
-2.706 E F1 .206(command on a line without a parenthe-)2.706 F
-(sis or curly brace.)97 480 Q(Historically)5 E 2.5(,a)-.65 G -.15(ny)
--2.5 G F2(count)2.65 E F1(speci\214ed to the)2.5 E F0(%)2.5 E F1
-(command w)2.5 E(as ignored.)-.1 E(The)97 504 Q F0(%)2.647 E F1 .147
-(command is an absolute mo)2.647 F -.15(ve)-.15 G 2.646(ment. The).15 F
-F0(%)2.646 E F1 .146(command may be used as the motion component)2.646 F
-1(of other)97 516 R F0(vi)3.5 E F1 1(commands, in which case an)3.5 F
-3.5(yt)-.15 G -.15(ex)-3.5 G 3.5(tc).15 G 1(opied into a b)-3.5 F(uf)-.2
-E 1(fer is character oriented, unless the)-.25 F .116
-(starting point of the re)97 528 R .116(gion is at or before the \214rst nonblank character on its line, and the ending point)
--.15 F(is at or after the last nonblank character on its line, in which case it is line oriented.)
-97 540 Q 21.39(Line: Set)97 564 R
-(to the line containing the matching character)2.5 E(.)-.55 E 7.49
-(Column: Set)97 576 R(to the matching character)2.5 E(.)-.55 E 8.05
-(Options: None.)97 588 R F0(&)72 612 Q F1(Repeat the pre)97 624 Q
-(vious substitution command on the current line.)-.25 E(Historically)97
-648 Q 2.5(,a)-.65 G -.15(ny)-2.5 G F2(count)2.65 E F1
-(speci\214ed to the)2.5 E F0(&)2.5 E F1(command w)2.5 E(as ignored.)-.1
-E 21.39(Line: Unchanged.)97 672 R 7.49(Column: Unchanged)97 684 R 1.212
-(if the cursor w)3.711 F 1.212
-(as on the last character in the line, otherwise, set to the \214rst)-.1
-F(nonblank character in the line.)142 696 Q 8.05(Options: Af)97 708 R
-(fected by the)-.25 E F0(edcompatible)2.5 E F1(,)A F0(extended)2.5 E F1
-(,)A F0(ignor)2.5 E(ecase)-.18 E F1(and)2.5 E F0(magic)2.5 E F1
-(options.)2.5 E EP
-%%Page: 24 23
-%%BeginPageSetup
-BP
-%%EndPageSetup
-/F0 10/Times-Bold@0 SF 233.15(USD:13-24 Nvi/Nex)72 60 R(Refer)2.5 E
-(ence \(V)-.18 E 2.5(iC)-.37 G(ommands\))-2.5 E(\264<character>)72 96 Q
-(`<character>)72 108 Q/F1 10/Times-Roman@0 SF .759(Return to a conte)97
-120 R .759(xt mark)-.15 F .759(ed by the character)-.1 F/F2 10/Courier@0
-SF(<character>)3.259 E F1 5.759(.I)C(f)-5.759 E F2(<character>)3.259 E
-F1 .758(is the \231)3.258 F F2(')A F1 3.258<9a6f>C 3.258<7299>-3.258 G
-F2(`)-3.258 E F1<9a>A(character)97 132 Q 2.756(,r)-.4 G .256
-(eturn to the pre)-2.756 F .256(vious conte)-.25 F 2.756(xt. If)-.15 F
-F2(<character>)2.756 E F1 .256(is an)2.756 F 2.756(yo)-.15 G .256
-(ther character)-2.756 F 2.756(,r)-.4 G .256(eturn to the con-)-2.756 F
-(te)97 144 Q .808(xt mark)-.15 F .808(ed by that character \(see the)-.1
-F F0(m)3.308 E F1 .808(command for more information\).)3.308 F .807
-(If the command is the)5.807 F F0<b4>3.307 E F1 .61
-(command, only the line v)97 156 R .611(alue is restored, and the cursor is placed on the \214rst nonblank character of)
--.25 F(that line.)97 168 Q(If the command is the)5 E F0(`)2.5 E F1
-(command, both the line and column v)2.5 E(alues are restored.)-.25 E
-.648(It is an error if the conte)97 192 R .647(xt no longer e)-.15 F
-.647(xists because of line deletion.)-.15 F(\(Conte)5.647 E .647
-(xts follo)-.15 F 3.147(wl)-.25 G .647(ines that are)-3.147 F(mo)97 204
-Q -.15(ve)-.15 G(d, or which are deleted and then restored.\)).15 E(The)
-97 228 Q F0<b4>2.958 E F1(and)2.958 E F0(`)2.958 E F1 .458
-(commands are both absolute mo)2.958 F -.15(ve)-.15 G 2.958(ments. The)
-.15 F 2.958(ym)-.15 G .459(ay be used as a motion component for)-2.958 F
-(other)97 240 Q F0(vi)2.635 E F1 2.635(commands. F)2.635 F .135(or the)
--.15 F F0<b4>2.634 E F1 .134(command, an)2.634 F 2.634(yt)-.15 G -.15
-(ex)-2.634 G 2.634(tc).15 G .134(opied into a b)-2.634 F(uf)-.2 E .134
-(fer is line oriented.)-.25 F -.15(Fo)5.134 G 2.634(rt).15 G(he)-2.634 E
-F0(`)2.634 E F1(com-)2.634 E 1.081(mand, an)97 252 R 3.581(yt)-.15 G
--.15(ex)-3.581 G 3.581(tc).15 G 1.081(opied into a b)-3.581 F(uf)-.2 E
-1.082(fer is character oriented, unless it both starts and stops at the \214rst)
--.25 F .854(character in the line, in which case it is line oriented.)97
-264 R .854(In addition, when using the)5.854 F F0(`)3.354 E F1 .854
-(command as a)3.354 F .479(motion component, commands which mo)97 276 R
-.779 -.15(ve b)-.15 H(ackw).15 E .479
-(ard and started at the \214rst character in the line, or)-.1 F(mo)97
-288 Q .463 -.15(ve f)-.15 H(orw).15 E .162(ard and ended at the \214rst character in the line, are corrected to the last character of the line)
--.1 F(preceding the starting and ending lines, respecti)97 300 Q -.15
-(ve)-.25 G(ly).15 E(.)-.65 E 21.39(Line: Set)97 324 R
-(to the line from the conte)2.5 E(xt.)-.15 E 7.49(Column: Set)97 336 R
-.537(to the \214rst nonblank character in the line, for the)3.037 F F0
-<b4>3.038 E F1 .538(command, and set to the conte)3.038 F(xt')-.15 E(s)
--.55 E(column for the)142 348 Q F0(`)2.5 E F1(command.)2.5 E 8.05
-(Options: None.)97 360 R F0([count] \()72 384 Q F1(Back up)97 396 Q F2
-(count)2.5 E F1(sentences.)2.5 E(The)97 420 Q F0(\()2.786 E F1 .286
-(command is an absolute mo)2.786 F -.15(ve)-.15 G 2.785(ment. The).15 F
-F0(\()2.785 E F1 .285(command may be used as the motion component of)
-2.785 F(other)97 432 Q F0(vi)2.781 E F1 .281(commands, in which case an)
-2.781 F 2.781(yt)-.15 G -.15(ex)-2.781 G 2.781(tc).15 G .281
-(opied into a b)-2.781 F(uf)-.2 E .281
-(fer is character oriented, unless the start-)-.25 F .985
-(ing and stopping points of the re)97 444 R .985(gion are the \214rst character in the line, in which case it is line ori-)
--.15 F 2.71(ented. If)97 456 R .21
-(it is line oriented, the starting point of the re)2.71 F .21
-(gion is adjusted to be the end of the line imme-)-.15 F
-(diately before the starting cursor position.)97 468 Q 21.39(Line: Set)
-97 492 R(to the line containing the be)2.5 E(ginning of the sentence.)
--.15 E 7.49(Column: Set)97 504 R
-(to the \214rst nonblank character of the sentence.)2.5 E 8.05
-(Options: Af)97 516 R(fected by the)-.25 E F0(lisp)2.5 E F1(option.)2.5
-E F0([count] \))72 540 Q F1(Mo)97 552 Q .3 -.15(ve f)-.15 H(orw).15 E
-(ard)-.1 E F2(count)2.5 E F1(sentences.)2.5 E(The)97 576 Q F0(\))2.786 E
-F1 .286(command is an absolute mo)2.786 F -.15(ve)-.15 G 2.785
-(ment. The).15 F F0(\))2.785 E F1 .285
-(command may be used as the motion component of)2.785 F(other)97 588 Q
-F0(vi)2.781 E F1 .281(commands, in which case an)2.781 F 2.781(yt)-.15 G
--.15(ex)-2.781 G 2.781(tc).15 G .281(opied into a b)-2.781 F(uf)-.2 E
-.281(fer is character oriented, unless the start-)-.25 F .529
-(ing point of the re)97 600 R .528(gion is the \214rst character in the line, in which case it is line oriented.)
--.15 F .528(In the latter)5.528 F .752
-(case, if the stopping point of the re)97 612 R .753(gion is also the \214rst character in the line, it is adjusted to be the)
--.15 F(end of the line immediately before it.)97 624 Q 21.39(Line: Set)
-97 648 R(to the line containing the be)2.5 E(ginning of the sentence.)
--.15 E 7.49(Column: Set)97 660 R
-(to the \214rst nonblank character of the sentence.)2.5 E 8.05
-(Options: Af)97 672 R(fected by the)-.25 E F0(lisp)2.5 E F1(option.)2.5
-E F0([count] ,)72 696 Q F1(Re)97 708 Q -.15(ve)-.25 G .209
-(rse \214nd character).15 F F2(count)2.709 E F1 2.708(times. Re)2.709 F
--.15(ve)-.25 G .208(rse the last).15 F F0(F)2.708 E F1(,)A F0(f)2.708 E
-F1(,)A F0(T)2.708 E F1(or)2.708 E F0(t)2.708 E F1 .208
-(command, searching the other w)2.708 F(ay)-.1 E(in the line,)97 720 Q
-F2(count)2.5 E F1 2.5(times. It)2.5 F(is an error if a)2.5 E F0(F)2.5 E
-F1(,)A F0(f)2.5 E F1(,)A F0(T)2.5 E F1(or)2.5 E F0(t)2.5 E F1
-(command has not been performed yet.)2.5 E EP
-%%Page: 25 24
-%%BeginPageSetup
-BP
-%%EndPageSetup
-/F0 10/Times-Bold@0 SF(Nvi/Nex Refer)72 60 Q(ence \(V)-.18 E 2.5(iC)-.37
-G 233.15(ommands\) USD:13-25)-2.5 F/F1 10/Times-Roman@0 SF(The)97 96 Q
-F0(,)2.785 E F1 .285
-(command may be used as the motion component of other)2.785 F F0(vi)
-2.785 E F1 .285(commands, in which case an)2.785 F 2.785(yt)-.15 G -.15
-(ex)-2.785 G(t).15 E(copied into a b)97 108 Q(uf)-.2 E
-(fer is character oriented.)-.25 E 21.39(Line: Unchanged.)97 132 R 7.49
-(Column: Set)97 144 R .463(to the searched-for character for the)2.964 F
-F0(F)2.963 E F1(and)2.963 E F0(f)2.963 E F1 .463
-(commands, before the character for the)2.963 F F0(t)2.963 E F1
-(command and after the character for the)142 156 Q F0(T)2.5 E F1
-(command.)2.5 E 8.05(Options: None.)97 168 R F0([count] \255)72 192 Q F1
-(Mo)97 204 Q .3 -.15(ve t)-.15 H 2.5(ot).15 G
-(he \214rst nonblank of the pre)-2.5 E(vious line,)-.25 E/F2 10
-/Courier@0 SF(count)2.5 E F1(times.)2.5 E(It is an error if the mo)97
-228 Q -.15(ve)-.15 G(ment is past the be).15 E(ginning of the \214le.)
--.15 E(The)97 252 Q F0(-)2.738 E F1 .239
-(command may be used as the motion component of other)2.738 F F0(vi)
-2.739 E F1 .239(commands, in which case an)2.739 F 2.739(yt)-.15 G -.15
-(ex)-2.739 G(t).15 E(copied into a b)97 264 Q(uf)-.2 E
-(fer is line oriented.)-.25 E 21.39(Line: Set)97 288 R
-(to the current line minus)2.5 E F2(count)2.5 E F1(.)A 7.49(Column: Set)
-97 300 R(to the \214rst nonblank character in the line.)2.5 E 8.05
-(Options: None.)97 312 R F0([count] .)72 336 Q F1 1.61(Repeat the last)
-97 348 R F0(vi)4.11 E F1 1.61(command that modi\214ed te)4.11 F 4.11
-(xt. The)-.15 F 1.61(repeated command may be a command and)4.11 F .919
-(motion component combination.)97 360 R(If)5.919 E F2(count)3.419 E F1
-.919(is speci\214ed, it replaces)3.419 F/F3 10/Times-Italic@0 SF(both)
-3.419 E F1 .92(the count speci\214ed for the)3.419 F 1.002(repeated command, and, if applicable, for the repeated motion component.)
-97 372 R(If)6.001 E F2(count)3.501 E F1 1.001(is not speci-)3.501 F(\214ed, the counts originally speci\214ed to the command being repeated are used ag)
-97 384 Q(ain.)-.05 E .347(As a special case, if the)97 408 R F0(.)2.848
-E F1 .348(command is e)5.348 F -.15(xe)-.15 G .348
-(cuted immediately after the).15 F F0(u)2.848 E F1 .348
-(command, the change log is)2.848 F(rolled forw)97 420 Q(ard or backw)
--.1 E(ard, depending on the action of the)-.1 E F0(u)2.5 E F1(command.)
-2.5 E 21.39(Line: Set)97 444 R(as described for the repeated command.)
-2.5 E 7.49(Column: Set)97 456 R(as described for the repeated command.)
-2.5 E 8.05(Options: None.)97 468 R F0(/RE<carriage-r)72 492 Q(etur)-.18
-E(n>)-.15 E(/RE/ [offset]<carriage-r)72 504 Q(etur)-.18 E(n>)-.15 E
-(?RE<carriage-r)72 516 Q(etur)-.18 E(n>)-.15 E(?RE? [offset]<carriage-r)
-72 528 Q(etur)-.18 E(n>)-.15 E(N)72 540 Q(n)72 552 Q F1 .84(Search forw)
-97 564 R .84(ard or backw)-.1 F .84(ard for a re)-.1 F .84(gular e)-.15
-F 3.34(xpression. The)-.15 F .84(commands be)3.34 F .84
-(ginning with a slash \(\231)-.15 F F2(/)A F1<9a29>A .819
-(character are forw)97 576 R .819(ard searches, the commands be)-.1 F
-.819(ginning with a question mark \(\231)-.15 F F2(?)A F1 3.32
-(\232\) are)B(backw)3.32 E(ard)-.1 E(searches.)97 588 Q F0 -.37(Vi)6.124
-G F1 1.124(prompts with the leading character on the last line of the screen for a string.)
-3.994 F 1.123(It then)6.123 F .341(searches forw)97 600 R .341
-(ard or backw)-.1 F .341(ard in the \214le for the ne)-.1 F .341
-(xt occurrence of the string, which is interpreted as)-.15 F 2.5(aB)97
-612 S(asic Re)-2.5 E(gular Expression.)-.15 E(The)97 636 Q F0(/)3.507 E
-F1(and)3.507 E F0(?)3.507 E F1 1.007(commands are absolute mo)6.007 F
--.15(ve)-.15 G 3.507(ments. The).15 F 3.507(ym)-.15 G 1.007
-(ay be used as the motion components of)-3.507 F(other)97 648 Q F0(vi)
-4.239 E F1 1.739(commands, in which case an)4.239 F 4.239(yt)-.15 G -.15
-(ex)-4.239 G 4.239(tc).15 G 1.739(opied into a b)-4.239 F(uf)-.2 E 1.74
-(fer is character oriented, unless the)-.25 F .678(search started and ended on the \214rst column of a line, in which case it is line oriented.)
-97 660 R .678(In addition,)5.678 F(forw)97 672 Q .657
-(ard searches ending at the \214rst character of a line, and backw)-.1 F
-.658(ard searches be)-.1 F .658(ginning at the \214rst)-.15 F .881
-(character in the line, are corrected to be)97 684 R .88
-(gin or end at the last character of the pre)-.15 F .88(vious line.)-.25
-F(\(Note,)5.88 E(forw)97 696 Q .069(ard and backw)-.1 F .069
-(ard searches can occur for both)-.1 F F0(/)2.569 E F1(and)2.569 E F0(?)
-2.569 E F1 .07(commands, if the)5.07 F F0(wrapscan)2.57 E F1 .07
-(option is set.\))2.57 F .822(If an of)97 720 R .821
-(fset from the matched line is speci\214ed \(i.e. a trailing \231)-.25 F
-F2(/)A F1 3.321<9a6f>C 3.321<7299>-3.321 G F2(?)-3.321 E F1 5.821<9a63>C
-.821(haracter is follo)-5.821 F .821(wed by a)-.25 F EP
-%%Page: 26 25
-%%BeginPageSetup
-BP
-%%EndPageSetup
-/F0 10/Times-Bold@0 SF 233.15(USD:13-26 Nvi/Nex)72 60 R(Refer)2.5 E
-(ence \(V)-.18 E 2.5(iC)-.37 G(ommands\))-2.5 E/F1 10/Times-Roman@0 SF
-.386(signed of)97 96 R .386(fset\), the b)-.25 F(uf)-.2 E .386
-(fer will al)-.25 F -.1(wa)-.1 G .386(ys be line oriented \(e.g.).1 F
-<99>5.387 E/F2 10/Courier@0 SF(/string/+0)A F1 2.887<9a77>C .387(ill al)
--2.887 F -.1(wa)-.1 G .387(ys guarantee a).1 F(line orientation\).)97
-108 Q(The)97 132 Q F0(N)3.437 E F1 .937(command repeats the pre)3.437 F
-.937(vious search, b)-.25 F .937(ut in the re)-.2 F -.15(ve)-.25 G .936
-(rse direction.).15 F(The)5.936 E F0(n)3.436 E F1 .936(command repeats)
-3.436 F .731(the pre)97 144 R .731(vious search.)-.25 F .731
-(If either the)5.731 F F0(N)3.231 E F1(or)3.231 E F0(n)3.231 E F1 .731
-(commands are used as motion components for the)3.231 F F0(!)3.232 E F1
-(com-)5.732 E .781(mand, you will not be prompted for the te)97 156 R
-.781(xt of the bang command, instead the pre)-.15 F .781
-(vious bang com-)-.25 F(mand will be e)97 168 Q -.15(xe)-.15 G(cuted.)
-.15 E .27(Missing RE')97 192 R 2.77(s\()-.55 G 2.77(e.g. \231)-2.77 F F2
-(//<carriage-return>)A F1 .27<9a2c2099>B F2(/<carriage-return>)A F1 .27
-<9a2c2099>B F2(??<carriage-)A(return>)97 204 Q F1 .335(\232, or \231)B
-F2(?<carriage-return>)A F1 2.834<9a73>C .334
-(earch for the last search RE, in the indicated direction.)-2.834 F
-(Searches may be interrupted using the)97 228 Q F2(<interrupt>)2.5 E F1
-(character)2.5 E(.)-.55 E 1.019(Multiple search patterns may be grouped together by delimiting them with semicolons and zero or)
-97 252 R .563(more whitespace characters, e.g.)97 264 R F2 .562
-(/foo/ ; ?bar?)5.562 F F1 .562(searches forw)5.562 F .562(ard for)-.1 F
-F2(foo)3.062 E F1 .562(and then, from that)3.062 F .646(location, backw)
-97 276 R .646(ards for)-.1 F F2(bar)3.146 E F1 5.646(.W)C .646
-(hen search patterns are grouped together in this manner)-5.646 F 3.147
-(,t)-.4 G .647(he search)-3.147 F .213(patterns are e)97 288 R -.25(va)
--.25 G .212(luated left to right with the \214nal cursor position determined by the last search pattern.)
-.25 F .953(It is also permissible to append a)97 312 R F0(z)3.453 E F1
-.954(command to the search strings, e.g.)3.453 F F2 .954(/foo/ z.)5.954
-F F1 .954(searches for)5.954 F(-)-.2 E -.1(wa)97 324 S(rd for the ne).1
-E(xt occurrence of)-.15 E F2(foo)2.5 E F1 2.5(,a)C
-(nd then positions that line in the middle of screen.)-2.5 E 21.39
-(Line: Set)97 348 R(to the line in which the match occurred.)2.5 E 7.49
-(Column: Set)97 360 R(to the \214rst character of the matched string.)
-2.5 E 8.05(Options: Af)97 372 R(fected by the)-.25 E F0(edcompatible)2.5
-E F1(,)A F0(extended)2.5 E F1(,)A F0(ignor)2.5 E(ecase)-.18 E F1(,)A F0
-(magic)2.5 E F1 2.5(,a)C(nd)-2.5 E F0(wrapscan)2.5 E F1(options.)2.5 E
-F0(0)72 396 Q F1(Mo)97 408 Q .728 -.15(ve t)-.15 H 2.928(ot).15 G .427
-(he \214rst character in the current line.)-2.928 F .427
-(It is not an error to use the)5.427 F F0(0)2.927 E F1 .427
-(command when the cur)2.927 F(-)-.2 E
-(sor is on the \214rst character in the line,)97 420 Q(The)97 444 Q F0
-(0)2.9 E F1 .4(command may be used as the motion component of other)2.9
-F F0(vi)2.9 E F1 .4(commands, in which case it is an)2.9 F .057
-(error if the cursor is on the \214rst character in the line, and an)97
-456 R 2.557(yt)-.15 G -.15(ex)-2.557 G 2.556(tc).15 G .056
-(opied into a b)-2.556 F(uf)-.2 E .056(fer is character ori-)-.25 F
-(ented.)97 468 Q 21.39(Line: Unchanged.)97 492 R 7.49(Column: Set)97 504
-R(to the \214rst character in the line.)2.5 E 8.05(Options: None.)97 516
-R F0(:)72 540 Q F1(Ex)97 552 Q .194(ecute an)-.15 F F0(ex)2.694 E F1
-(command.)2.694 E F0 -.37(Vi)5.194 G F1 .195(prompts for an)3.064 F F0
-(ex)2.695 E F1 .195
-(command on the last line of the screen, using a colon)2.695 F<2899>97
-564 Q F2(:)A F1 3.367(\232\) character)B 8.367(.T)-.55 G 3.367
-(he command is terminated by a)-8.367 F F2(<carriage-return>)5.867 E F1
-(,)A F2(<newline>)5.867 E F1(or)5.867 E F2(<escape>)97 576 Q F1 .685
-(character; all of these characters may be escaped by using a)3.185 F F2
-(<literal-next>)3.186 E F1(char)3.186 E(-)-.2 E(acter)97 588 Q 5(.T)-.55
-G(he command is then e)-5 E -.15(xe)-.15 G(cuted.).15 E .126(If the)97
-612 R F0(ex)2.626 E F1 .126(command writes to the screen,)2.626 F F0(vi)
-2.626 E F1 .125(will prompt the user for a)2.626 F F2(<carriage-return>)
-2.625 E F1(before)2.625 E .796(continuing when the)97 624 R F0(ex)3.296
-E F1 .796(command \214nishes.)3.296 F(Lar)5.796 E .796
-(ge amounts of output from the)-.18 F F0(ex)3.296 E F1 .796
-(command will be)3.296 F .878(paged for the user)97 636 R 3.378(,a)-.4 G
-.877(nd the user prompted for a)-3.378 F F2(<carriage-return>)3.377 E F1
-(or)3.377 E F2(<space>)3.377 E F1 -.1(ke)3.377 G 3.377(yt)-.05 G 3.377
-(oc)-3.377 G(on-)-3.377 E 3.223(tinue. In)97 648 R .723
-(some cases, a quit \(normally a \231q\232 character\) or)3.223 F F2
-(<interrupt>)3.223 E F1 .723(may be entered to inter)3.223 F(-)-.2 E
-(rupt the)97 660 Q F0(ex)2.5 E F1(command.)2.5 E .082(When the)97 684 R
-F0(ex)2.582 E F1 .082(command \214nishes, and the user is prompted to resume visual mode, it is also possible to)
-2.582 F(enter another \231)97 696 Q F2(:)A F1 2.5<9a63>C(haracter follo)
--2.5 E(wed by another)-.25 E F0(ex)2.5 E F1(command.)2.5 E EP
-%%Page: 27 26
-%%BeginPageSetup
-BP
-%%EndPageSetup
-/F0 10/Times-Bold@0 SF(Nvi/Nex Refer)72 60 Q(ence \(V)-.18 E 2.5(iC)-.37
-G 233.15(ommands\) USD:13-27)-2.5 F/F1 10/Times-Roman@0 SF 21.39
-(Line: The)97 96 R(current line is set as described for the)2.5 E F0(ex)
-2.5 E F1(command.)2.5 E 7.49(Column: The)97 108 R
-(current column is set as described for the)2.5 E F0(ex)2.5 E F1
-(command.)2.5 E 8.05(Options: Af)97 120 R(fected as described for the)
--.25 E F0(ex)2.5 E F1(command.)2.5 E F0([count] ;)72 144 Q F1 .881
-(Repeat the last character \214nd)97 156 R/F2 10/Courier@0 SF(count)
-3.381 E F1 3.381(times. The)3.381 F .882
-(last character \214nd is one of the)3.381 F F0(F)3.382 E F1(,)A F0(f)
-3.382 E F1(,)A F0(T)3.382 E F1(or)3.382 E F0(t)3.382 E F1(com-)3.382 E
-2.5(mands. It)97 168 R(is an error if a)2.5 E F0(F)2.5 E F1(,)A F0(f)2.5
-E F1(,)A F0(T)2.5 E F1(or)2.5 E F0(t)2.5 E F1
-(command has not been performed yet.)2.5 E(The)97 192 Q F0(;)2.739 E F1
-.239(command may be used as the motion component of other)2.739 F F0(vi)
-2.739 E F1 .239(commands, in which case an)2.739 F 2.738(yt)-.15 G -.15
-(ex)-2.738 G(t).15 E(copied into a b)97 204 Q(uf)-.2 E
-(fer is character oriented.)-.25 E 21.39(Line: Unchanged.)97 228 R 7.49
-(Column: Set)97 240 R .463(to the searched-for character for the)2.963 F
-F0(F)2.963 E F1(and)2.963 E F0(f)2.963 E F1 .463
-(commands, before the character for the)2.963 F F0(t)2.964 E F1
-(command and after the character for the)142 252 Q F0(T)2.5 E F1
-(command.)2.5 E 8.05(Options: None.)97 264 R F0([count] < motion)72 288
-Q([count] > motion)72 300 Q F1 .282(Shift lines left or right.)97 312 R
-.281(Shift the number of lines in the re)5.281 F .281
-(gion speci\214ed by the)-.15 F F2(count)2.781 E F1(and)2.781 E F2
-(motion)2.781 E F1 .962(left \(for the)97 324 R F0(<)3.462 E F1 .963
-(command\) or right \(for the)3.462 F F0(>)3.463 E F1 .963
-(command\) by the number of columns speci\214ed by the)3.463 F F0
-(shiftwidth)97 336 Q F1 2.939(option. Only)2.939 F .439
-(whitespace characters are deleted when shifting left.)2.939 F .438
-(Once the \214rst charac-)5.438 F .337
-(ter in the line no longer contains a whitespace character)97 348 R
-2.837(,t)-.4 G .337(he command will succeed, b)-2.837 F .337
-(ut the line will)-.2 F(not be modi\214ed.)97 360 Q 21.39
-(Line: Unchanged.)97 384 R 7.49(Column: Set)97 396 R
-(to the \214rst nonblank character in the line.)2.5 E 8.05(Options: Af)
-97 408 R(fected by the)-.25 E F0(shiftwidth)2.5 E F1(option.)2.5 E F0
-2.5(@b)72 432 S(uffer)-2.7 E F1(Ex)97 444 Q 1.528(ecute a named b)-.15 F
-(uf)-.2 E(fer)-.25 E 6.528(.E)-.55 G -.15(xe)-6.528 G 1.528
-(cute the named b).15 F(uf)-.2 E 1.528(fer as)-.25 F F0(vi)4.028 E F1
-4.028(commands. The)4.028 F -.2(bu)4.028 G -.25(ff).2 G 1.528
-(er may include).25 F F0(ex)4.028 E F1 .895(commands, too, b)97 456 R
-.896(ut the)-.2 F 3.396(ym)-.15 G .896(ust be e)-3.396 F .896
-(xpressed as a)-.15 F F0(:)3.396 E F1 3.396(command. If)3.396 F .896
-(the b)3.396 F(uf)-.2 E .896(fer is line oriented,)-.25 F F2(<new-)3.396
-E(line>)97 468 Q F1 1.266
-(characters are logically appended to each line of the b)3.766 F(uf)-.2
-E(fer)-.25 E 6.265(.I)-.55 G 3.765(ft)-6.265 G 1.265(he b)-3.765 F(uf)
--.2 E 1.265(fer is character ori-)-.25 F(ented,)97 480 Q F2(<newline>)
-2.5 E F1(characters are logically appended to all b)2.5 E
-(ut the last line in the b)-.2 E(uf)-.2 E(fer)-.25 E(.)-.55 E .366
-(If the b)97 504 R(uf)-.2 E .366(fer name is \231)-.25 F F2(@)A F1 .366
-(\232, or \231)B F2(*)A F1 .367(\232, then the last b)B(uf)-.2 E .367
-(fer e)-.25 F -.15(xe)-.15 G .367(cuted shall be used.).15 F .367
-(It is an error to specify)5.367 F<99>97 516 Q F2(@@)A F1 2.508<9a6f>C
-2.508<7299>-2.508 G F2(@*)-2.508 E F1 2.508<9a69>C 2.508(ft)-2.508 G
-.008(here were no pre)-2.508 F .007(vious b)-.25 F(uf)-.2 E .007(fer e)
--.25 F -.15(xe)-.15 G 2.507(cutions. The).15 F(te)2.507 E .007
-(xt of a b)-.15 F(uf)-.2 E .007(fer may contain a)-.25 F F0(@)2.507 E F1
-(com-)2.507 E .551
-(mand, and it is possible to create in\214nite loops in this manner)97
-528 R 5.551(.\()-.55 G(The)-5.551 E F2(<interrupt>)3.051 E F1 .551
-(character may)3.051 F(be used to interrupt the loop.\))97 540 Q 21.39
-(Line: The)97 564 R
-(current line is set as described for the command\(s\).)2.5 E 7.49
-(Column: The)97 576 R
-(current column is set as described for the command\(s\).)2.5 E 8.05
-(Options: None.)97 588 R F0([count] A)72 612 Q F1 1.427
-(Enter input mode, appending the te)97 624 R 1.427
-(xt after the end of the line.)-.15 F(If)6.427 E F2(count)3.926 E F1
-1.426(is speci\214ed, the te)3.926 F 1.426(xt is)-.15 F
-(repeatedly input)97 636 Q F2(count - 1)2.5 E F1
-(more times after input mode is e)2.5 E(xited.)-.15 E 21.39(Line: Set)97
-660 R(to the last line upon which characters were entered.)2.5 E 7.49
-(Column: Set)97 672 R(to the last character entered.)2.5 E 8.05
-(Options: Af)97 684 R .464(fected by the)-.25 F F0(altwerase)2.964 E F1
-(,)A F0(autoindent)2.964 E F1(,)A F0(beautify)2.964 E F1(,)A F0(sho)
-2.965 E(wmatch)-.1 E F1(,)A F0(ttywerase)2.965 E F1(and)2.965 E F0
-(wrapmar)2.965 E(-)-.37 E(gin)142 696 Q F1(options.)2.5 E EP
-%%Page: 28 27
-%%BeginPageSetup
-BP
-%%EndPageSetup
-/F0 10/Times-Bold@0 SF 233.15(USD:13-28 Nvi/Nex)72 60 R(Refer)2.5 E
-(ence \(V)-.18 E 2.5(iC)-.37 G(ommands\))-2.5 E([count] B)72 96 Q/F1 10
-/Times-Roman@0 SF(Mo)97 108 Q 1.959 -.15(ve b)-.15 H(ackw).15 E(ard)-.1
-E/F2 10/Courier@0 SF(count)4.159 E F1(bigw)4.159 E 4.159(ords. Mo)-.1 F
-1.959 -.15(ve t)-.15 H 1.659(he cursor backw).15 F 1.658(ard to the be)
--.1 F 1.658(ginning of a bigw)-.15 F 1.658(ord by)-.1 F .178
-(repeating the follo)97 120 R .178
-(wing algorithm: if the current position is at the be)-.25 F .178
-(ginning of a bigw)-.15 F .179(ord or the char)-.1 F(-)-.2 E .463
-(acter at the current position cannot be part of a bigw)97 132 R .463
-(ord, mo)-.1 F .763 -.15(ve t)-.15 H 2.963(ot).15 G .462
-(he \214rst character of the preceding)-2.963 F(bigw)97 144 Q 2.852
-(ord. Otherwise,)-.1 F(mo)2.852 E .652 -.15(ve t)-.15 H 2.852(ot).15 G
-.352(he \214rst character of the bigw)-2.852 F .353
-(ord at the current position.)-.1 F .353(If no preced-)5.353 F .377
-(ing bigw)97 156 R .377(ord e)-.1 F .377(xists on the current line, mo)
--.15 F .676 -.15(ve t)-.15 H 2.876(ot).15 G .376
-(he \214rst character of the last bigw)-2.876 F .376
-(ord on the \214rst pre-)-.1 F(ceding line that contains a bigw)97 168 Q
-(ord.)-.1 E(The)97 192 Q F0(B)2.553 E F1 .053
-(command may be used as the motion component of other)2.553 F F0(vi)
-2.553 E F1 .054(commands, in which case an)2.554 F 2.554(yt)-.15 G -.15
-(ex)-2.554 G(t).15 E(copied into a b)97 204 Q(uf)-.2 E
-(fer is character oriented.)-.25 E 21.39(Line: Set)97 228 R
-(to the line containing the w)2.5 E(ord selected.)-.1 E 7.49
-(Column: Set)97 240 R(to the \214rst character of the w)2.5 E
-(ord selected.)-.1 E 8.05(Options: None.)97 252 R F0([b)72 276 Q
-(uffer] [count] C)-.2 E F1 2.23(Change te)97 288 R 2.23
-(xt from the current position to the end-of-line.)-.15 F(If)7.23 E F2
-(count)4.73 E F1 2.23(is speci\214ed, the input te)4.73 F(xt)-.15 E
-(replaces from the current position to the end-of-line, plus)97 300 Q F2
-(count - 1)2.5 E F1(subsequent lines.)2.5 E 21.39(Line: Set)97 324 R
-(to the last line upon which characters were entered.)2.5 E 7.49
-(Column: Set)97 336 R(to the last character entered.)2.5 E 8.05
-(Options: Af)97 348 R .464(fected by the)-.25 F F0(altwerase)2.964 E F1
-(,)A F0(autoindent)2.964 E F1(,)A F0(beautify)2.964 E F1(,)A F0(sho)
-2.965 E(wmatch)-.1 E F1(,)A F0(ttywerase)2.965 E F1(and)2.965 E F0
-(wrapmar)2.965 E(-)-.37 E(gin)142 360 Q F1(options.)2.5 E F0([b)72 384 Q
-(uffer] D)-.2 E F1(Delete te)97 396 Q
-(xt from the current position to the end-of-line.)-.15 E
-(It is not an error to e)97 420 Q -.15(xe)-.15 G(cute the).15 E F0(D)2.5
-E F1(command on an empty line.)2.5 E 21.39(Line: Unchanged.)97 444 R
-7.49(Column: Set)97 456 R .223
-(to the character before the current character)2.723 F 2.723(,o)-.4 G
-1.022 -.4(r, c)-2.723 H .222(olumn 1 if the cursor w).4 F .222
-(as on column)-.1 F(1.)142 468 Q 8.05(Options: None.)97 480 R F0
-([count] E)72 504 Q F1(Mo)97 516 Q .525 -.15(ve f)-.15 H(orw).15 E(ard)
--.1 E F2(count)2.725 E F1(end-of-bigw)2.725 E 2.725(ords. Mo)-.1 F .525
--.15(ve t)-.15 H .225(he cursor forw).15 F .225
-(ard to the end of a bigw)-.1 F .226(ord by repeat-)-.1 F 1.06
-(ing the follo)97 528 R 1.06
-(wing algorithm: if the current position is the end of a bigw)-.25 F
-1.059(ord or the character at that)-.1 F .072
-(position cannot be part of a bigw)97 540 R .072(ord, mo)-.1 F .372 -.15
-(ve t)-.15 H 2.572(ot).15 G .072(he last character of the follo)-2.572 F
-.072(wing bigw)-.25 F 2.572(ord. Otherwise,)-.1 F(mo)97 552 Q .673 -.15
-(ve t)-.15 H 2.873(ot).15 G .373(he last character of the bigw)-2.873 F
-.372(ord at the current position.)-.1 F .372(If no succeeding bigw)5.372
-F .372(ord e)-.1 F .372(xists on)-.15 F .05(the current line, mo)97 564
-R .35 -.15(ve t)-.15 H 2.55(ot).15 G .05
-(he last character of the \214rst bigw)-2.55 F .051(ord on the ne)-.1 F
-.051(xt follo)-.15 F .051(wing line that contains)-.25 F 2.5(ab)97 576 S
-(igw)-2.5 E(ord.)-.1 E(The)97 600 Q F0(E)2.554 E F1 .053
-(command may be used as the motion component of other)2.554 F F0(vi)
-2.553 E F1 .053(commands, in which case an)2.553 F 2.553(yt)-.15 G -.15
-(ex)-2.553 G(t).15 E(copied into a b)97 612 Q(uf)-.2 E
-(fer is character oriented.)-.25 E 21.39(Line: Set)97 636 R
-(to the line containing the w)2.5 E(ord selected.)-.1 E 7.49
-(Column: Set)97 648 R(to the last character of the w)2.5 E
-(ord selected.)-.1 E 8.05(Options: None.)97 660 R F0
-([count] F <character>)72 684 Q F1(Search)97 696 Q F2(count)2.5 E F1
-(times backw)2.5 E(ard through the current line for)-.1 E F2
-(<character>)2.5 E F1(.)A(The)97 720 Q F0(F)2.584 E F1 .084
-(command may be used as the motion component of other)2.584 F F0(vi)
-2.585 E F1 .085(commands, in which case an)2.585 F 2.585(yt)-.15 G -.15
-(ex)-2.585 G(t).15 E EP
-%%Page: 29 28
-%%BeginPageSetup
-BP
-%%EndPageSetup
-/F0 10/Times-Bold@0 SF(Nvi/Nex Refer)72 60 Q(ence \(V)-.18 E 2.5(iC)-.37
-G 233.15(ommands\) USD:13-29)-2.5 F/F1 10/Times-Roman@0 SF
-(copied into a b)97 96 Q(uf)-.2 E(fer is character oriented.)-.25 E
-21.39(Line: Unchanged.)97 120 R 7.49(Column: Set)97 132 R
-(to the searched-for character)2.5 E(.)-.55 E 8.05(Options: None.)97 144
-R F0([count] G)72 168 Q F1(Mo)97 180 Q .3 -.15(ve t)-.15 H 2.5(ol).15 G
-(ine)-2.5 E/F2 10/Courier@0 SF(count)2.5 E F1 2.5(,o)C 2.5(rt)-2.5 G
-(he last line of the \214le if)-2.5 E F2(count)2.5 E F1
-(not speci\214ed.)2.5 E(The)97 204 Q F0(G)2.924 E F1 .424
-(command is an absolute mo)2.924 F -.15(ve)-.15 G 2.924(ment. The).15 F
-F0(G)2.924 E F1 .423(command may be used as the motion component)2.924 F
-(of other)97 216 Q F0(vi)2.5 E F1(commands, in which case an)2.5 E 2.5
-(yt)-.15 G -.15(ex)-2.5 G 2.5(tc).15 G(opied into a b)-2.5 E(uf)-.2 E
-(fer is line oriented.)-.25 E 21.39(Line: Set)97 240 R(to)2.5 E F2
-(count)2.5 E F1 2.5(,i)C 2.5(fs)-2.5 G
-(peci\214ed, otherwise, the last line.)-2.5 E 7.49(Column: Set)97 252 R
-(to the \214rst nonblank character in the line.)2.5 E 8.05
-(Options: None.)97 264 R F0([count] H)72 288 Q F1(Mo)97 300 Q .3 -.15
-(ve t)-.15 H 2.5(ot).15 G(he screen line)-2.5 E F2(count - 1)2.5 E F1
-(lines belo)2.5 E 2.5(wt)-.25 G(he top of the screen.)-2.5 E(The)97 324
-Q F0(H)2.923 E F1 .423(command is an absolute mo)2.923 F -.15(ve)-.15 G
-2.924(ment. The).15 F F0(H)2.924 E F1 .424
-(command may be used as the motion component)2.924 F(of other)97 336 Q
-F0(vi)2.5 E F1(commands, in which case an)2.5 E 2.5(yt)-.15 G -.15(ex)
--2.5 G 2.5(tc).15 G(opied into a b)-2.5 E(uf)-.2 E
-(fer is line oriented.)-.25 E 21.39(Line: Set)97 360 R(to the line)2.5 E
-F2(count - 1)2.5 E F1(lines belo)2.5 E 2.5(wt)-.25 G
-(he top of the screen.)-2.5 E 7.49(Column: Set)97 372 R
-(to the \214rst nonblank character of the)2.5 E/F3 10/Times-Italic@0 SF
-(scr)2.5 E(een)-.37 E F1(line.)2.5 E 8.05(Options: None.)97 384 R F0
-([count] I)72 408 Q F1 .23(Enter input mode, inserting the te)97 420 R
-.23(xt at the be)-.15 F .23(ginning of the line.)-.15 F(If)5.23 E F2
-(count)2.73 E F1 .23(is speci\214ed, the te)2.73 F .23(xt input)-.15 F
-(is repeatedly input)97 432 Q F2(count - 1)2.5 E F1(more times.)2.5 E
-21.39(Line: Set)97 456 R
-(to the last line upon which characters were entered.)2.5 E 7.49
-(Column: Set)97 468 R(to the last character entered.)2.5 E 8.05
-(Options: None.)97 480 R F0([count] J)72 504 Q F1 .055(Join lines.)97
-516 R(If)5.055 E F2(count)2.555 E F1 .055(is speci\214ed,)2.555 F F2
-(count)2.555 E F1 .055(lines are joined; a minimum of tw)2.555 F 2.556
-(ol)-.1 G .056(ines are al)-2.556 F -.1(wa)-.1 G .056(ys joined,).1 F
-(re)97 528 Q -.05(ga)-.15 G(rdless of the v).05 E(alue of)-.25 E F2
-(count)2.5 E F1(.)A 1.346
-(If the current line ends with a whitespace character)97 552 R 3.846(,a)
--.4 G 1.345(ll whitespace is stripped from the ne)-3.846 F 1.345
-(xt line.)-.15 F .493(Otherwise, if the ne)97 564 R .493
-(xt line starts with a open parenthesis \(\231)-.15 F F2(\()A F1 .493
-(\232\) do nothing.)B .494(Otherwise, if the current)5.493 F 1.234
-(line ends with a question mark \(\231)97 576 R F2(?)A F1 1.233
-(\232\), period \(\231)B F2(.)A F1 3.733(\232\) or)B -.15(ex)3.733 G
-1.233(clamation point \(\231).15 F F2(!)A F1 1.233(\232\), insert tw)B
-3.733(os)-.1 G(paces.)-3.733 E(Otherwise, insert a single space.)97 588
-Q(It is not an error to join lines past the end of the \214le, i.e. lines that do not e)
-97 612 Q(xist.)-.15 E 21.39(Line: Unchanged.)97 636 R 7.49(Column: Set)
-97 648 R(to the character after the last character of the ne)2.5 E
-(xt-to-last joined line.)-.15 E 8.05(Options: None.)97 660 R F0
-([count] L)72 684 Q F1(Mo)97 696 Q .3 -.15(ve t)-.15 H 2.5(ot).15 G
-(he screen line)-2.5 E F2(count - 1)2.5 E F1(lines abo)2.5 E .3 -.15
-(ve t)-.15 H(he bottom of the screen.).15 E(The)97 720 Q F0(L)3.062 E F1
-.562(command is an absolute mo)3.062 F -.15(ve)-.15 G 3.062(ment. The)
-.15 F F0(L)3.062 E F1 .563(command may be used as the motion component)
-3.063 F EP
-%%Page: 30 29
-%%BeginPageSetup
-BP
-%%EndPageSetup
-/F0 10/Times-Bold@0 SF 233.15(USD:13-30 Nvi/Nex)72 60 R(Refer)2.5 E
-(ence \(V)-.18 E 2.5(iC)-.37 G(ommands\))-2.5 E/F1 10/Times-Roman@0 SF
-(of other)97 96 Q F0(vi)2.5 E F1(commands, in which case an)2.5 E 2.5
-(yt)-.15 G -.15(ex)-2.5 G 2.5(tc).15 G(opied into a b)-2.5 E(uf)-.2 E
-(fer is line oriented.)-.25 E 21.39(Line: Set)97 120 R(to the line)2.5 E
-/F2 10/Courier@0 SF(count - 1)2.5 E F1(lines abo)2.5 E .3 -.15(ve t)-.15
-H(he bottom of the screen.).15 E 7.49(Column: Set)97 132 R
-(to the \214rst nonblank character of the)2.5 E/F3 10/Times-Italic@0 SF
-(scr)2.5 E(een)-.37 E F1(line.)2.5 E 8.05(Options: None.)97 144 R F0(M)
-74.5 168 Q F1(Mo)97 180 Q .3 -.15(ve t)-.15 H 2.5(ot).15 G
-(he screen line in the middle of the screen.)-2.5 E(The)97 204 Q F0(M)
-2.717 E F1 .217(command is an absolute mo)2.717 F -.15(ve)-.15 G 2.716
-(ment. The).15 F F0(M)2.716 E F1 .216
-(command may be used as the motion component)2.716 F(of other)97 216 Q
-F0(vi)2.5 E F1(commands, in which case an)2.5 E 2.5(yt)-.15 G -.15(ex)
--2.5 G 2.5(tc).15 G(opied into a b)-2.5 E(uf)-.2 E
-(fer is line oriented.)-.25 E(Historically)97 240 Q 2.5(,a)-.65 G -.15
-(ny)-2.5 G F2(count)2.65 E F1(speci\214ed to the)2.5 E F0(M)2.5 E F1
-(command w)2.5 E(as ignored.)-.1 E 21.39(Line: Set)97 264 R
-(to the line in the middle of the screen.)2.5 E 7.49(Column: Set)97 276
-R(to the \214rst nonblank character of the)2.5 E F3(scr)2.5 E(een)-.37 E
-F1(line.)2.5 E 8.05(Options: None.)97 288 R F0([count] O)72 312 Q F1 .13
-(Enter input mode, appending te)97 324 R .13(xt in a ne)-.15 F 2.63(wl)
--.25 G .131(ine abo)-2.63 F .431 -.15(ve t)-.15 H .131(he current line.)
-.15 F(If)5.131 E F2(count)2.631 E F1 .131(is speci\214ed, the te)2.631 F
-(xt)-.15 E(input is repeatedly input)97 336 Q F2(count - 1)2.5 E F1
-(more times.)2.5 E(Historically)97 360 Q 2.5(,a)-.65 G -.15(ny)-2.5 G F2
-(count)2.65 E F1(speci\214ed to the)2.5 E F0(O)2.5 E F1(command w)2.5 E
-(as ignored.)-.1 E 21.39(Line: Set)97 384 R
-(to the last line upon which characters were entered.)2.5 E 7.49
-(Column: Set)97 396 R(to the last character entered.)2.5 E 8.05
-(Options: Af)97 408 R .465(fected by the)-.25 F F0(altwerase)2.965 E F1
-(,)A F0(autoindent)2.965 E F1(,)A F0(beautify)2.964 E F1(,)A F0(sho)
-2.964 E(wmatch)-.1 E F1(,)A F0(ttywerase)2.964 E F1(and)2.964 E F0
-(wrapmar)2.964 E(-)-.37 E(gin)142 420 Q F1(options.)2.5 E F0([b)72 444 Q
-(uffer] P)-.2 E F1 .48(Insert te)97 456 R .48(xt from a b)-.15 F(uf)-.2
-E(fer)-.25 E 5.48(.T)-.55 G -.15(ex)-6.18 G 2.98(tf).15 G .48(rom the b)
--2.98 F(uf)-.2 E .481(fer \(the unnamed b)-.25 F(uf)-.2 E .481
-(fer by def)-.25 F .481(ault\) is inserted before the)-.1 F
-(current column or)97 468 Q 2.5(,i)-.4 G 2.5(ft)-2.5 G(he b)-2.5 E(uf)
--.2 E(fer is line oriented, before the current line.)-.25 E 21.39
-(Line: Set)97 492 R .336(to the lo)2.836 F .336
-(west numbered line insert, if the b)-.25 F(uf)-.2 E .335
-(fer is line oriented, otherwise unchanged.)-.25 F 7.49(Column: Set)97
-504 R .04(to the \214rst nonblank character of the appended te)2.54 F
-.041(xt, if the b)-.15 F(uf)-.2 E .041(fer is line oriented, other)-.25
-F(-)-.2 E(wise, the last character of the appended te)142 516 Q(xt.)-.15
-E 8.05(Options: None.)97 528 R F0(Q)72 552 Q F1(Exit)97 564 Q F0(vi)2.5
-E F1(\(or visual\) mode and switch to)2.5 E F0(ex)2.5 E F1(mode.)2.5 E
-21.39(Line: Unchanged.)97 588 R 7.49(Column: No)97 600 R(longer rele)2.5
-E -.25(va)-.25 G(nt.).25 E 8.05(Options: None.)97 612 R F0([count] R)72
-636 Q F1 .212
-(Enter input mode, replacing the characters in the current line.)97 648
-R(If)5.212 E F2(count)2.712 E F1 .211(is speci\214ed, the te)2.712 F
-.211(xt input is)-.15 F(repeatedly input)97 660 Q F2(count - 1)2.5 E F1
-(more times.)2.5 E .789(If the end of the current line is reached, no more characters are replaced and an)
-97 684 R 3.29(yf)-.15 G .79(urther characters)-3.29 F
-(input are appended to the line.)97 696 Q EP
-%%Page: 31 30
-%%BeginPageSetup
-BP
-%%EndPageSetup
-/F0 10/Times-Bold@0 SF(Nvi/Nex Refer)72 60 Q(ence \(V)-.18 E 2.5(iC)-.37
-G 233.15(ommands\) USD:13-31)-2.5 F/F1 10/Times-Roman@0 SF 21.39
-(Line: Set)97 96 R(to the last line upon which characters were entered.)
-2.5 E 7.49(Column: Set)97 108 R(to the last character entered.)2.5 E
-8.05(Options: Af)97 120 R .465(fected by the)-.25 F F0(altwerase)2.965 E
-F1(,)A F0(autoindent)2.965 E F1(,)A F0(beautify)2.964 E F1(,)A F0(sho)
-2.964 E(wmatch)-.1 E F1(,)A F0(ttywerase)2.964 E F1(and)2.964 E F0
-(wrapmar)2.964 E(-)-.37 E(gin)142 132 Q F1(options.)2.5 E F0([b)72 156 Q
-(uffer] [count] S)-.2 E F1(Substitute)97 168 Q/F2 10/Courier@0 SF(count)
-2.5 E F1(lines.)2.5 E 21.39(Line: Set)97 192 R
-(to the last line upon which characters were entered.)2.5 E 7.49
-(Column: Set)97 204 R(to the last character entered.)2.5 E 8.05
-(Options: Af)97 216 R .464(fected by the)-.25 F F0(altwerase)2.964 E F1
-(,)A F0(autoindent)2.964 E F1(,)A F0(beautify)2.964 E F1(,)A F0(sho)
-2.965 E(wmatch)-.1 E F1(,)A F0(ttywerase)2.965 E F1(and)2.965 E F0
-(wrapmar)2.965 E(-)-.37 E(gin)142 228 Q F1(options.)2.5 E F0
-([count] T <character>)72 252 Q F1 2.925(Search backw)97 264 R(ard,)-.1
-E F2(count)5.425 E F1 2.925
-(times, through the current line for the character)5.425 F/F3 10
-/Times-Italic@0 SF(after)5.424 E F1 2.924(the speci\214ed)5.424 F F2
-(<character>)97 276 Q F1(.)A(The)97 300 Q F0(T)2.553 E F1 .053
-(command may be used as the motion component of other)2.553 F F0(vi)
-2.553 E F1 .054(commands, in which case an)2.554 F 2.554(yt)-.15 G -.15
-(ex)-2.554 G(t).15 E(copied into a b)97 312 Q(uf)-.2 E
-(fer is character oriented.)-.25 E 21.39(Line: Unchanged.)97 336 R 7.49
-(Column: Set)97 348 R(to the character)2.5 E F3(after)2.5 E F1
-(the searched-for character)2.5 E(.)-.55 E 8.05(Options: None.)97 360 R
-F0(U)72 384 Q F1
-(Restore the current line to its state before the cursor last mo)97 396
-Q -.15(ve)-.15 G 2.5(dt).15 G 2.5(oi)-2.5 G(t.)-2.5 E 21.39
-(Line: Unchanged.)97 420 R 7.49(Column: The)97 432 R
-(\214rst character in the line.)2.5 E 8.05(Options: None.)97 444 R F0
-([count] W)72 468 Q F1(Mo)97 480 Q .794 -.15(ve f)-.15 H(orw).15 E(ard)
--.1 E F2(count)2.994 E F1(bigw)2.994 E 2.994(ords. Mo)-.1 F .794 -.15
-(ve t)-.15 H .493(he cursor forw).15 F .493(ard to the be)-.1 F .493
-(ginning of a bigw)-.15 F .493(ord by repeat-)-.1 F .647(ing the follo)
-97 492 R .647(wing algorithm: if the current position is within a bigw)
--.25 F .647(ord or the character at that posi-)-.1 F .846
-(tion cannot be part of a bigw)97 504 R .846(ord, mo)-.1 F 1.146 -.15
-(ve t)-.15 H 3.346(ot).15 G .845(he \214rst character of the ne)-3.346 F
-.845(xt bigw)-.15 F 3.345(ord. If)-.1 F .845(no subsequent)3.345 F(bigw)
-97 516 Q .426(ord e)-.1 F .426(xists on the current line, mo)-.15 F .726
--.15(ve t)-.15 H 2.926(ot).15 G .426
-(he \214rst character of the \214rst bigw)-2.926 F .426
-(ord on the \214rst follo)-.1 F(w-)-.25 E(ing line that contains a bigw)
-97 528 Q(ord.)-.1 E(The)97 552 Q F0(W)3.382 E F1 .881
-(command may be used as the motion component of other)3.382 F F0(vi)
-3.381 E F1 .881(commands, in which case an)3.381 F(y)-.15 E(te)97 564 Q
-(xt copied into a b)-.15 E(uf)-.2 E(fer is character oriented.)-.25 E
-21.39(Line: The)97 588 R(line containing the w)2.5 E(ord selected.)-.1 E
-7.49(Column: The)97 600 R(\214rst character of the w)2.5 E
-(ord selected.)-.1 E 8.05(Options: None.)97 612 R F0([b)72 636 Q
-(uffer] [count] X)-.2 E F1(Delete)97 648 Q F2(count)2.945 E F1 .445
-(characters before the cursor)2.945 F 5.445(.I)-.55 G 2.946(ft)-5.445 G
-.446(he number of characters to be deleted is greater than)-2.946 F .393
-(or equal to the number of characters to the be)97 660 R .392
-(ginning of the line, all of the characters before the cur)-.15 F(-)-.2
-E(rent cursor position, to the be)97 672 Q
-(ginning of the line, are deleted.)-.15 E 21.39(Line: Unchanged.)97 696
-R 7.49(Column: Set)97 708 R .147(to the current character minus)2.647 F
-F2(count)2.647 E F1 2.647(,o)C 2.647(rt)-2.647 G .148
-(he \214rst character if count is greater than the)-2.647 F
-(number of characters in the line before the cursor)142 720 Q(.)-.55 E
-EP
-%%Page: 32 31
-%%BeginPageSetup
-BP
-%%EndPageSetup
-/F0 10/Times-Bold@0 SF 233.15(USD:13-32 Nvi/Nex)72 60 R(Refer)2.5 E
-(ence \(V)-.18 E 2.5(iC)-.37 G(ommands\))-2.5 E/F1 10/Times-Roman@0 SF
-8.05(Options: None.)97 96 R F0([b)72 120 Q(uffer] [count] Y)-.2 E F1
-(Cop)97 132 Q 2.5(y\()-.1 G(or \231yank\232\))-2.5 E/F2 10/Courier@0 SF
-(count)2.5 E F1(lines into the speci\214ed b)2.5 E(uf)-.2 E(fer)-.25 E
-(.)-.55 E 21.39(Line: Unchanged.)97 156 R 7.49(Column: Unchanged.)97 168
-R 8.05(Options: None.)97 180 R F0(ZZ)72 204 Q F1 .137
-(Write the \214le and e)97 216 R(xit)-.15 E F0(vi)2.637 E F1 5.137(.T)C
-.137(he \214le is only written if it has been modi\214ed since the last complete write)
--5.137 F(of the \214le to an)97 228 Q 2.5<798c>-.15 G(le.)-2.5 E(The)97
-252 Q F0(ZZ)2.802 E F1 .302(command will e)2.802 F .302(xit the editor after writing the \214le, if there are no further \214les to edit.)
--.15 F(Enter)5.303 E(-)-.2 E .58(ing tw)97 264 R 3.08<6f99>-.1 G .58
-(quit\232 commands \(i.e.)-3.08 F F0(wq)5.58 E F1(,)A F0(quit)3.08 E F1
-(,)A F0(xit)3.08 E F1(or)3.08 E F0(ZZ)3.08 E F1 3.08(\)i)C 3.08(nar)
--3.08 G 1.08 -.25(ow w)-3.08 H .58(ill o).25 F -.15(ve)-.15 G .58
-(rride this check and the editor).15 F(will e)97 276 Q(xit, ignoring an)
--.15 E 2.5<798c>-.15 G(les that ha)-2.5 E .3 -.15(ve n)-.2 H
-(ot yet been edited.).15 E 21.39(Line: Unchanged.)97 300 R 7.49
-(Column: Unchanged.)97 312 R 8.05(Options: None.)97 324 R F0([count] [[)
-72 348 Q F1(Back up)97 360 Q F2(count)2.5 E F1(section boundaries.)2.5 E
-(The)97 384 Q F0([[)3.063 E F1 .563(command is an absolute mo)3.063 F
--.15(ve)-.15 G 3.064(ment. The).15 F F0([[)3.064 E F1 .564
-(command may be used as the motion component)3.064 F 1(of other)97 396 R
-F0(vi)3.5 E F1 1(commands, in which case an)3.5 F 3.5(yt)-.15 G -.15(ex)
--3.5 G 3.5(tc).15 G 1(opied into a b)-3.5 F(uf)-.2 E 1
-(fer is character oriented, unless the)-.25 F
-(starting position is column 0, in which case it is line oriented.)97
-408 Q(It is an error if the mo)97 432 Q -.15(ve)-.15 G
-(ment is past the be).15 E(ginning of the \214le.)-.15 E 21.39
-(Line: Set)97 456 R .46(to the pre)2.96 F .46(vious line that is)-.25 F
-F2(count)2.96 E F1 .461
-(section boundaries back, or the \214rst line of the \214le)2.961 F
-(if no more section boundaries e)142 468 Q
-(xist preceding the current line.)-.15 E 7.49(Column: Set)97 480 R
-(to the \214rst nonblank character in the line.)2.5 E 8.05(Options: Af)
-97 492 R(fected by the)-.25 E F0(sections)2.5 E F1(option.)2.5 E F0
-([count] ]])72 516 Q F1(Mo)97 528 Q .3 -.15(ve f)-.15 H(orw).15 E(ard)
--.1 E F2(count)2.5 E F1(section boundaries.)2.5 E(The)97 552 Q F0(]])
-3.064 E F1 .564(command is an absolute mo)3.064 F -.15(ve)-.15 G 3.064
-(ment. The).15 F F0(]])3.064 E F1 .563
-(command may be used as the motion component)3.064 F 1(of other)97 564 R
-F0(vi)3.5 E F1 1(commands, in which case an)3.5 F 3.5(yt)-.15 G -.15(ex)
--3.5 G 3.5(tc).15 G 1(opied into a b)-3.5 F(uf)-.2 E 1
-(fer is character oriented, unless the)-.25 F
-(starting position is column 0, in which case it is line oriented.)97
-576 Q(It is an error if the mo)97 600 Q -.15(ve)-.15 G
-(ment is past the end of the \214le.).15 E 21.39(Line: Set)97 624 R .112
-(to the line that is)2.613 F F2(count)2.612 E F1 .112
-(section boundaries forw)2.612 F .112
-(ard, or to the last line of the \214le if no)-.1 F
-(more section boundaries e)142 636 Q(xist follo)-.15 E
-(wing the current line.)-.25 E 7.49(Column: Set)97 648 R
-(to the \214rst nonblank character in the line.)2.5 E 8.05(Options: Af)
-97 660 R(fected by the)-.25 E F0(sections)2.5 E F1(option.)2.5 E F0(^)72
-684 Q F1(Mo)97 696 Q .3 -.15(ve t)-.15 H 2.5<6f8c>.15 G
-(rst nonblank character on the current line.)-2.5 E(The)97 720 Q F0(^)
-2.738 E F1 .239(command may be used as the motion component of other)
-2.738 F F0(vi)2.739 E F1 .239(commands, in which case an)2.739 F 2.739
-(yt)-.15 G -.15(ex)-2.739 G(t).15 E EP
-%%Page: 33 32
-%%BeginPageSetup
-BP
-%%EndPageSetup
-/F0 10/Times-Bold@0 SF(Nvi/Nex Refer)72 60 Q(ence \(V)-.18 E 2.5(iC)-.37
-G 233.15(ommands\) USD:13-33)-2.5 F/F1 10/Times-Roman@0 SF
-(copied into a b)97 96 Q(uf)-.2 E(fer is character oriented.)-.25 E
-21.39(Line: Unchanged.)97 120 R 7.49(Column: Set)97 132 R
-(to the \214rst nonblank character of the current line.)2.5 E 8.05
-(Options: None.)97 144 R F0([count] _)72 168 Q F1(Mo)97 180 Q .701 -.15
-(ve d)-.15 H -.25(ow).15 G(n).25 E/F2 10/Courier@0 SF .401(count - 1)
-2.901 F F1 .401(lines, to the \214rst nonblank character)2.901 F 5.4(.T)
--.55 G(he)-5.4 E F0(_)2.9 E F1 .4(command may be used as the)2.9 F .181
-(motion component of other)97 192 R F0(vi)2.681 E F1 .181
-(commands, in which case an)2.681 F 2.681(yt)-.15 G -.15(ex)-2.681 G
-2.681(tc).15 G .181(opied into a b)-2.681 F(uf)-.2 E .182
-(fer is line oriented.)-.25 F(It is not an error to e)97 216 Q -.15(xe)
--.15 G(cute the).15 E F0(_)2.5 E F1
-(command when the cursor is on the \214rst character in the line.)2.5 E
-21.39(Line: The)97 240 R(current line plus)2.5 E F2(count - 1)2.5 E F1
-(.)A 7.49(Column: The)97 252 R(\214rst nonblank character in the line.)
-2.5 E 8.05(Options: None.)97 264 R F0([count] a)72 288 Q F1 .319
-(Enter input mode, appending the te)97 300 R .318(xt after the cursor)
--.15 F 5.318(.I)-.55 G(f)-5.318 E F2(count)2.818 E F1 .318
-(is speci\214ed, the te)2.818 F .318(xt input is repeat-)-.15 F
-(edly input)97 312 Q F2(count - 1)2.5 E F1(more times.)2.5 E 21.39
-(Line: Set)97 336 R
-(to the last line upon which characters were entered.)2.5 E 7.49
-(Column: Set)97 348 R(to the last character entered.)2.5 E 8.05
-(Options: Af)97 360 R .464(fected by the)-.25 F F0(altwerase)2.964 E F1
-(,)A F0(autoindent)2.964 E F1(,)A F0(beautify)2.964 E F1(,)A F0(sho)
-2.965 E(wmatch)-.1 E F1(,)A F0(ttywerase)2.965 E F1(and)2.965 E F0
-(wrapmar)2.965 E(-)-.37 E(gin)142 372 Q F1(options.)2.5 E F0([count] b)
-72 396 Q F1(Mo)97 408 Q .905 -.15(ve b)-.15 H(ackw).15 E(ard)-.1 E F2
-(count)3.105 E F1 -.1(wo)3.105 G 3.105(rds. Mo).1 F .905 -.15(ve t)-.15
-H .605(he cursor backw).15 F .605(ard to the be)-.1 F .604
-(ginning of a w)-.15 F .604(ord by repeating)-.1 F .111(the follo)97 420
-R .111(wing algorithm: if the current position is at the be)-.25 F .112
-(ginning of a w)-.15 F .112(ord, mo)-.1 F .412 -.15(ve t)-.15 H 2.612
-(ot).15 G .112(he \214rst charac-)-2.612 F .349(ter of the preceding w)
-97 432 R 2.848(ord. Otherwise,)-.1 F .348(the current position mo)2.848
-F -.15(ve)-.15 G 2.848(st).15 G 2.848(ot)-2.848 G .348
-(he \214rst character of the w)-2.848 F .348(ord at)-.1 F .13
-(the current position.)97 444 R .13(If no preceding w)5.13 F .13(ord e)
--.1 F .131(xists on the current line, mo)-.15 F .431 -.15(ve t)-.15 H
-2.631(ot).15 G .131(he \214rst character of the)-2.631 F(last w)97 456 Q
-(ord on the \214rst preceding line that contains a w)-.1 E(ord.)-.1 E
-(The)97 480 Q F0(b)2.615 E F1 .115
-(command may be used as the motion component of other)2.615 F F0(vi)
-2.615 E F1 .115(commands, in which case an)2.615 F 2.615(yt)-.15 G -.15
-(ex)-2.615 G(t).15 E(copied into a b)97 492 Q(uf)-.2 E
-(fer is character oriented.)-.25 E 21.39(Line: Set)97 516 R
-(to the line containing the w)2.5 E(ord selected.)-.1 E 7.49
-(Column: Set)97 528 R(to the \214rst character of the w)2.5 E
-(ord selected.)-.1 E 8.05(Options: None.)97 540 R F0([b)72 564 Q
-(uffer] [count] c motion)-.2 E F1 1.617(Change the re)97 576 R 1.617
-(gion of te)-.15 F 1.618(xt speci\214ed by the)-.15 F F2(count)4.118 E
-F1(and)4.118 E F2(motion)4.118 E F1 6.618(.I)C 4.118(fo)-6.618 G 1.618
-(nly part of a single line is)-4.118 F(af)97 588 Q .283
-(fected, then the last character being changed is mark)-.25 F .283
-(ed with a \231)-.1 F F2($)A F1 2.783(\232. Otherwise,)B .283(the re)
-2.783 F .283(gion of te)-.15 F .282(xt is)-.15 F
-(deleted, and input mode is entered.)97 600 Q 21.39(Line: Set)97 624 R
-(to the last line upon which characters were entered.)2.5 E 7.49
-(Column: Set)97 636 R(to the last character entered.)2.5 E 8.05
-(Options: Af)97 648 R .464(fected by the)-.25 F F0(altwerase)2.964 E F1
-(,)A F0(autoindent)2.964 E F1(,)A F0(beautify)2.964 E F1(,)A F0(sho)
-2.965 E(wmatch)-.1 E F1(,)A F0(ttywerase)2.965 E F1(and)2.965 E F0
-(wrapmar)2.965 E(-)-.37 E(gin)142 660 Q F1(options.)2.5 E F0([b)72 684 Q
-(uffer] [count] d motion)-.2 E F1(Delete the re)97 696 Q(gion of te)-.15
-E(xt speci\214ed by the)-.15 E F2(count)2.5 E F1(and)2.5 E F2(motion)2.5
-E F1(.)A EP
-%%Page: 34 33
-%%BeginPageSetup
-BP
-%%EndPageSetup
-/F0 10/Times-Bold@0 SF 233.15(USD:13-34 Nvi/Nex)72 60 R(Refer)2.5 E
-(ence \(V)-.18 E 2.5(iC)-.37 G(ommands\))-2.5 E/F1 10/Times-Roman@0 SF
-21.39(Line: Set)97 96 R(to the line where the re)2.5 E(gion starts.)-.15
-E 7.49(Column: Set)97 108 R .063(to the \214rst character in the line after the last character in the re)
-2.564 F 2.563(gion. If)-.15 F .063(no such charac-)2.563 F(ter e)142 120
-Q(xists, set to the last character before the re)-.15 E(gion.)-.15 E
-8.05(Options: None.)97 132 R F0([count] e)72 156 Q F1(Mo)97 168 Q .598
--.15(ve f)-.15 H(orw).15 E(ard)-.1 E/F2 10/Courier@0 SF(count)2.798 E F1
-(end-of-w)2.798 E 2.798(ords. Mo)-.1 F .598 -.15(ve t)-.15 H .298
-(he cursor forw).15 F .298(ard to the end of a w)-.1 F .299
-(ord by repeating the)-.1 F(follo)97 180 Q .201
-(wing algorithm: if the current position is the end of a w)-.25 F .201
-(ord, mo)-.1 F .501 -.15(ve t)-.15 H 2.701(ot).15 G .201
-(he last character of the fol-)-2.701 F(lo)97 192 Q .95(wing w)-.25 F
-3.45(ord. Otherwise,)-.1 F(mo)3.45 E 1.25 -.15(ve t)-.15 H 3.45(ot).15 G
-.951(he last character of the w)-3.45 F .951
-(ord at the current position.)-.1 F .951(If no suc-)5.951 F .766
-(ceeding w)97 204 R .766(ord e)-.1 F .766(xists on the current line, mo)
--.15 F 1.065 -.15(ve t)-.15 H 3.265(ot).15 G .765
-(he last character of the \214rst w)-3.265 F .765(ord on the ne)-.1 F
-.765(xt fol-)-.15 F(lo)97 216 Q(wing line that contains a w)-.25 E(ord.)
--.1 E(The)97 240 Q F0(e)2.677 E F1 .177
-(command may be used as the motion component of other)2.677 F F0(vi)
-2.677 E F1 .178(commands, in which case an)2.677 F 2.678(yt)-.15 G -.15
-(ex)-2.678 G(t).15 E(copied into a b)97 252 Q(uf)-.2 E
-(fer is character oriented.)-.25 E 21.39(Line: Set)97 276 R
-(to the line containing the w)2.5 E(ord selected.)-.1 E 7.49
-(Column: Set)97 288 R(to the last character of the w)2.5 E
-(ord selected.)-.1 E 8.05(Options: None.)97 300 R F0
-([count] f <character>)72 324 Q F1(Search forw)97 336 Q(ard,)-.1 E F2
-(count)2.5 E F1(times, through the rest of the current line for)2.5 E F2
-(<character>)2.5 E F1(.)A(The)97 360 Q F0(f)2.739 E F1 .239
-(command may be used as the motion component of other)2.739 F F0(vi)
-2.739 E F1 .239(commands, in which case an)2.739 F 2.738(yt)-.15 G -.15
-(ex)-2.738 G(t).15 E(copied into a b)97 372 Q(uf)-.2 E
-(fer is character oriented.)-.25 E 21.39(Line: Unchanged.)97 396 R 7.49
-(Column: Set)97 408 R(to the searched-for character)2.5 E(.)-.55 E 8.05
-(Options: None.)97 420 R F0([count] i)72 444 Q F1 .285
-(Enter input mode, inserting the te)97 456 R .285(xt before the cursor)
--.15 F 5.285(.I)-.55 G(f)-5.285 E F2(count)2.785 E F1 .286
-(is speci\214ed, the te)2.785 F .286(xt input is repeat-)-.15 F
-(edly input)97 468 Q F2(count - 1)2.5 E F1(more times.)2.5 E 21.39
-(Line: Set)97 492 R
-(to the last line upon which characters were entered.)2.5 E 7.49
-(Column: Set)97 504 R(to the last character entered.)2.5 E 8.05
-(Options: Af)97 516 R .465(fected by the)-.25 F F0(altwerase)2.965 E F1
-(,)A F0(autoindent)2.965 E F1(,)A F0(beautify)2.964 E F1(,)A F0(sho)
-2.964 E(wmatch)-.1 E F1(,)A F0(ttywerase)2.964 E F1(and)2.964 E F0
-(wrapmar)2.964 E(-)-.37 E(gin)142 528 Q F1(options.)2.5 E F0 2.5(m<)72
-552 S(character>)-2.5 E F1(Sa)97 564 Q .988 -.15(ve t)-.2 H .688
-(he current conte).15 F .688(xt \(line and column\) as)-.15 F F2
-(<character>)3.189 E F1 5.689(.T)C .689(he e)-5.689 F .689
-(xact position is referred to by)-.15 F<99>97 576 Q F2(`<character>)A F1
-2.5(\232. The)B(line is referred to by \231)2.5 E F2('<character>)A F1
-<9a2e>A(Historically)97 600 Q(,)-.65 E F2(<character>)2.816 E F1 -.1(wa)
-2.816 G 2.816(sr).1 G .316(estricted to lo)-2.816 F(wer)-.25 E .315
-(-case letters.)-.2 F F0(Nvi)5.315 E F1 .315(permits the use of an)2.815
-F 2.815(yc)-.15 G(harac-)-2.815 E(ter)97 612 Q(.)-.55 E 21.39
-(Line: Unchanged.)97 636 R 7.49(Column: Unchanged.)97 648 R 8.05
-(Options: None.)97 660 R F0([count] o)72 684 Q F1 .175
-(Enter input mode, appending te)97 696 R .175(xt in a ne)-.15 F 2.675
-(wl)-.25 G .176(ine under the current line.)-2.675 F(If)5.176 E F2
-(count)2.676 E F1 .176(is speci\214ed, the te)2.676 F(xt)-.15 E
-(input is repeatedly input)97 708 Q F2(count - 1)2.5 E F1(more times.)
-2.5 E EP
-%%Page: 35 34
-%%BeginPageSetup
-BP
-%%EndPageSetup
-/F0 10/Times-Bold@0 SF(Nvi/Nex Refer)72 60 Q(ence \(V)-.18 E 2.5(iC)-.37
-G 233.15(ommands\) USD:13-35)-2.5 F/F1 10/Times-Roman@0 SF(Historically)
-97 96 Q 2.5(,a)-.65 G -.15(ny)-2.5 G/F2 10/Courier@0 SF(count)2.65 E F1
-(speci\214ed to the)2.5 E F0(o)2.5 E F1(command w)2.5 E(as ignored.)-.1
-E 21.39(Line: Set)97 120 R
-(to the last line upon which characters were entered.)2.5 E 7.49
-(Column: Set)97 132 R(to the last character entered.)2.5 E 8.05
-(Options: Af)97 144 R .465(fected by the)-.25 F F0(altwerase)2.965 E F1
-(,)A F0(autoindent)2.965 E F1(,)A F0(beautify)2.964 E F1(,)A F0(sho)
-2.964 E(wmatch)-.1 E F1(,)A F0(ttywerase)2.964 E F1(and)2.964 E F0
-(wrapmar)2.964 E(-)-.37 E(gin)142 156 Q F1(options.)2.5 E F0([b)72 180 Q
-(uffer] p)-.2 E F1 .91(Append te)97 192 R .91(xt from a b)-.15 F(uf)-.2
-E(fer)-.25 E 5.91(.T)-.55 G -.15(ex)-6.61 G 3.41(tf).15 G .91(rom the b)
--3.41 F(uf)-.2 E .91(fer \(the unnamed b)-.25 F(uf)-.2 E .91(fer by def)
--.25 F .91(ault\) is appended after)-.1 F(the current column or)97 204 Q
-2.5(,i)-.4 G 2.5(ft)-2.5 G(he b)-2.5 E(uf)-.2 E
-(fer is line oriented, after the current line.)-.25 E 21.39(Line: Set)97
-228 R(to the \214rst line appended, if the b)2.5 E(uf)-.2 E
-(fer is line oriented, otherwise unchanged.)-.25 E 7.49(Column: Set)97
-240 R .197(to the \214rst nonblank character of the appended te)2.697 F
-.197(xt if the b)-.15 F(uf)-.2 E .197(fer is line oriented, other)-.25 F
-(-)-.2 E(wise, the last character of the appended te)142 252 Q(xt.)-.15
-E 8.05(Options: None.)97 264 R F0([count] r <character>)72 288 Q F1
-2.395(Replace characters.)97 300 R 2.396(The ne)7.395 F(xt)-.15 E F2
-(count)4.896 E F1 2.396(characters in the line are replaced with)4.896 F
-F2(<character>)4.896 E F1(.)A(Replacing characters with)97 312 Q F2
-(<newline>)2.5 E F1(characters results in creating ne)2.5 E 1.3 -.65
-(w, e)-.25 H(mpty lines into the \214le.).65 E(If)97 336 Q F2
-(<character>)2.5 E F1(is)2.5 E F2(<escape>)2.5 E F1 2.5(,t)C
-(he command is cancelled.)-2.5 E 21.39(Line: Unchanged)97 360 R .755
-(unless the replacement character is a)3.255 F F2(<newline>)3.255 E F1
-3.255(,i)C 3.255(nw)-3.255 G .755(hich case it is set to)-3.255 F
-(the current line plus)142 372 Q F2(count - 1)2.5 E F1(.)A 7.49
-(Column: Set)97 384 R .9
-(to the last character replaced, unless the replacement character is a)
-3.4 F F2(<newline>)3.4 E F1 3.4(,i)C(n)-3.4 E
-(which case the cursor is in column 1 of the last line inserted.)142 396
-Q 8.05(Options: None.)97 408 R F0([b)72 432 Q(uffer] [count] s)-.2 E F1
-(Substitute)97 444 Q F2(count)2.5 E F1
-(characters in the current line starting with the current character)2.5
-E(.)-.55 E 21.39(Line: Set)97 468 R
-(to the last line upon which characters were entered.)2.5 E 7.49
-(Column: Set)97 480 R(to the last character entered.)2.5 E 8.05
-(Options: Af)97 492 R .465(fected by the)-.25 F F0(altwerase)2.965 E F1
-(,)A F0(autoindent)2.965 E F1(,)A F0(beautify)2.964 E F1(,)A F0(sho)
-2.964 E(wmatch)-.1 E F1(,)A F0(ttywerase)2.964 E F1(and)2.964 E F0
-(wrapmar)2.964 E(-)-.37 E(gin)142 504 Q F1(options.)2.5 E F0
-([count] t <character>)72 528 Q F1 .055(Search forw)97 540 R(ard,)-.1 E
-F2(count)2.555 E F1 .055
-(times, through the current line for the character immediately)2.555 F
-/F3 10/Times-Italic@0 SF(befor)2.556 E(e)-.37 E F2(<char-)2.556 E
-(acter>)97 552 Q F1(.)A(The)97 576 Q F0(t)2.739 E F1 .239
-(command may be used as the motion component of other)2.739 F F0(vi)
-2.739 E F1 .239(commands, in which case an)2.739 F 2.738(yt)-.15 G -.15
-(ex)-2.738 G(t).15 E(copied into a b)97 588 Q(uf)-.2 E
-(fer is character oriented.)-.25 E 21.39(Line: Unchanged.)97 612 R 7.49
-(Column: Set)97 624 R(to the character)2.5 E F3(befor)2.5 E(e)-.37 E F1
-(the searched-for character)2.5 E(.)-.55 E 8.05(Options: None.)97 636 R
-F0(u)72 660 Q F1 1.473(Undo the last change made to the \214le.)97 672 R
-1.473(If repeated, the)6.473 F F0(u)3.973 E F1 1.473
-(command alternates between these tw)3.973 F(o)-.1 E .437
-(states, and is its o)97 684 R .437(wn in)-.25 F -.15(ve)-.4 G 2.937
-(rse. When).15 F .436(used after an insert that inserted te)2.936 F .436
-(xt on more than one line, the)-.15 F(lines are sa)97 696 Q -.15(ve)-.2
-G 2.5(di).15 G 2.5(nt)-2.5 G(he numeric b)-2.5 E(uf)-.2 E(fers.)-.25 E
-(The)97 720 Q F0(.)3.531 E F1 1.032
-(command, when used immediately after the)6.031 F F0(u)3.532 E F1 1.032
-(command, causes the change log to be rolled)3.532 F EP
-%%Page: 36 35
-%%BeginPageSetup
-BP
-%%EndPageSetup
-/F0 10/Times-Bold@0 SF 233.15(USD:13-36 Nvi/Nex)72 60 R(Refer)2.5 E
-(ence \(V)-.18 E 2.5(iC)-.37 G(ommands\))-2.5 E/F1 10/Times-Roman@0 SF
-(forw)97 96 Q(ard or backw)-.1 E(ard, depending on the action of the)-.1
-E F0(u)2.5 E F1(command.)2.5 E 21.39(Line: Set)97 120 R .715
-(to the position of the \214rst line changed, if the re)3.216 F -.15(ve)
--.25 G .715(rsal af).15 F .715(fects only one line or repre-)-.25 F(sents an addition or change; otherwise, the line preceding the deleted te)
-142 132 Q(xt.)-.15 E 7.49(Column: Set)97 144 R
-(to the cursor position before the change w)2.5 E(as made.)-.1 E 8.05
-(Options: None.)97 156 R F0([count] w)72 180 Q F1(Mo)97 192 Q .849 -.15
-(ve f)-.15 H(orw).15 E(ard)-.1 E/F2 10/Courier@0 SF(count)3.049 E F1 -.1
-(wo)3.049 G 3.049(rds. Mo).1 F .849 -.15(ve t)-.15 H .549
-(he cursor forw).15 F .549(ard to the be)-.1 F .55(ginning of a w)-.15 F
-.55(ord by repeating the)-.1 F(follo)97 204 Q .56
-(wing algorithm: if the current position is at the be)-.25 F .559
-(ginning of a w)-.15 F .559(ord, mo)-.1 F .859 -.15(ve t)-.15 H 3.059
-(ot).15 G .559(he \214rst character)-3.059 F .502(of the ne)97 216 R
-.502(xt w)-.15 F 3.002(ord. If)-.1 F .502(no subsequent w)3.002 F .502
-(ord e)-.1 F .502(xists on the current line, mo)-.15 F .802 -.15(ve t)
--.15 H 3.002(ot).15 G .502(he \214rst character of the)-3.002 F
-(\214rst w)97 228 Q(ord on the \214rst follo)-.1 E
-(wing line that contains a w)-.25 E(ord.)-.1 E(The)97 252 Q F0(w)2.523 E
-F1 .023(command may be used as the motion component of other)2.523 F F0
-(vi)2.523 E F1 .022(commands, in which case an)2.523 F 2.522(yt)-.15 G
--.15(ex)-2.522 G(t).15 E(copied into a b)97 264 Q(uf)-.2 E
-(fer is character oriented.)-.25 E 21.39(Line: Set)97 288 R
-(to the line containing the w)2.5 E(ord selected.)-.1 E 7.49
-(Column: Set)97 300 R(to the \214rst character of the w)2.5 E
-(ord selected.)-.1 E 8.05(Options: None.)97 312 R F0([b)72 336 Q
-(uffer] [count] x)-.2 E F1(Delete)97 348 Q F2(count)2.808 E F1 2.808
-(characters. The)2.808 F .308
-(deletion is at the current character position.)2.808 F .308
-(If the number of charac-)5.308 F .335(ters to be deleted is greater than or equal to the number of characters to the end of the line, all of the)
-97 360 R(characters from the current cursor position to the end of the line are deleted.)
-97 372 Q 21.39(Line: Unchanged.)97 396 R 7.49(Column: Unchanged)97 408 R
-.477(unless the last character in the line is deleted and the cursor is not already on)
-2.976 F
-(the \214rst character in the line, in which case it is set to the pre)
-142 420 Q(vious character)-.25 E(.)-.55 E 8.05(Options: None.)97 432 R
-F0([b)72 456 Q(uffer] [count] y motion)-.2 E F1(Cop)97 468 Q 2.5(y\()-.1
-G(or \231yank\232\) the te)-2.5 E(xt re)-.15 E(gion speci\214ed by the)
--.15 E F2(count)2.5 E F1(and)2.5 E F2(motion)2.5 E F1 2.5(,i)C(nto a b)
--2.5 E(uf)-.2 E(fer)-.25 E(.)-.55 E 21.39(Line: Unchanged,)97 492 R .393
-(unless the re)2.893 F .393(gion co)-.15 F -.15(ve)-.15 G .392
-(rs more than a single line, in which case it is set to the).15 F
-(line where the re)142 504 Q(gion starts.)-.15 E 7.49
-(Column: Unchanged,)97 516 R .392(unless the re)2.892 F .392(gion co)
--.15 F -.15(ve)-.15 G .392
-(rs more than a single line, in which case it is set to the).15 F
-(character were the re)142 528 Q(gion starts.)-.15 E 8.05
-(Options: None.)97 540 R F0([count1] z [count2] type)72 564 Q F1(Redra)
-97 576 Q 2.997(wt)-.15 G .497(he screen with a windo)-2.997 F(w)-.25 E
-F2(count2)2.997 E F1 .497(lines long, with line)2.997 F F2(count1)2.997
-E F1 .497(placed as speci\214ed by the)2.997 F F2(type)97 588 Q F1
-(character)2.96 E 5.46(.I)-.55 G(f)-5.46 E F2(count1)2.96 E F1 .46
-(is not speci\214ed, it def)2.96 F .46(aults to the current line.)-.1 F
-(If)5.46 E F2(count2)2.96 E F1 .46(is not speci-)2.96 F(\214ed, it def)
-97 600 Q(aults to the current windo)-.1 E 2.5(ws)-.25 G(ize.)-2.5 E
-(The follo)97 624 Q(wing)-.25 E F2(type)2.5 E F1
-(characters may be used:)2.5 E 39.36(+I)97 648 S(f)-39.36 E F2(count1)
-3.226 E F1 .726(is speci\214ed, place the line)3.226 F F2(count1)3.226 E
-F1 .726(at the top of the screen.)3.226 F .726(Otherwise, dis-)5.726 F
-(play the screen after the current screen, similarly to the)142 660 Q F0
-(<contr)2.5 E(ol-F>)-.18 E F1(command.)2.5 E(<carriage-return>)97 672 Q
-(Place the line)142 684 Q F2(count1)2.5 E F1(at the top of the screen.)
-2.5 E 42.5(.P)97 696 S(lace the line)-42.5 E F2(count1)2.5 E F1
-(in the center of the screen.)2.5 E 39.36<ad50>97 708 S(lace the line)
--39.36 E F2(count1)2.5 E F1(at the bottom of the screen.)2.5 E EP
-%%Page: 37 36
-%%BeginPageSetup
-BP
-%%EndPageSetup
-/F0 10/Times-Bold@0 SF(Nvi/Nex Refer)72 60 Q(ence \(V)-.18 E 2.5(iC)-.37
-G 233.15(ommands\) USD:13-37)-2.5 F/F1 10/Times-Roman@0 SF 41.67(^I)97
-96 S(f)-41.67 E/F2 10/Courier@0 SF(count1)3.042 E F1 .543
-(is speci\214ed, place the line that is at the top of the screen when)
-3.042 F F2(count1)3.043 E F1 .543(is at)3.043 F 1.241(the bottom of the screen, at the bottom of the screen, i.e. display the screen before the)
-142 108 R .226(screen before)142 120 R F2(count1)2.726 E F1 5.226(.O)C
-.226(therwise, display the screen before the current screen, similarly)
--5.226 F(to the)142 132 Q F0(<contr)2.5 E(ol-B>)-.18 E F1(command.)2.5 E
-21.39(Line: Set)97 156 R(to)2.714 E F2(count1)2.714 E F1(unless)2.714 E
-F2(count1)2.714 E F1 .214(is not speci\214ed and the)2.714 F F2(type)
-2.714 E F1 .214(character w)2.714 F .214(as either \231)-.1 F F2(^)A F1
-2.714<9a6f>C(r)-2.714 E<99>142 168 Q F2(+)A F1 .051(\232, in which case it is set to the line before the \214rst line on the pre)
-B .052(vious screen or the line)-.25 F(after the last line on the pre)
-142 180 Q(vious screen, respecti)-.25 E -.15(ve)-.25 G(ly).15 E(.)-.65 E
-7.49(Column: Set)97 192 R
-(to the \214rst nonblank character in the line.)2.5 E 8.05
-(Options: None.)97 204 R F0([count] {)72 228 Q F1(Mo)97 240 Q .3 -.15
-(ve b)-.15 H(ackw).15 E(ard)-.1 E F2(count)2.5 E F1(paragraphs.)2.5 E
-(The)97 264 Q F0({)2.714 E F1 .214(command is an absolute mo)2.714 F
--.15(ve)-.15 G 2.714(ment. The).15 F F0({)2.714 E F1 .213
-(command may be used as the motion component of)2.714 F(other)97 276 Q
-F0(vi)2.781 E F1 .281(commands, in which case an)2.781 F 2.781(yt)-.15 G
--.15(ex)-2.781 G 2.781(tc).15 G .281(opied into a b)-2.781 F(uf)-.2 E
-.281(fer is character oriented, unless the start-)-.25 F(ing character is the \214rst character on its line, in which case it is line oriented.)
-97 288 Q 21.39(Line: Set)97 312 R(to the line containing the be)2.5 E
-(ginning of the pre)-.15 E(vious paragraph.)-.25 E 7.49(Column: Set)97
-324 R(to the \214rst nonblank character in the line.)2.5 E 8.05
-(Options: Af)97 336 R(fected by the)-.25 E F0(paragraph)2.5 E F1
-(option.)2.5 E F0([count] |)72 360 Q F1(Mo)97 372 Q .3 -.15(ve t)-.15 H
-2.5(oas).15 G(peci\214c)-2.5 E/F3 10/Times-Italic@0 SF(column)2.5 E F1
-(position on the current line.)2.5 E(The)97 396 Q F0(|)2.802 E F1 .302
-(command may be used as the motion component of other)2.802 F F0(vi)
-2.802 E F1 .301(commands, in which case an)2.801 F 2.801(yt)-.15 G -.15
-(ex)-2.801 G(t).15 E .295(copied into a b)97 408 R(uf)-.2 E .295
-(fer is character oriented.)-.25 F .295(It is an error to use the)5.295
-F F0(|)2.795 E F1 .296(command as a motion component)2.796 F
-(and for the cursor not to mo)97 420 Q -.15(ve)-.15 G(.).15 E 21.39
-(Line: Unchanged.)97 444 R 7.49(Column: Set)97 456 R 1.018
-(to the character occup)3.518 F 1.018
-(ying the column position identi\214ed by)-.1 F F2(count)3.517 E F1
-3.517(,i)C 3.517(ft)-3.517 G 1.017(he position)-3.517 F -.15(ex)142 468
-S .075(ists in the line.).15 F .075
-(If the column length of the current line is less than)5.075 F F2(count)
-2.575 E F1 2.575(,t)C .075(he cursor is)-2.575 F(mo)142 480 Q -.15(ve)
--.15 G 2.5(dt).15 G 2.5(ot)-2.5 G(he last character in the line.)-2.5 E
-8.05(Options: None.)97 492 R F0([count] })72 516 Q F1(Mo)97 528 Q .3
--.15(ve f)-.15 H(orw).15 E(ard)-.1 E F2(count)2.5 E F1(paragraphs.)2.5 E
-(The)97 552 Q F0(})2.714 E F1 .214(command is an absolute mo)2.714 F
--.15(ve)-.15 G 2.714(ment. The).15 F F0(})2.714 E F1 .213
-(command may be used as the motion component of)2.714 F(other)97 564 Q
-F0(vi)2.781 E F1 .281(commands, in which case an)2.781 F 2.781(yt)-.15 G
--.15(ex)-2.781 G 2.781(tc).15 G .281(opied into a b)-2.781 F(uf)-.2 E
-.281(fer is character oriented, unless the start-)-.25 F
-(ing character is at or before an)97 576 Q 2.5(yn)-.15 G
-(onblank characters in its line, in which case it is line oriented.)-2.5
-E 21.39(Line: Set)97 600 R(to the line containing the be)2.5 E
-(ginning of the ne)-.15 E(xt paragraph.)-.15 E 7.49(Column: Set)97 612 R
-(to the \214rst nonblank character in the line.)2.5 E 8.05(Options: Af)
-97 624 R(fected by the)-.25 E F0(paragraph)2.5 E F1(option.)2.5 E F0
-([count] ~)72 648 Q F1(Re)97 660 Q -.15(ve)-.25 G .009
-(rse the case of the ne).15 F(xt)-.15 E F2(count)2.508 E F1 2.508
-(character\(s\). This)2.508 F .008(is the historic semantic for the)
-2.508 F F0(~)2.508 E F1 .008(command and)2.508 F(it is only in ef)97 672
-Q(fect if the)-.25 E F0(tildeop)2.5 E F1(option is not set.)2.5 E(Lo)97
-696 Q .688(wercase alphabetic characters are changed to uppercase, and uppercase characters are changed to)
--.25 F(lo)97 708 Q 2.5(wercase. No)-.25 F(other characters are af)2.5 E
-(fected.)-.25 E EP
-%%Page: 38 37
-%%BeginPageSetup
-BP
-%%EndPageSetup
-/F0 10/Times-Bold@0 SF 233.15(USD:13-38 Nvi/Nex)72 60 R(Refer)2.5 E
-(ence \(V)-.18 E 2.5(iC)-.37 G(ommands\))-2.5 E/F1 10/Times-Roman@0 SF
-(Historically)97 96 Q 2.777(,t)-.65 G(he)-2.777 E F0(~)2.777 E F1 .277
-(command did not tak)2.777 F 2.776(ea)-.1 G 2.776(na)-2.776 G .276
-(ssociated count, nor did it mo)-2.776 F .576 -.15(ve p)-.15 H .276
-(ast the end of the cur).15 F(-)-.2 E .109(rent line.)97 108 R .109
-(As it had no associated motion it w)5.109 F .109(as dif)-.1 F .109
-(\214cult to change the case of lar)-.25 F .109(ge blocks of te)-.18 F
-2.609(xt. In)-.15 F F0 -.4(nv)97 120 S(i).4 E F1 3.809(,i)C 3.809(ft)
--3.809 G 1.309(he cursor is on the last character of a line, and there are more lines in the \214le, the cursor)
--3.809 F(mo)97 132 Q -.15(ve)-.15 G 2.5(st).15 G 2.5(ot)-2.5 G(he ne)
--2.5 E(xt line.)-.15 E .661(It is not an error to specify a count lar)97
-156 R .662(ger than the number of characters between the cursor and the)
--.18 F(end of the \214le.)97 168 Q 21.39(Line: Set)97 192 R
-(to the line of the character after)2.5 E/F2 10/Courier@0 SF(count)2.5 E
-F1(characters, or)2.5 E 2.5(,e)-.4 G(nd of \214le.)-2.5 E 7.49
-(Column: Set)97 204 R(to the character after)2.5 E F2(count)2.5 E F1
-(characters, or)2.5 E 2.5(,e)-.4 G(nd-of-\214le.)-2.5 E 8.05
-(Options: Af)97 216 R(fected by the)-.25 E F0(tildeop)2.5 E F1(option.)
-2.5 E F0([count] ~ motion)72 240 Q F1(Re)97 252 Q -.15(ve)-.25 G 1.101
-(rse the case of the characters in a te).15 F 1.101(xt re)-.15 F 1.101
-(gion speci\214ed by the)-.15 F F2(count)3.601 E F1(and)3.601 E F2
-(motion)3.601 E F1 6.101(.O)C 1.101(nly in)-6.101 F(ef)97 264 Q
-(fect if the)-.25 E F0(tildeop)2.5 E F1(option is set.)2.5 E(Lo)97 288 Q
-.594(wercase characters are changed to uppercase, and uppercase characters are changed to lo)
--.25 F(wercase.)-.25 E(No other characters are af)97 300 Q(fected.)-.25
-E 21.39(Line: Set)97 324 R
-(to the line of the character after the last character in the re)2.5 E
-(gion.)-.15 E 7.49(Column: Set)97 336 R
-(to the character after the last character in the re)2.5 E(gion.)-.15 E
-8.05(Options: Af)97 348 R(fected by the)-.25 E F0(tildeop)2.5 E F1
-(option.)2.5 E F0(<interrupt>)72 372 Q F1 1.403
-(Interrupt the current operation.)97 384 R(Man)6.403 E 3.903(yo)-.15 G
-3.903(ft)-3.903 G 1.403(he potentially long-running)-3.903 F F0(vi)3.903
-E F1 1.403(commands may be inter)3.903 F(-)-.2 E 1.678
-(rupted using the terminal interrupt character)97 396 R 6.678(.T)-.55 G
-1.679(hese operations include searches, \214le reading and)-6.678 F
-1.691(writing, \214lter operations and map character e)97 408 R 4.191
-(xpansion. Interrupts)-.15 F 1.691(are also enabled when running)4.191 F
-(commands outside of)97 420 Q F0(vi)2.5 E F1(.)A .441(If the)97 444 R F2
-(<interrupt>)2.941 E F1 .441
-(character is used to interrupt while entering an)2.941 F F0(ex)2.942 E
-F1 .442(command, the command is)2.942 F
-(aborted, the cursor returns to its pre)97 456 Q(vious position, and)
--.25 E F0(vi)2.5 E F1(remains in command mode.)2.5 E(Generally)97 480 Q
-4.217(,i)-.65 G 4.217(ft)-4.217 G(he)-4.217 E F2(<interrupt>)4.216 E F1
-1.716(character is used to interrupt an)4.216 F 4.216(yo)-.15 G 1.716
-(peration, an)-4.216 F 4.216(yc)-.15 G 1.716(hanges made)-4.216 F
-(before the interrupt are left in place.)97 492 Q 21.39(Line: Dependent)
-97 516 R(on the operation being interrupted.)2.5 E 7.49
-(Column: Dependent)97 528 R(on the operation being interrupted.)2.5 E
-8.05(Options: None.)97 540 R F0 2.5(14. V)97 564 R 2.5(iT)-.37 G
-(ext Input Commands)-3.42 E F1 .155(The follo)122 580.2 R .155
-(wing section describes the commands a)-.25 F -.25(va)-.2 G .155
-(ilable in the te).25 F .156(xt input mode of the)-.15 F F0(vi)2.656 E
-F1(editor)2.656 E(.)-.55 E(Historically)122 596.4 Q(,)-.65 E F0(vi)2.708
-E F1 .208(implementations only permitted the characters inserted on the current line to be)
-2.708 F 5.244(erased. In)97 608.4 R 2.744(addition, only the)5.244 F F2
-(<control-D>)5.244 E F1 2.745(erase character and the \231)5.245 F F2
-(0<control-D>)A F1 5.245<9a61>C(nd)-5.245 E<99>97 620.4 Q F2
-(^<control-D>)A F1 3.345<9a65>C .845
-(rase strings could erase autoindent characters.)-3.345 F .844
-(\(Autoindent characters include)5.844 F 1.722
-(both the characters inserted automatically at the be)97 632.4 R 1.723
-(ginning of an input line as well as characters)-.15 F .22
-(inserted using the)97 644.4 R F2(<control-T>)2.72 E F1 2.72
-(command.\) This)2.72 F .22
-(implementation permits erasure to continue past)2.72 F .063(the be)97
-656.4 R .063(ginning of the current line, and back to where te)-.15 F
-.064(xt input mode w)-.15 F .064(as entered.)-.1 F .064
-(In addition, autoin-)5.064 F .405
-(dent characters may be erased using the standard erase characters.)97
-668.4 R -.15(Fo)5.405 G 2.905(rt).15 G .405(he line and w)-2.905 F .405
-(ord erase char)-.1 F(-)-.2 E 1.07(acters, reaching the autoindent characters forms a \231soft\232 boundary)
-97 680.4 R 3.57(,d)-.65 G 1.07(enoting the end of the current)-3.57 F
--.1(wo)97 692.4 S(rd or line erase.).1 E(Repeating the w)5 E
-(ord or line erase k)-.1 E .3 -.15(ey w)-.1 H
-(ill erase the autoindent characters.).15 E(Historically)122 708.6 Q(,)
--.65 E F0(vi)2.947 E F1(al)2.947 E -.1(wa)-.1 G .447(ys used).1 F F2
-(<control-H>)2.947 E F1(and)2.946 E F2(<control-W>)2.946 E F1 .446
-(as character and w)2.946 F .446(ord erase)-.1 F .757
-(characters, respecti)97 720.6 R -.15(ve)-.25 G(ly).15 E 3.257(,r)-.65 G
--2.25 -.15(eg a)-3.257 H .757(rdless of the current terminal settings.)
-.15 F .758(This implementation accepts, in)5.757 F EP
-%%Page: 39 38
-%%BeginPageSetup
-BP
-%%EndPageSetup
-/F0 10/Times-Bold@0 SF(Nvi/Nex Refer)72 60 Q(ence \(V)-.18 E 2.5(iC)-.37
-G 233.15(ommands\) USD:13-39)-2.5 F/F1 10/Times-Roman@0 SF
-(addition to these tw)97 96 Q 2.5(oc)-.1 G
-(haracters, the current terminal characters for those operations.)-2.5 E
-F0(<nul>)97 120 Q F1(If the \214rst character of the input is a)122 132
-Q/F2 10/Courier@0 SF(<nul>)2.5 E F1 2.5(,t)C(he pre)-2.5 E
-(vious input is replayed, as if just entered.)-.25 E F0(<contr)97 156 Q
-(ol-D>)-.18 E F1 .582(If the pre)122 168 R .582
-(vious character on the line w)-.25 F .582(as an autoindent character)
--.1 F 3.082(,e)-.4 G .582(rase characters to mo)-3.082 F .882 -.15(ve t)
--.15 H(he).15 E .125
-(cursor back to the column immediately after the pre)122 180 R .125
-(vious \(1-based\) column which is a multiple)-.25 F .068(of the)122 192
-R F0(shiftwidth)2.568 E F1 .068(edit option.)2.568 F .068
-(This may result in an)5.068 F 2.568(yn)-.15 G .068(umber of)-2.568 F F2
-(<tab>)2.568 E F1(and)2.568 E F2(<space>)2.568 E F1(charac-)2.568 E
-(ters preceding the cursor being changed.)122 204 Q .201
-(Otherwise, if the)122 228 R F0(autoindent)2.701 E F1 .202(option is set and the user is entering the \214rst character in the line,)
-2.701 F F2(<control-D>)122 240 Q F1(is ignored.)2.5 E
-(Otherwise, a literal)5 E F2(<control-D>)2.5 E F1(character is entered.)
-2.5 E F0(^<contr)97 264 Q(ol-D>)-.18 E F1 1.228(If the pre)122 276 R
-1.228(vious character on the line w)-.25 F 1.227
-(as an autoindent character)-.1 F 3.727(,e)-.4 G 1.227
-(rase all of the autoindent)-3.727 F(characters on the line.)122 288 Q
-(In addition, the autoindent le)5 E -.15(ve)-.25 G 2.5(li).15 G 2.5(sr)
--2.5 G(eset to 0.)-2.5 E F0(0<contr)97 312 Q(ol-D>)-.18 E F1 1.227
-(If the pre)122 324 R 1.227(vious character on the line w)-.25 F 1.227
-(as an autoindent character)-.1 F 3.728(,e)-.4 G 1.228
-(rase all of the autoindent)-3.728 F(characters on the line.)122 336 Q
-(The autoindent le)5 E -.15(ve)-.25 G 2.5(li).15 G 2.5(sn)-2.5 G
-(ot altered.)-2.5 E F0(<contr)97 360 Q(ol-T>)-.18 E F1 1.103(Insert suf)
-122 372 R(\214cient)-.25 E F2(<tab>)3.603 E F1(and)3.603 E F2(<space>)
-3.603 E F1 1.102(characters to mo)3.602 F 1.402 -.15(ve t)-.15 H 1.102
-(he cursor forw).15 F 1.102(ard to the column)-.1 F .413
-(immediately after the ne)122 384 R .414
-(xt \(1-based\) column which is a multiple of the)-.15 F F0(shiftwidth)
-2.914 E F1 .414(edit option.)2.914 F .215(This may result in an)122 396
-R 2.714(yn)-.15 G .214(umber of)-2.714 F F2(<tab>)2.714 E F1(and)2.714 E
-F2(<space>)2.714 E F1 .214(characters preceding the cursor being)2.714 F
-(changed.)122 408 Q(Historically)122 432 Q(,)-.65 E F0(vi)3.043 E F1
-.543(did not permit the)3.043 F F2(<control-T>)3.043 E F1 .544
-(command to be used unless the cursor w)3.044 F(as)-.1 E .257
-(at the \214rst column of a ne)122 444 R 2.757(wl)-.25 G .256
-(ine or it w)-2.757 F .256(as preceded only by autoindent characters.)
--.1 F F0(Nvi)5.256 E F1(permits)2.756 E(it to be used at an)122 456 Q
-2.5(yt)-.15 G(ime during insert mode.)-2.5 E F0(<erase>)97 480 Q(<contr)
-97 492 Q(ol-H>)-.18 E F1(Erase the last character)122 504 Q(.)-.55 E F0
-(<literal-next>)97 528 Q F1 .844(Quote the ne)122 540 R .844
-(xt character)-.15 F 5.844(.T)-.55 G .844(he ne)-5.844 F .845
-(xt character will not be mapped \(see the)-.15 F F0(map)3.345 E F1 .845
-(command for)3.345 F .609(more information\) or interpreted specially)
-122 552 R 5.608(.A)-.65 G .608(carat \(\231)-2.5 F F2(^)A F1 .608
-(\232\) character will be displayed immedi-)B(ately as a placeholder)122
-564 Q 2.5(,b)-.4 G(ut will be replaced by the ne)-2.7 E(xt character)
--.15 E(.)-.55 E F0(<escape>)97 588 Q F1 1.497
-(If on the colon command line, and the)122 600 R F0(\214lec)3.998 E F1
-1.498(edit option is set, beha)3.998 F 1.798 -.15(ve a)-.2 H 3.998(sd)
-.15 G 1.498(escribed for that)-3.998 F 2.926(option. Otherwise,)122 612
-R .426(if on the colon command line, e)2.926 F -.15(xe)-.15 G .426
-(cute the command.).15 F .425(Otherwise, if not on)5.425 F
-(the colon command line, resolv)122 624 Q 2.5(ea)-.15 G(ll te)-2.5 E
-(xt input into the \214le, and return to command mode.)-.15 E F0
-(<line erase>)97 648 Q F1(Erase the current line.)122 660 Q F0(<contr)97
-684 Q(ol-W>)-.18 E(<w)97 696 Q(ord erase>)-.1 E F1 1.75
-(Erase the last w)122 708 R 4.25(ord. The)-.1 F 1.75(de\214nition of w)
-4.25 F 1.75(ord is dependent on the)-.1 F F0(altwerase)4.25 E F1(and)
-4.25 E F0(ttywerase)4.25 E F1(options.)122 720 Q EP
-%%Page: 40 39
-%%BeginPageSetup
-BP
-%%EndPageSetup
-/F0 10/Times-Bold@0 SF 233.15(USD:13-40 Nvi/Nex)72 60 R(Refer)2.5 E
-(ence \(V)-.18 E 2.5(iC)-.37 G(ommands\))-2.5 E(<contr)97 96 Q
-(ol-X>[0-9A-F)-.18 E(a-f]+)-.25 E/F1 10/Times-Roman@0 SF .284
-(Insert a character with the speci\214ed he)122 108 R .284(xadecimal v)
--.15 F .284(alue into the te)-.25 F 2.784(xt. The)-.15 F -.25(va)2.784 G
-.284(lue is delimited by).25 F(an)122 120 Q 3.028(yn)-.15 G(on-he)-3.028
-E .529(xadecimal character or the input of the maximum number of characters that can be)
--.15 F(translated into a single character v)122 132 Q(alue.)-.25 E F0
-(<interrupt>)97 156 Q F1 1.466(Interrupt te)122 168 R 1.466
-(xt input mode, returning to command mode.)-.15 F 1.466(If the)6.466 F
-/F2 10/Courier@0 SF(<interrupt>)3.966 E F1 1.465(character is)3.965 F
-.938(used to interrupt inserting te)122 180 R .938
-(xt into the \214le, it is as if the)-.15 F F2(<escape>)3.438 E F1 .939
-(character w)3.439 F .939(as used; all)-.1 F(te)122 192 Q
-(xt input up to the interruption is resolv)-.15 E(ed into the \214le.)
--.15 E F0 2.5(15. Ex)97 216 R(Addr)2.5 E(essing)-.18 E F1 .393
-(Addressing in)122 232.2 R F0(ex)2.893 E F1 .393(\(and when)2.893 F F0
-(ex)2.893 E F1 .393(commands are e)2.893 F -.15(xe)-.15 G .392
-(cuted from).15 F F0(vi)2.892 E F1 2.892(\)r)C .392
-(elates to the current line.)-2.892 F(In)5.392 E .115
-(general, the current line is the last line af)97 244.2 R .116
-(fected by a command.)-.25 F .116(The e)5.116 F .116(xact ef)-.15 F .116
-(fect on the current line is)-.25 F .147
-(discussed under the description of each command.)97 256.2 R .146
-(When the \214le contains no lines, the current line is)5.146 F(zero.)97
-268.2 Q(Addresses are constructed by one or more of the follo)122 284.4
-Q(wing methods:)-.25 E 12.5(\(1\) The)102 300.6 R(address \231)2.5 E F2
-(.)A F1 5<9a72>C(efers to the current line.)-5 E 12.5(\(2\) The)102
-316.8 R(address \231)2.5 E F2($)A F1 2.5<9a72>C
-(efers to the last line of the \214le.)-2.5 E 12.5(\(3\) The)102 333 R
-(address \231)2.5 E F2(N)A F1(\232, where)A F2(N)2.5 E F1(is a positi)
-2.5 E .3 -.15(ve n)-.25 H(umber).15 E 2.5(,r)-.4 G
-(efers to the N-th line of the \214le.)-2.5 E 12.5(\(4\) The)102 349.2 R
-1.323(address \231)3.823 F F2('<character>)A F1 3.823<9a6f>C 3.823<7299>
--3.823 G F2(`<character>)-3.823 E F1 3.824<9a72>C 1.324
-(efers to the line mark)-3.824 F 1.324(ed with the)-.1 F(name)128.66
-361.2 Q F2(<character>)3.744 E F1 6.244(.\()C 1.244(See the)-6.244 F F0
-(k)3.744 E F1(or)3.744 E F0(m)3.744 E F1 1.243
-(commands for more information on ho)3.744 F 3.743(wt)-.25 G 3.743(om)
--3.743 G(ark)-3.743 E(lines.\))128.66 373.2 Q 12.5(\(5\) A)102 389.4 R
-(re)3.506 E 1.006(gular e)-.15 F 1.007
-(xpression \(RE\) enclosed by slashes \(\231)-.15 F F2(/)A F1 1.007
-(\232\) is an address, and it refers to the \214rst)B .215
-(line found by searching forw)128.66 401.4 R .214(ard from the line)-.1
-F/F3 10/Times-Italic@0 SF(after)2.714 E F1 .214(the current line to)
-2.714 F -.1(wa)-.25 G .214(rd the end of the \214le,).1 F .544
-(and stopping at the \214rst line containing a string matching the RE.)
-128.66 413.4 R .544(\(The trailing slash can be)5.544 F
-(omitted at the end of the command line.\))128.66 425.4 Q .26
-(If no RE is speci\214ed, i.e. the pattern is \231)128.66 449.4 R F2(//)
-A F1 .259(\232, the last RE used in an)B 2.759(yc)-.15 G .259
-(ommand is used in the)-2.759 F(search.)128.66 461.4 Q .948(If the)
-128.66 485.4 R F0(extended)3.449 E F1 .949
-(option is set, the RE is handled as an e)3.449 F .949
-(xtended RE, not a basic RE.)-.15 F .949(If the)5.949 F F0(wrapscan)
-128.66 497.4 Q F1 .19(option is set, the search wraps around to the be)
-2.69 F .189(ginning of the \214le and continues up)-.15 F(to and including the current line, so that the entire \214le is searched.)
-128.66 509.4 Q(The form \231)128.66 533.4 Q F2(\\/)A F1 2.5<9a69>C 2.5
-(sa)-2.5 G(ccepted for historic reasons, and is identical to \231)-2.5 E
-F2(//)A F1<9a2e>A 12.5(\(6\) An)102 549.6 R 1.088
-(RE enclosed in question marks \(\231)3.588 F F2(?)A F1 3.589
-(\232\) addresses)B 1.089(the \214rst line found by searching back-)
-3.589 F -.1(wa)128.66 561.6 S .138(rd from the line).1 F F3(pr)2.638 E
-(eceding)-.37 E F1 .138(the current line, to)2.638 F -.1(wa)-.25 G .137
-(rd the be).1 F .137(ginning of the \214le and stopping at)-.15 F .154
-(the \214rst line containing a string matching the RE.)128.66 573.6 R
-.154(\(The trailing question mark can be omitted)5.154 F
-(at the end of a command line.\))128.66 585.6 Q .26
-(If no RE is speci\214ed, i.e. the pattern is \231)128.66 609.6 R F2(??)
-A F1 .259(\232, the last RE used in an)B 2.759(yc)-.15 G .259
-(ommand is used in the)-2.759 F(search.)128.66 621.6 Q .948(If the)
-128.66 645.6 R F0(extended)3.449 E F1 .949
-(option is set, the RE is handled as an e)3.449 F .949
-(xtended RE, not a basic RE.)-.15 F .949(If the)5.949 F F0(wrapscan)
-128.66 657.6 Q F1 .375(option is set, the search)2.875 F .375
-(wraps around from the be)5.375 F .374
-(ginning of the \214le to the end of)-.15 F(the \214le and continues up to and including the current line, so that the entire \214le is searched.)
-128.66 669.6 Q(The form \231)128.66 693.6 Q F2(\\?)A F1 5<9a69>C 2.5(sa)
--5 G(ccepted for historic reasons, and is identical to \231)-2.5 E F2
-(??)A F1<9a2e>A 12.5(\(7\) An)102 709.8 R .648(address follo)3.148 F
-.649(wed by a plus sign \(\231)-.25 F F2(+)A F1 .649
-(\232\) or a minus sign \(\231)B F2(-)A F1 .649(\232\) follo)B .649
-(wed by a number is an)-.25 F(of)128.66 721.8 Q .563(fset address and refers to the address plus \(or minus\) the indicated number of lines.)
--.25 F .562(If the)5.562 F EP
-%%Page: 41 40
-%%BeginPageSetup
-BP
-%%EndPageSetup
-/F0 10/Times-Bold@0 SF(Nvi/Nex Refer)72 60 Q 303.33(ence USD:13-41)-.18
-F/F1 10/Times-Roman@0 SF(address is omitted, the addition or subtraction is done with respect to the current line.)
-128.66 96 Q 12.5(\(8\) An)102 112.2 R .235(address of \231)2.735 F/F2 10
-/Courier@0 SF(+)A F1 2.735<9a6f>C 2.735<7299>-2.735 G F2<ad>-2.735 E F1
-2.735<9a66>C(ollo)-2.735 E .235(wed by a number is an of)-.25 F .235
-(fset from the current line.)-.25 F -.15(Fo)5.235 G 2.735(re).15 G(xam-)
--2.885 E(ple, \231)128.66 124.2 Q F2<ad35>A F1 2.5<9a69>C 2.5(st)-2.5 G
-(he same as \231)-2.5 E F2(.\2555)A F1<9a2e>A 12.5(\(9\) An)102 140.4 R
-1.1(address ending with \231)3.6 F F2(+)A F1 3.6<9a6f>C 3.6<7299>-3.6 G
-F2(-)-3.6 E F1 3.6<9a68>C 1.1
-(as 1 added to or subtracted from the address, respec-)-3.6 F(ti)128.66
-152.4 Q -.15(ve)-.25 G(ly).15 E 5.827(.A)-.65 G 3.327(sac)-5.827 G .827
-(onsequence of this rule and of the pre)-3.327 F .827
-(vious rule, the address \231)-.25 F F2<ad>A F1 3.327<9a72>C .827
-(efers to the)-3.327 F .463(line preceding the current line.)128.66
-164.4 R(Moreo)5.462 E -.15(ve)-.15 G 1.262 -.4(r, t).15 H .462
-(railing \231).4 F F2(+)A F1 2.962<9a61>C .462(nd \231)-2.962 F F2<ad>A
-F1 2.962<9a63>C .462(haracters ha)-2.962 F .762 -.15(ve a c)-.2 H
-(umulati).15 E -.15(ve)-.25 G(ef)128.66 176.4 Q 2.5(fect. F)-.25 F(or e)
--.15 E(xample, \231)-.15 E F2(++\255++)A F1 2.5<9a72>C
-(efers to the current line plus 3.)-2.5 E 7.5(\(10\) A)102 192.6 R
-(percent sign \(\231)2.5 E F2(%)A F1(\232\) is equi)A -.25(va)-.25 G
-(lent to the address range \231).25 E F2(1,$)A F1<9a2e>A F0(Ex)122 208.8
-Q F1 1.354(commands require zero, one, or tw)3.854 F 3.854(oa)-.1 G
-3.854(ddresses. It)-3.854 F 1.354
-(is an error to specify an address to a)3.854 F
-(command which requires zero addresses.)97 220.8 Q .523(If the user pro)
-122 237 R .523(vides more than the e)-.15 F .522
-(xpected number of addresses to an)-.15 F(y)-.15 E F0(ex)3.022 E F1 .522
-(command, the \214rst)3.022 F .91(addresses speci\214ed are discarded.)
-97 249 R -.15(Fo)5.911 G 3.411(re).15 G .911(xample, \231)-3.561 F F2
-(1,2,3,5)A F1 .911(\232print prints lines 3 through 5, because)B(the)97
-261 Q F0(print)2.5 E F1(command only tak)2.5 E(es tw)-.1 E 2.5(oa)-.1 G
-(ddresses.)-2.5 E 1.633(The addresses in a range are separated from each other by a comma \(\231)
-122 277.2 R F2(,)A F1 1.632(\232\) or a semicolon)B<2899>97 289.2 Q F2
-(;)A F1 2.907(\232\). In)B .407
-(the latter case, the current line \(\231)2.907 F F2(.)A F1 2.907
-(\232\) is)B .407
-(set to the \214rst address, and only then is the second)2.907 F .358
-(address calculated.)97 301.2 R .358
-(This feature can be used to determine the starting line for forw)5.358
-F .358(ard and backw)-.1 F(ard)-.1 E .271
-(searches \(see rules \(5\) and \(6\) abo)97 313.2 R -.15(ve)-.15 G
-2.771(\). The).15 F .272(second address of an)2.771 F 2.772(yt)-.15 G
--.1(wo)-2.772 G .272(-address sequence corresponds).1 F .252
-(to a line that follo)97 325.2 R .252
-(ws, in the \214le, the line corresponding to the \214rst address.)-.25
-F .251(The \214rst address must be)5.251 F .737
-(less than or equal to the second address.)97 337.2 R .738
-(The \214rst address must be greater than or equal to the \214rst)5.737
-F(line of the \214le, and the last address must be less than or equal to the last line of the \214le.)
-97 349.2 Q F0 2.5(16. Ex)97 373.2 R(Description)2.5 E F1(The follo)122
-389.4 Q(wing w)-.25 E(ords ha)-.1 E .3 -.15(ve s)-.2 H
-(pecial meanings for).15 E F0(ex)2.5 E F1(commands.)2.5 E F0
-(<end-of-\214le>)97 413.4 Q F1 .026
-(The end-of-\214le character is used to scroll the screen in the)122
-425.4 R F0(ex)2.526 E F1(editor)2.526 E 5.026(.T)-.55 G .026
-(his character is normally)-5.026 F F2(<control-D>)122 437.4 Q F1 6.021
-(.H)C -.25(ow)-6.021 G -2.15 -.25(ev e).25 H 1.821 -.4(r, w).25 H(hate)
-.4 E -.15(ve)-.25 G 3.521(rc).15 G 1.022
-(haracter is set for the current terminal is supported as)-3.521 F
-(well as)122 449.4 Q F2(<control-D>)2.5 E F1(.)A F0(line)97 473.4 Q F1
-2.76(As)122 485.4 S .26(ingle-line address, gi)-2.76 F -.15(ve)-.25 G
-2.76(ni).15 G 2.76(na)-2.76 G .559 -.15(ny o)-2.76 H 2.759(ft).15 G .259
-(he forms described in the section entitled \231)-2.759 F F0 .259
-(Ex Addr)B(ess-)-.18 E(ing)122 497.4 Q F1 2.5(\232. The)B(def)2.5 E
-(ault for)-.1 E F2(line)2.5 E F1(is the current line.)2.5 E F0(range)97
-521.4 Q F1 3.063(Al)122 533.4 S .563
-(ine, or a pair of line addresses, separated by a comma or semicolon.)
--3.063 F .564(\(See the section enti-)5.564 F .12(tled \231)122 545.4 R
-F0 .12(Ex Addr)B(essing)-.18 E F1 2.62<9a66>C .12
-(or more information.\))-2.62 F .119(The def)5.119 F .119
-(ault for range is the current line)-.1 F/F3 10/Times-Italic@0 SF(only)
-2.619 E F1 2.619(,i)C(.e.)-2.619 E<99>122 557.4 Q F2(.,.)A F1 3.524
-(\232. A)B 1.024(percent sign \(\231)3.524 F F2(%)A F1 1.024
-(\232\) stands for the range \231)B F2(1,$)A F1 3.524(\232. The)B 1.024
-(starting address must be less)3.524 F
-(than, or equal to, the ending address.)122 569.4 Q F0(count)97 593.4 Q
-F1 2.624(Ap)122 605.4 S(ositi)-2.624 E .424 -.15(ve i)-.25 H(nte).15 E
-(ger)-.15 E 2.623(,s)-.4 G .123(pecifying the number of lines to be af)
--2.623 F .123(fected by the command; the def)-.25 F .123(ault is)-.1 F
-3.006(1. Generally)122 617.4 R -5.505 3.006(,a c)-.65 H .507
-(ount past the end-of-\214le may be speci\214ed, e.g. the command \231)
--3.006 F F2 6.507(p3)C(000)-6.507 E F1 3.007<9a69>C 3.007(na)-3.007 G(10 line \214le is acceptable, and will print from the current line through the last line in the \214le.)
-122 629.4 Q F0(\215ags)97 653.4 Q F1 1.243
-(One or more of the characters \231#\232, \231p\232, and \231l\232.)122
-665.4 R 1.243(When a command that accepts these \215ags)6.243 F .285(completes, the addressed line\(s\) are written out as if by the corresponding)
-122 677.4 R F0(#)2.785 E F1(,)A F0(l)2.785 E F1(or)2.785 E F0(p)2.785 E
-F1(commands.)2.785 E .789(In addition, an)122 689.4 R 3.288(yn)-.15 G
-.788(umber of \231)-3.288 F F2(+)A F1 3.288<9a6f>C 3.288<7299>-3.288 G
-F2<ad>-3.288 E F1 3.288<9a63>C .788
-(haracters can be speci\214ed before, after)-3.288 F 3.288(,o)-.4 G
-3.288(rd)-3.288 G .788(uring the)-3.288 F 1.025
-(\215ags, in which case the line written is not necessarily the one af)
-122 701.4 R 1.025(fected by the command, b)-.25 F(ut)-.2 E
-(rather the line addressed by the of)122 713.4 Q
-(fset address speci\214ed.)-.25 E(The def)5 E(ault for)-.1 E F2(flags)
-2.5 E F1(is none.)2.5 E EP
-%%Page: 42 41
-%%BeginPageSetup
-BP
-%%EndPageSetup
-/F0 10/Times-Bold@0 SF 231.11(USD:13-42 Nvi/Nex)72 60 R(Refer)2.5 E
-(ence \(Ex Commands\))-.18 E(\214le)97 96 Q/F1 10/Times-Roman@0 SF 2.733
-(Ap)122 108 S .233(attern used to deri)-2.733 F .533 -.15(ve a p)-.25 H
-.233(athname; the def).15 F .233(ault is the current \214le.)-.1 F .233
-(File names are subjected to)5.233 F(normal)122 120 Q/F2 10
-/Times-Italic@0 SF(sh)2.5 E F1(\(1\) w)A(ord e)-.1 E(xpansions.)-.15 E
-(An)122 136.2 Q 1.015(ywhere a \214le name is speci\214ed, it is also possible to use the special string \231)
--.15 F/F3 10/Courier@0 SF(/tmp)A F1 3.515(\232. This)B .044(will be replaced with a temporary \214le name which can be used for temporary w)
-97 148.2 R .044(ork, e.g.)-.1 F<99>5.044 E F3 .044(:e /tmp)B F1<9a>A
-(creates and edits a ne)97 160.2 Q 2.5<778c>-.25 G(le.)-2.5 E .431(If both a count and a range are speci\214ed for commands that use either)
-122 176.4 R 2.931(,t)-.4 G .431(he starting line for the)-2.931 F .962
-(command is the)97 188.4 R F2(last)3.462 E F1 .961
-(line addressed by the range, and)3.462 F F3(count)3.461 E F1 3.461(-s)C
-.961(ubsequent lines are af)-3.461 F .961(fected by the)-.25 F
-(command, e.g. the command \231)97 200.4 Q F3(2,3p4)A F1 2.5<9a70>C
-(rints out lines 3, 4, 5 and 6.)-2.5 E .12(When only a line or range is speci\214ed, with no command, the implied command is either a)
-122 216.6 R F0(list)2.62 E F1(,)A F0(number)97 228.6 Q F1(or)3.275 E F0
-(print)3.275 E F1 3.275(command. The)3.275 F .775
-(command used is the most recent of the three commands to ha)3.275 F
--.15(ve)-.2 G .221(been used \(including an)97 240.6 R 2.721(yu)-.15 G
-.221(se as a \215ag\).)-2.721 F .221(If none of these commands ha)5.221
-F .521 -.15(ve b)-.2 H .221(een used before, the).15 F F0(print)2.722 E
-F1 .595(command is the implied command.)97 252.6 R .594
-(When no range or count is speci\214ed and the command line is a)5.594 F
-(blank line, the current line is incremented by 1 and then the current line is displayed.)
-97 264.6 Q .268(Zero or more whitespace characters may precede or follo)
-122 280.8 R 2.768(wt)-.25 G .268(he addresses, count, \215ags, or com-)
--2.768 F .807(mand name.)97 292.8 R(An)5.807 E 3.307(yo)-.15 G .807
-(bject follo)-3.307 F .807(wing a command name \(such as b)-.25 F(uf)-.2
-E(fer)-.25 E 3.307<2c8c>-.4 G .807(le, etc.\), that be)-3.307 F .806
-(gins with an)-.15 F .12(alphabetic character)97 304.8 R 2.62(,s)-.4 G
-.121(hould be separated from the command name by at least one whitespace charac-)
--2.62 F(ter)97 316.8 Q(.)-.55 E(An)122 333 Q 2.929(yc)-.15 G(haracter)
--2.929 E 2.929(,i)-.4 G(ncluding)-2.929 E F3(<carriage-return>)2.928 E
-F1 2.928<2c99>C F3(%)-2.928 E F1 2.928<9a61>C .428(nd \231)-2.928 F F3
-(#)A F1 2.928<9a72>C .428(etain their literal v)-2.928 F .428(alue when)
--.25 F(preceded by a backslash.)97 345 Q F0 2.5(17. Ex)97 369 R
-(Commands)2.5 E F1 .4(The follo)122 385.2 R .4
-(wing section describes the commands a)-.25 F -.25(va)-.2 G .401
-(ilable in the).25 F F0(ex)2.901 E F1(editor)2.901 E 5.401(.I)-.55 G
-2.901(ne)-5.401 G .401(ach entry belo)-2.901 F -.65(w,)-.25 G
-(the tag line is a usage synopsis for the command.)97 397.2 Q .629
-(Each command can be entered as the abbre)122 413.4 R .628
-(viation \(those characters in the synopsis command)-.25 F -.1(wo)97
-425.4 S .977(rd preceding the \231[\232 character\), the full command \(all characters sho)
-.1 F .977(wn for the command w)-.25 F(ord,)-.1 E .161
-(omitting the \231[\232 and \231]\232 characters\), or an)97 437.4 R
-2.661(yl)-.15 G .161(eading subset of the full command do)-2.661 F .161
-(wn to the abbre)-.25 F(via-)-.25 E 2.73(tion. F)97 449.4 R .23(or e)
--.15 F .23(xample, the ar)-.15 F .23(gs command \(sho)-.18 F .231
-(wn as \231)-.25 F F3(ar[gs])A F1 2.731<9a69>C 2.731(nt)-2.731 G .231
-(he synopsis\) can be entered as \231)-2.731 F F3(ar)A F1<9a2c>A<99>97
-461.4 Q F3(arg)A F1 2.5<9a6f>C 2.5<7299>-2.5 G F3(args)-2.5 E F1<9a2e>A
-(Each)122 477.6 Q F0(ex)3.462 E F1 .962(command described belo)3.462 F
-3.462(wn)-.25 G .962(otes the ne)-3.462 F 3.462(wc)-.25 G .962
-(urrent line after it is e)-3.462 F -.15(xe)-.15 G .961
-(cuted, as well as).15 F(an)97 489.6 Q 2.5(yo)-.15 G(ptions that af)-2.5
-E(fect the command.)-.25 E F0(")97 513.6 Q F1 4.176(Ac)122 525.6 S 4.176
-(omment. Command)-4.176 F 1.676(lines be)4.176 F 1.676
-(ginning with the double-quote character \(\231)-.15 F F3(")A F1 1.677
-(\232\) are ignored.)B
-(This permits comments in editor scripts and startup \214les.)122 537.6
-Q F0(<contr)97 561.6 Q(ol-D>)-.18 E(<end-of-\214le>)97 585.6 Q F1 .41
-(Scroll the screen.)122 597.6 R .41(Write the ne)5.41 F .409
-(xt N lines, where N is the v)-.15 F .409(alue of the)-.25 F F0(scr)
-2.909 E(oll)-.18 E F1 2.909(option. The)2.909 F(com-)2.909 E .428
-(mand is the end-of-\214le terminal character)122 609.6 R 2.928(,w)-.4 G
-.429(hich may be dif)-2.928 F .429(ferent on dif)-.25 F .429
-(ferent terminals.)-.25 F -.35(Tr)5.429 G(a-).35 E(ditionally)122 621.6
-Q 2.5(,i)-.65 G 2.5(ti)-2.5 G 2.5(st)-2.5 G(he)-2.5 E F3(<control-D>)2.5
-E F1 -.1(ke)2.5 G -.65(y.)-.05 G(Historically)122 645.6 Q 3.138(,t)-.65
-G(he)-3.138 E F0(eof)3.138 E F1 .637(command ignored an)3.138 F 3.137
-(yp)-.15 G .637(receding count, and the)-3.137 F F3(<end-of-file>)3.137
-E F1(char)3.137 E(-)-.2 E .318(acter w)122 657.6 R .318
-(as ignored unless it w)-.1 F .319
-(as entered as the \214rst character of the command.)-.1 F .319
-(This implemen-)5.319 F .069(tation treats it as a command)122 669.6 R
-F2(only)2.569 E F1 .069
-(if entered as the \214rst character of the command line, and oth-)2.569
-F(erwise treats it as an)122 681.6 Q 2.5(yo)-.15 G(ther character)-2.5 E
-(.)-.55 E 21.39(Line: Set)122 705.6 R(to the last line written.)2.5 E EP
-%%Page: 43 42
-%%BeginPageSetup
-BP
-%%EndPageSetup
-/F0 10/Times-Bold@0 SF(Nvi/Nex Refer)72 60 Q(ence \(Ex Commands\))-.18 E
-(USD:13-43)233.61 E/F1 10/Times-Roman@0 SF 8.05(Options: Af)122 96 R
-(fected by the)-.25 E F0(scr)2.5 E(oll)-.18 E F1(option.)2.5 E F0 2.5
-(!a)97 120 S -.1(rg)-2.5 G(ument\(s\)).1 E([range]! ar)97 132 Q
-(gument\(s\))-.1 E F1(Ex)122 144 Q 1.126
-(ecute a shell command, or \214lter lines through a shell command.)-.15
-F 1.127(In the \214rst synopsis, the)6.127 F 1.613
-(remainder of the line after the \231)122 156 R/F2 10/Courier@0 SF(!)A
-F1 6.613<9a63>C 1.613(haracter is passed to the program named by the)
--6.613 F F0(shell)4.113 E F1(option, as a single ar)122 168 Q(gument.)
--.18 E -.4(Wi)122 192 S .318(thin the rest of the line, \231).4 F F2(%)A
-F1 2.818<9a61>C .318(nd \231)-2.818 F F2(#)A F1 2.818<9a61>C .318(re e)
--2.818 F .318(xpanded into the current and alternate pathnames,)-.15 F
-(respecti)122 204 Q -.15(ve)-.25 G(ly).15 E 6.065(.T)-.65 G 1.065
-(he character \231)-6.065 F F2(!)A F1 6.065<9a69>C 3.565(se)-6.065 G
-1.065(xpanded with the command te)-3.715 F 1.065(xt of the pre)-.15 F
-(vious)-.25 E F0(!)3.565 E F1(com-)6.065 E 3.227(mand. \(Therefore,)122
-216 R .727(the command)3.227 F F0(!!)3.227 E F1 .727(repeats the pre)
-5.727 F(vious)-.25 E F0(!)3.228 E F1 3.228(command.\) The)5.728 F .728
-(special meanings)3.228 F .086(of \231)122 228 R F2(%)A F1 .086
-<9a2c2099>B F2(#)A F1 .086(\232, and \231)B F2(!)A F1 5.086<9a63>C .086
-(an be o)-5.086 F -.15(ve)-.15 G .086
-(rridden by escaping them with a backslash.).15 F .086(If no)5.086 F F0
-(!)2.585 E F1(or)5.085 E F0(:!)2.585 E F1(com-)5.085 E .148
-(mand has yet been e)122 240 R -.15(xe)-.15 G .148
-(cuted, it is an error to use an unescaped \231).15 F F2(!)A F1 5.149
-<9a63>C(haracter)-5.149 E 5.149(.T)-.55 G(he)-5.149 E F0(!)2.649 E F1
-(command)5.149 E(does)122 252 Q/F3 10/Times-Italic@0 SF(not)3.148 E F1
-.648(do shell e)3.148 F .648(xpansion on the strings pro)-.15 F .647
-(vided as ar)-.15 F 3.147(guments. If)-.18 F(an)3.147 E 3.147(yo)-.15 G
-3.147(ft)-3.147 G .647(he abo)-3.147 F .947 -.15(ve ex)-.15 H(pan-).15 E
-.693(sions change the command the user entered, the command is redisplayed at the bottom of the)
-122 264 R(screen.)122 276 Q F0(Ex)122 300 Q F1 .482(then e)2.982 F -.15
-(xe)-.15 G .482(cutes the program named by the).15 F F0(shell)2.982 E F1
-.482(option, with a)2.982 F F0<ad63>2.982 E F1 .481(\215ag follo)2.982 F
-.481(wed by the ar)-.25 F(gu-)-.18 E(ments \(which are b)122 312 Q
-(undled into a single ar)-.2 E(gument\).)-.18 E(The)122 336 Q F0(!)2.5 E
-F1(command is permitted in an empty \214le.)5 E
-(If the \214le has been modi\214ed since it w)122 360 Q
-(as last completely written, the command will w)-.1 E(arn you.)-.1 E 2.5
-(As)122 384 S(ingle \231)-2.5 E F2(!)A F1 5<9a63>C
-(haracter is displayed when the command completes.)-5 E .466
-(In the second form of the)122 408 R F0(!)2.966 E F1 .466
-(command, the remainder of the line after the \231)5.466 F F2(!)A F1
-5.467<9a69>C 2.967(sp)-5.467 G .467(assed to the)-2.967 F .676
-(program named by the)122 420 R F0(shell)3.176 E F1 .676
-(option, as described abo)3.176 F -.15(ve)-.15 G 5.676(.T).15 G .676
-(he speci\214ed lines are passed to the)-5.676 F .764(program as standard input, and the standard and standard error output of the program replace)
-122 432 R(the original lines.)122 444 Q 21.39(Line: Unchanged)122 468 R
-(if no range w)2.5 E
-(as speci\214ed, otherwise set to the \214rst line of the range.)-.1 E
-8.05(Options: Af)122 480 R(fected by the)-.25 E F0(shell)2.5 E F1(and)
-2.5 E F0(war)2.5 E(n)-.15 E F1(options.)2.5 E F0
-([range] # [count] [\215ags])97 504 Q
-([range] nu[mber] [count] [\215ags])97 516 Q F1
-(Display the selected lines, each preceded with its line number)122 528
-Q(.)-.55 E(The line number format is \231%6d\232, follo)122 552 Q
-(wed by tw)-.25 E 2.5(os)-.1 G(paces.)-2.5 E 21.39(Line: Set)122 576 R
-(to the last line displayed.)2.5 E 8.05(Options: Af)122 588 R
-(fected by the)-.25 E F0(list)2.5 E F1(option.)2.5 E F0 2.5(@b)97 612 S
-(uffer)-2.7 E 2.5(*b)97 624 S(uffer)-2.7 E F1(Ex)122 636 Q .31
-(ecute a b)-.15 F(uf)-.2 E(fer)-.25 E 5.31(.E)-.55 G .31
-(ach line in the named b)-5.31 F(uf)-.2 E .309(fer is e)-.25 F -.15(xe)
--.15 G .309(cuted as an).15 F F0(ex)2.809 E F1 2.809(command. If)2.809 F
-.309(no b)2.809 F(uf)-.2 E .309(fer is)-.25 F
-(speci\214ed, or if the speci\214ed b)122 648 Q(uf)-.2 E(fer is \231)
--.25 E F2(@)A F1 2.5<9a6f>C 2.5<7299>-2.5 G F2(*)-2.5 E F1
-(\232, the last b)A(uf)-.2 E(fer e)-.25 E -.15(xe)-.15 G(cuted is used.)
-.15 E F0([range] <[< ...] [count] [\215ags])97 672 Q F1 .414
-(Shift lines left or right.)122 684 R .414
-(The speci\214ed lines are shifted to the left \(for the)5.414 F F0(<)
-2.915 E F1 .415(command\) or right)2.915 F 1.583(\(for the)122 696 R F0
-(>)4.083 E F1 1.583
-(command\), by the number of columns speci\214ed by the)4.083 F F0
-(shiftwidth)4.083 E F1 4.082(option. Only)4.082 F .784(leading whitespace characters are deleted when shifting left; once the \214rst column of the line)
-122 708 R 2.531(contains a nonblank character)122 720 R 5.031(,t)-.4 G
-(he)-5.031 E F0(shift)5.031 E F1 2.531(command will succeed, b)5.031 F
-2.53(ut the line will not be)-.2 F EP
-%%Page: 44 43
-%%BeginPageSetup
-BP
-%%EndPageSetup
-/F0 10/Times-Bold@0 SF 231.11(USD:13-44 Nvi/Nex)72 60 R(Refer)2.5 E
-(ence \(Ex Commands\))-.18 E/F1 10/Times-Roman@0 SF(modi\214ed.)122 96 Q
-.14(If the command character)122 120 R F0(<)2.64 E F1(or)2.64 E F0(>)
-2.64 E F1 .14
-(is repeated more than once, the command is repeated once for)2.64 F
-(each additional command character)122 132 Q(.)-.55 E 21.39(Line: If)122
-156 R .823(the current line is set to one of the lines that are af)3.323
-F .822(fected by the command, it is)-.25 F 3.446(unchanged. Otherwise,)
-167 168 R .946(it is set to the \214rst nonblank character of the lo)
-3.446 F .947(west num-)-.25 F(bered line shifted.)167 180 Q 8.05
-(Options: Af)122 192 R(fected by the)-.25 E F0(shiftwidth)2.5 E F1
-(option.)2.5 E F0([line] = [\215ags])97 216 Q F1
-(Display the line number of)122 228 Q/F2 10/Courier@0 SF(line)2.5 E F1
-(\(which def)2.5 E(aults to the last line in the \214le\).)-.1 E 21.39
-(Line: Unchanged.)122 252 R 8.05(Options: None.)122 264 R F0
-([range] >[> ...] [count] [\215ags])97 288 Q F1 .614(Shift right.)122
-300 R .613(The speci\214ed lines are shifted to the right by the number of columns speci\214ed by)
-5.614 F(the)122 312 Q F0(shiftwidth)2.5 E F1
-(option, by inserting tab and space characters.)2.5 E
-(Empty lines are not changed.)5 E .815(If the command character \231)122
-336 R F2(>)A F1 3.315<9a69>C 3.315(sr)-3.315 G .816
-(epeated more than once, the command is repeated once for)-3.315 F
-(each additional command character)122 348 Q(.)-.55 E 21.39(Line: Set)
-122 372 R(to the last line modi\214ed by the command.)2.5 E 8.05
-(Options: Af)122 384 R(fected by the)-.25 E F0(shiftwidth)2.5 E F1
-(option.)2.5 E F0(ab[br)97 408 Q -.15(ev)-.18 G 2.5(]l).15 G(hs rhs)-2.5
-E F1 1.366(Add an abbre)122 420 R 1.366(viation to the current abbre)
--.25 F 1.365(viation list.)-.25 F 1.365(When inserting te)6.365 F 1.365
-(xt in)-.15 F F0(vi)3.865 E F1 3.865(,e)C 1.365(ach time a)-3.865 F
-(non-w)122 432 Q 1.3(ord character is entered after a w)-.1 F 1.301
-(ord character)-.1 F 3.801(,as)-.4 G 1.301
-(et of characters ending at the w)-3.801 F(ord)-.1 E .424
-(character are check)122 444 R .424(ed for a match with)-.1 F F2(lhs)
-2.924 E F1 5.424(.I)C 2.924(fa)-5.424 G .423(match is found, the)-.001 F
-2.923(ya)-.15 G .423(re replaced with)-2.923 F F2(rhs)2.923 E F1(.)A
-.528(The set of characters that are check)122 456 R .528
-(ed for a match are de\214ned as follo)-.1 F .528(ws, for ine)-.25 F
-.529(xplicable his-)-.15 F .485(torical reasons.)122 468 R .485
-(If only one or tw)5.485 F 2.984(oc)-.1 G .484
-(haracters were entered before the non-w)-2.984 F .484
-(ord character that)-.1 F .351(triggered the check, and after the be)122
-480 R .352(ginning of the insertion, or the be)-.15 F .352
-(ginning of the line or the)-.15 F 1.02(\214le, or the last)122 492 R F2
-(<blank>)3.52 E F1 1.02(character that w)3.52 F 1.019
-(as entered, then the one or the both characters are)-.1 F(check)122 504
-Q .24(ed for a match.)-.1 F .24(Otherwise, the set includes both characters, as well as the characters that)
-5.24 F .093(precede them that are the same w)122 516 R .092
-(ord class \(i.e. w)-.1 F .092(ord or non-w)-.1 F .092(ord\) as the)-.1
-F F0(second)2.592 E F1 .092(to last charac-)2.592 F 4.058
-(ter entered before the non-w)122 528 R 4.059
-(ord character that triggered the check, back to the \214rst)-.1 F F2
-(<blank>)122 540 Q F1(character)A 2.5(,t)-.4 G(he be)-2.5 E
-(ginning of the insertion, or the be)-.15 E
-(ginning of the line or the \214le.)-.15 E -.15(Fo)122 564 S 2.5(re).15
-G(xample, the abbre)-2.65 E(viations:)-.25 E F2 9(:abbreviate abc)122
-592.2 R(ABC)21 E 9(:abbreviate #i)122 604.2 R(#include)27 E 9
-(:abbreviate /*#i /*#include)122 616.2 R F1(will all w)122 632.4 Q
-(ork, while the abbre)-.1 E(viations:)-.25 E F2 9
-(:abbreviate a#i A#include)122 660.6 R 9(:abbreviate /*)122 672.6 R
-(/********************)21 E F1(will not w)122 688.8 Q
-(ork, and are not permitted by)-.1 E F0 -.4(nv)2.5 G(i).4 E F1(.)A 2.485
--.8(To k)122 712.8 T .885(eep the abbre).7 F .885(viation e)-.25 F .884
-(xpansion from happening, the character immediately follo)-.15 F .884
-(wing the)-.25 F EP
-%%Page: 45 44
-%%BeginPageSetup
-BP
-%%EndPageSetup
-/F0 10/Times-Bold@0 SF(Nvi/Nex Refer)72 60 Q(ence \(Ex Commands\))-.18 E
-(USD:13-45)233.61 E/F1 10/Courier@0 SF(lhs)122 96 Q/F2 10/Times-Roman@0
-SF(characters should be quoted with a)2.5 E F1(<literal-next>)2.5 E F2
-(character)2.5 E(.)-.55 E .792(The replacement)122 120 R F1(rhs)3.292 E
-F2 .792(is itself subject to both further abbre)3.292 F .793(viation e)
--.25 F .793(xpansion and further map)-.15 F -.15(ex)122 132 S(pansion.)
-.15 E 21.39(Line: Unchanged.)122 156 R 8.05(Options: None.)122 168 R F0
-([line] a[ppend][!])97 192 Q F2 .357(The input te)122 204 R .357
-(xt is appended to the speci\214ed line.)-.15 F .357
-(If line 0 is speci\214ed, the te)5.357 F .356(xt is inserted at the)
--.15 F(be)122 216 Q .111(ginning of the \214le.)-.15 F .111
-(Set to the last line input.)5.111 F .111
-(If no lines are input, then set to)5.111 F F1(line)2.611 E F2 2.611(,o)
-C 2.611(rt)-2.611 G 2.611(ot)-2.611 G(he)-2.611 E 1.005
-(\214rst line of the \214le if a)122 228 R F1(line)3.505 E F2 1.005
-(of 0 w)3.505 F 1.005(as speci\214ed.)-.1 F -.15(Fo)6.005 G(llo).15 E
-1.005(wing the command name with a \231)-.25 F F1(!)A F2<9a>A
-(character causes the)122 240 Q F0(autoindent)2.5 E F2
-(option to be toggled for the duration of the command.)2.5 E 21.39
-(Line: Unchanged.)122 264 R 8.05(Options: Af)122 276 R(fected by the)
--.25 E F0(autoindent)2.5 E F2(and)2.5 E F0(number)2.5 E F2(options.)2.5
-E F0(ar[gs])97 300 Q F2 .21(Display the ar)122 312 R .21(gument list.)
--.18 F .21(The current ar)5.21 F .21(gument is displayed inside of \231)
--.18 F F1([)A F2 2.71<9a61>C .21(nd \231)-2.71 F F1(])A F2 2.71<9a63>C
-(haracters.)-2.71 E .644(The ar)122 324 R .643(gument list is the list of operands speci\214ed on startup, which can be replaced using the)
--.18 F F0(next)122 336 Q F2(command.)2.5 E 21.39(Line: Unchanged.)122
-360 R 8.05(Options: None.)122 372 R F0(bg)97 396 Q -.37(Vi)122 408 S F2
-(mode only)2.87 E 5(.B)-.65 G(ackground the current screen.)-5 E 21.39
-(Line: Set)122 432 R(to the current line when the screen w)2.5 E
-(as last edited.)-.1 E 8.05(Options: None.)122 444 R F0
-([range] c[hange][!] [count])97 468 Q F2 .65
-(Replace the lines with input te)122 480 R 3.151(xt. F)-.15 F(ollo)-.15
-E .651(wing the command name with a \231)-.25 F F1(!)A F2 5.651<9a63>C
-.651(haracter causes)-5.651 F(the)122 492 Q F0(autoindent)2.5 E F2
-(option to be toggled for the duration of the command.)2.5 E 21.39
-(Line: Set)122 516 R .716(to the last line input, or)3.217 F 3.216(,i)
--.4 G 3.216(fn)-3.216 G 3.216(ol)-3.216 G .716
-(ines were input, set to the line before the tar)-3.216 F(get)-.18 E(line, or to the \214rst line of the \214le if there are no lines preceding the tar)
-167 528 Q(get line.)-.18 E 8.05(Options: Af)122 540 R(fected by the)-.25
-E F0(autoindent)2.5 E F2(and)2.5 E F0(number)2.5 E F2(options.)2.5 E F0
-(chd[ir][!] [dir)97 564 Q(ectory])-.18 E(cd[!] [dir)97 576 Q(ectory])
--.18 E F2 .572(Change the current w)122 588 R .572(orking directory)-.1
-F 5.572(.T)-.65 G(he)-5.572 E F1(directory)3.072 E F2(ar)3.073 E .573
-(gument is subjected to)-.18 F/F3 10/Times-Italic@0 SF(sh)3.073 E F2
-.573(\(1\) w)B(ord)-.1 E -.15(ex)122 600 S 3.034(pansions. When).15 F
-(in)3.034 E -.2(vo)-.4 G -.1(ke).2 G 3.034(dw).1 G .533
-(ith no directory ar)-3.034 F .533(gument and the)-.18 F F1(HOME)3.033 E
-F2(en)3.033 E .533(vironment v)-.4 F .533(ariable is)-.25 F .207
-(set, the directory named by the)122 612 R F1(HOME)2.707 E F2(en)2.707 E
-.207(vironment v)-.4 F .207(ariable becomes the ne)-.25 F 2.707(wc)-.25
-G .207(urrent directory)-2.707 F(.)-.65 E 1.015(Otherwise, the ne)122
-624 R 3.514(wc)-.25 G 1.014
-(urrent directory becomes the directory returned by the)-3.514 F F3 -.1
-(ge)3.514 G(tpwent).1 E F2 1.014(\(3\) rou-)B(tine.)122 636 Q(The)122
-660 Q F0(chdir)3.067 E F2 .567(command will f)3.067 F .567(ail if the \214le has been modi\214ed since the last complete write of the)
--.1 F 2.5(\214le. Y)122 672 R(ou can o)-1.1 E -.15(ve)-.15 G
-(rride this check by appending a \231).15 E F1(!)A F2 5<9a63>C
-(haracter to the command.)-5 E 21.39(Line: Unchanged.)122 696 R 8.05
-(Options: Af)122 708 R(fected by the)-.25 E F0(cdpath)2.5 E F2(option.)
-2.5 E EP
-%%Page: 46 45
-%%BeginPageSetup
-BP
-%%EndPageSetup
-/F0 10/Times-Bold@0 SF 231.11(USD:13-46 Nvi/Nex)72 60 R(Refer)2.5 E
-(ence \(Ex Commands\))-.18 E([range] co[py] line [\215ags])97 96 Q
-([range] t line [\215ags])97 108 Q/F1 10/Times-Roman@0 SF(Cop)122 120 Q
-2.67(yt)-.1 G .17
-(he speci\214ed lines \(range\) after the destination line.)-2.67 F .169
-(Line 0 may be speci\214ed to insert the)5.169 F(lines at the be)122 132
-Q(ginning of the \214le.)-.15 E 21.39(Line: Unchanged.)122 156 R 8.05
-(Options: None.)122 168 R F0([range] d[elete] [b)97 192 Q
-(uffer] [count] [\215ags])-.2 E F1 .034
-(Delete the lines from the \214le.)122 204 R .035(The deleted te)5.035 F
-.035(xt is sa)-.15 F -.15(ve)-.2 G 2.535(di).15 G 2.535(nt)-2.535 G .035
-(he speci\214ed b)-2.535 F(uf)-.2 E(fer)-.25 E 2.535(,o)-.4 G .835 -.4
-(r, i)-2.535 H 2.535(fn).4 G 2.535(ob)-2.535 G(uf)-2.735 E .035(fer is)
--.25 F .954(speci\214ed, in the unnamed b)122 216 R(uf)-.2 E(fer)-.25 E
-5.954(.I)-.55 G 3.454(ft)-5.954 G .954(he command name is follo)-3.454 F
-.953(wed by a letter that could be)-.25 F .468
-(interpreted as either a b)122 228 R(uf)-.2 E .469
-(fer name or a \215ag v)-.25 F .469(alue \(because neither a)-.25 F/F2
-10/Courier@0 SF(count)2.969 E F1(or)2.969 E F2(flags)2.969 E F1 -.25(va)
-2.969 G(lues).25 E .967(were gi)122 240 R -.15(ve)-.25 G(n\),).15 E F0
-(ex)3.467 E F1 .967(treats the letter as a)3.467 F F2(flags)3.467 E F1
--.25(va)3.467 G .967(lue if the letter immediately follo).25 F .966
-(ws the com-)-.25 F .13(mand name, without an)122 252 R 2.631(yw)-.15 G
-.131(hitespace separation.)-2.631 F .131
-(If the letter is preceded by whitespace charac-)5.131 F
-(ters, it treats it as a b)122 264 Q(uf)-.2 E(fer name.)-.25 E 21.39
-(Line: Set)122 288 R .167(to the line follo)2.668 F .167
-(wing the deleted lines, or to the last line if the deleted lines were)
--.25 F(at the end.)167 300 Q 8.05(Options: None.)122 312 R F0
-(di[splay] b[uffers] | c[onnections] | s[cr)97 336 Q(eens] | t[ags])-.18
-E F1 .18(Display b)122 348 R(uf)-.2 E(fers,)-.25 E F0(cscope)2.68 E F1
-.18(connections, screens or tags.)2.68 F(The)5.18 E F0(display)2.68 E F1
-.18(command tak)2.68 F .18(es one of three)-.1 F(additional ar)122 360 Q
-(guments, which are as follo)-.18 E(ws:)-.25 E(b[uf)122 384 Q 7.77
-(fers] Display)-.25 F(all b)2.5 E(uf)-.2 E
-(fers \(including named, unnamed, and numeric\) that contain te)-.25 E
-(xt.)-.15 E(c[onnections])122 396 Q
-(Display the source directories for all attached)167 408 Q F0(cscope)2.5
-E F1(databases.)2.5 E 6.41(s[creens] Display)122 420 R
-(the \214le names of all background screens.)2.5 E 19.73(t[ags] Display)
-122 432 R(the tags stack.)2.5 E 21.39(Line: Unchanged.)122 456 R 8.05
-(Options: None.)122 468 R F0(e[dit][!] [+cmd] [\214le])97 492 Q
-(ex[!] [+cmd] [\214le])97 504 Q F1 .712(Edit a dif)122 516 R .712
-(ferent \214le.)-.25 F .712(If the current b)5.712 F(uf)-.2 E .712
-(fer has been modi\214ed since the last complete write, the)-.25 F .005
-(command will f)122 528 R 2.505(ail. Y)-.1 F .005(ou can o)-1.1 F -.15
-(ve)-.15 G .005(rride this by appending a \231).15 F F2(!)A F1 5.006
-<9a63>C .006(haracter to the command name.)-5.006 F .744(If the \231)122
-552 R F2(+cmd)A F1 3.244<9a6f>C .744(ption is speci\214ed, that)-3.244 F
-F0(ex)3.244 E F1 .743(command will be e)3.244 F -.15(xe)-.15 G .743
-(cuted in the ne).15 F 3.243<778c>-.25 G 3.243(le. An)-3.243 F(y)-.15 E
-F0(ex)3.243 E F1 .185(command may be used, although the most common use of this feature is to specify a line num-)
-122 564 R(ber or search pattern to set the initial location in the ne)
-122 576 Q 2.5<778c>-.25 G(le.)-2.5 E .204
-(Capitalizing the \214rst letter of the command, i.e.)122 600 R F0(Edit)
-5.204 E F1(or)2.704 E F0(Ex)2.704 E F1 2.704(,w)C .204(hile in)-2.704 F
-F0(vi)2.704 E F1 .204(mode, will edit the \214le)2.704 F(in a ne)122 612
-Q 2.5(ws)-.25 G 2.5(creen. In)-2.5 F(this case, an)2.5 E 2.5(ym)-.15 G
-(odi\214cations to the current \214le are ignored.)-2.5 E 21.39
-(Line: If)122 636 R .703(you ha)3.203 F 1.003 -.15(ve p)-.2 H(re).15 E
-.703(viously edited the \214le, the current line will be set to your last posi-)
--.25 F .26(tion in the \214le.)167 648 R .259
-(If that position does not e)5.26 F .259(xist, or you ha)-.15 F .559
--.15(ve n)-.2 H .259(ot pre).15 F .259(viously edited the)-.25 F .407(\214le, the current line will be set to the \214rst line of the \214le if you are in)
-167 660 R F0(vi)2.907 E F1 .407(mode, and)2.907 F
-(the last line of the \214le if you are in)167 672 Q F0(ex)2.5 E F1(.)A
-8.05(Options: None.)122 684 R F0(exu[sage] [command])97 708 Q F1 2.326
-(Display usage for an)122 720 R F0(ex)4.826 E F1 4.826(command. If)4.826
-F F2(command)4.826 E F1 2.325
-(is speci\214ed, a usage statement for that)4.826 F EP
-%%Page: 47 46
-%%BeginPageSetup
-BP
-%%EndPageSetup
-/F0 10/Times-Bold@0 SF(Nvi/Nex Refer)72 60 Q(ence \(Ex Commands\))-.18 E
-(USD:13-47)233.61 E/F1 10/Times-Roman@0 SF(command is displayed.)122 96
-Q(Otherwise, usage statements for all)5 E F0(ex)2.5 E F1
-(commands are displayed.)2.5 E 21.39(Line: Unchanged.)122 120 R 8.05
-(Options: None.)122 132 R F0(f[ile] [\214le])97 156 Q F1 .582
-(Display and optionally change the \214le name.)122 168 R .582
-(If a \214le name is speci\214ed, the current pathname)5.582 F .639
-(is changed to the speci\214ed name.)122 180 R .638
-(The current pathname, the number of lines, and the current)5.639 F
-(position in the \214le are displayed.)122 192 Q 21.39(Line: Unchanged.)
-122 216 R 8.05(Options: None.)122 228 R F0(fg [name])97 252 Q -.37(Vi)
-122 264 S F1 1.315(mode only)4.185 F 6.315(.F)-.65 G(ore)-6.465 E 1.315
-(ground the speci\214ed screen.)-.15 F(Sw)6.315 E 1.316
-(ap the current screen with the speci\214ed)-.1 F(backgrounded screen.)
-122 276 Q
-(If no screen is speci\214ed, the \214rst background screen is fore)5 E
-(grounded.)-.15 E 21.39(Line: Set)122 300 R
-(to the current line when the screen w)2.5 E(as last edited.)-.1 E 8.05
-(Options: None.)122 312 R F0([range] g[lobal] /patter)97 336 Q
-(n/ [commands])-.15 E([range] v /patter)97 348 Q(n/ [commands])-.15 E F1
-1.324(Apply commands to lines matching \(or not matching\) a pattern.)
-122 360 R 1.324(The lines within the gi)6.324 F -.15(ve)-.25 G(n).15 E
-.567(range that match \(\231)122 372 R/F2 10/Courier@0 SF(g[lobal])A F1
-.567(\232\), or do not match \(\231)B F2(v)A F1 .567(\232\) the gi)B
--.15(ve)-.25 G 3.067(np).15 G .567(attern are selected.)-3.067 F(Then,)
-5.568 E .372(the speci\214ed)122 384 R F0(ex)2.872 E F1 .372
-(command\(s\) are e)2.872 F -.15(xe)-.15 G .371
-(cuted with the current line \(\231).15 F F2(.)A F1 2.871(\232\) set)B
-.371(to each selected line.)2.871 F(If no range is speci\214ed, the entire \214le is searched for matching, or not matching, lines.)
-122 396 Q 1.182
-(Multiple commands can be speci\214ed, one per line, by escaping each)
-122 420 R F2(<newline>)3.683 E F1(character)3.683 E .258
-(with a backslash, or by separating commands with a \231)122 432 R F2(|)
-A F1 2.758<9a63>C(haracter)-2.758 E 5.258(.I)-.55 G 2.758(fn)-5.258 G
-2.758(oc)-2.758 G .258(ommands are speci-)-2.758 F
-(\214ed, the command def)122 444 Q(aults to the)-.1 E F0(print)2.5 E F1
-(command.)2.5 E -.15(Fo)122 468 S 3.061(rt).15 G(he)-3.061 E F0(append)
-3.061 E F1(,)A F0(change)3.061 E F1(and)3.061 E F0(insert)3.061 E F1
-.561(commands, the input te)3.061 F .562
-(xt must be part of the global com-)-.15 F(mand line.)122 480 Q(In this case, the terminating period can be omitted if it ends the commands.)
-5 E(The)122 504 Q F0(visual)2.816 E F1 .315
-(command may also be speci\214ed as one of the)2.816 F F0(ex)2.815 E F1
-2.815(commands. In)2.815 F .315(this mode, input is)2.815 F(tak)122 516
-Q .421(en from the terminal.)-.1 F .421(Entering a)5.421 F F0(Q)2.921 E
-F1 .421(command in)2.921 F F0(vi)2.921 E F1 .421(mode causes the ne)
-2.921 F .422(xt line matching the)-.15 F(pattern to be selected and)122
-528 Q F0(vi)2.5 E F1(to be reentered, until the list is e)2.5 E
-(xhausted.)-.15 E(The)122 552 Q F0(global)2.5 E F1(,)A F0(v)2.5 E F1
-(and)2.5 E F0(undo)2.5 E F1
-(commands cannot be used as part of these commands.)2.5 E 1.507
-(The editor options)122 576 R F0(autoindent)4.007 E F1(,)A F0(autoprint)
-4.007 E F1(and)4.007 E F0 -.18(re)4.007 G(port).18 E F1 1.506
-(are turned of)4.006 F 4.006(ff)-.25 G 1.506(or the duration of the)
--4.006 F F0(global)122 588 Q F1(and)2.5 E F0(v)2.5 E F1(commands.)2.5 E
-21.39(Line: The)122 612 R(last line modi\214ed.)2.5 E 8.05(Options: Af)
-122 624 R 1.45(fected by the)-.25 F F0(ignor)3.95 E(ecase)-.18 E F1(and)
-3.95 E F0(magic)3.95 E F1 3.95(options. T)3.95 F 1.45(urns of)-.45 F
-3.95(ft)-.25 G(he)-3.95 E F0(autoindent)3.95 E F1(,)A F0(auto-)3.95 E
-(print)167 636 Q F1(and)2.5 E F0 -.18(re)2.5 G(port).18 E F1(options.)
-2.5 E F0(he[lp])97 660 Q F1(Display a help message.)122 672 Q 21.39
-(Line: Unchanged.)122 696 R 8.05(Options: None.)122 708 R EP
-%%Page: 48 47
-%%BeginPageSetup
-BP
-%%EndPageSetup
-/F0 10/Times-Bold@0 SF 231.11(USD:13-48 Nvi/Nex)72 60 R(Refer)2.5 E
-(ence \(Ex Commands\))-.18 E([line] i[nsert][!])97 96 Q/F1 10
-/Times-Roman@0 SF .718(The input te)122 108 R .718
-(xt is inserted before the speci\214ed line.)-.15 F -.15(Fo)5.717 G(llo)
-.15 E .717(wing the command name with a \231)-.25 F/F2 10/Courier@0 SF
-(!)A F1<9a>A .324(character causes the)122 120 R F0(autoindent)2.824 E
-F1 .324(option setting to be toggled for the duration of this command.)
-2.824 F 21.39(Line: Set)122 144 R .308(to the last line input; if no lines were input, set to the line before the tar)
-2.808 F .307(get line,)-.18 F .359(or to the \214rst line of the \214le if there are no lines preceding the tar)
-167 156 R .36(get line.)-.18 F(Af)5.36 E(fected)-.25 E(by the)167 168 Q
-F0(autoindent)2.5 E F1(and)2.5 E F0(number)2.5 E F1(options.)2.5 E F0
-([range] j[oin][!] [count] [\215ags])97 192 Q F1(Join lines of te)122
-204 Q(xt together)-.15 E(.)-.55 E(A)122 228 Q F2(count)2.8 E F1 .3
-(speci\214ed to the command speci\214es that the last line of the)2.8 F
-F2(range)2.8 E F1(plus)2.8 E F2(count)2.8 E F1(sub-)2.8 E 2.08
-(sequent lines will be joined.)122 240 R 2.08(\(Note, this dif)7.08 F
-2.08(fers by one from the general rule where only)-.25 F F2(count)122
-252 Q F1 2.5(-s)C(ubsequent lines are af)-2.5 E(fected.\))-.25 E 1.102
-(If the current line ends with a whitespace character)122 276 R 3.602
-(,a)-.4 G 1.102(ll whitespace is stripped from the ne)-3.602 F(xt)-.15 E
-2.728(line. Otherwise,)122 288 R .228(if the ne)2.728 F .229
-(xt line starts with a open parenthesis \(\231)-.15 F F2(\()A F1 .229
-(\232\), do nothing.)B .229(Otherwise, if)5.229 F 1.513
-(the current line ends with a question mark \(\231)122 300 R F2(?)A F1
-1.513(\232\), period \(\231)B F2(.)A F1 4.013(\232\) or)B -.15(ex)4.013
-G 1.512(clamation point \(\231).15 F F2(!)A F1<9a292c>A(insert tw)122
-312 Q 2.5(os)-.1 G 2.5(paces. Otherwise,)-2.5 F(insert a single space.)
-2.5 E .811(Appending a \231)122 336 R F2(!)A F1 5.811<9a63>C .812
-(haracter to the command name causes a simpler join with no white-space)
--5.811 F(processing.)122 348 Q 21.39(Line: Unchanged.)122 372 R 8.05
-(Options: None.)122 384 R F0([range] l[ist] [count] [\215ags])97 408 Q
-F1 2.137(Display the lines unambiguously)122 420 R 7.137(.T)-.65 G 2.137
-(abs are displayed as \231)-7.937 F F2(^I)A F1 2.136
-(\232, and the end of the line is)B(mark)122 432 Q(ed with a \231)-.1 E
-F2($)A F1 2.5<9a63>C(haracter)-2.5 E(.)-.55 E 21.39(Line: Set)122 456 R
-(to the last line displayed.)2.5 E 8.05(Options: Af)122 468 R
-(fected by the)-.25 E F0(number)2.5 E F1(option.)2.5 E F0
-(map[!] [lhs rhs])97 492 Q F1(De\214ne or display maps \(for)122 504 Q
-F0(vi)2.5 E F1(only\).)2.5 E .72(If \231)122 528 R F2(lhs)A F1 3.22
-<9a61>C .72(nd \231)-3.22 F F2(rhs)A F1 3.22<9a61>C .721(re not speci\214ed, the current set of command mode maps are displayed.)
--3.22 F(If a \231)122 540 Q F2(!)A F1 5<9a63>C
-(haracter is appended to to the command, the te)-5 E
-(xt input mode maps are displayed.)-.15 E 1.021
-(Otherwise, when the \231)122 564 R F2(lhs)A F1 3.521<9a63>C 1.021
-(haracter sequence is entered in)-3.521 F F0(vi)3.521 E F1 3.521(,t)C
-1.02(he action is as if the corre-)-3.521 F .484(sponding \231)122 576 R
-F2(rhs)A F1 2.984<9a68>C .484(ad been entered.)-2.984 F .485(If a \231)
-5.484 F F2(!)A F1 5.485<9a63>C .485
-(haracter is appended to the command name, the)-5.485 F .697
-(mapping is ef)122 588 R(fecti)-.25 E .996 -.15(ve d)-.25 H .696
-(uring te).15 F .696(xt input mode, otherwise, it is ef)-.15 F(fecti)
--.25 E .996 -.15(ve d)-.25 H .696(uring command mode.).15 F .352
-(This allo)122 600 R .352(ws \231)-.25 F F2(lhs)A F1 2.852<9a74>C 2.852
-(oh)-2.852 G -2.25 -.2(av e)-2.852 H(tw)3.052 E 2.852(od)-.1 G(if)-2.852
-E .352(ferent macro de\214nitions at the same time: one for command)-.25
-F(mode and one for input mode.)122 612 Q .611
-(Whitespace characters require escaping with a)122 636 R F2
-(<literal-next>)3.111 E F1 .611(character to be entered in)3.111 F(the)
-122 648 Q F2(lhs)2.5 E F1(string in visual mode.)2.5 E(Normally)122 672
-Q 3.549(,k)-.65 G -.15(ey)-3.649 G 3.549(si).15 G 3.549(nt)-3.549 G(he)
--3.549 E F2(rhs)3.549 E F1 1.049(string are remapped \(see the)3.549 F
-F0 -.18(re)3.549 G(map).18 E F1 1.05(option\), and it is possible to)
-3.55 F 2.424(create in\214nite loops.)122 684 R(Ho)7.424 E(we)-.25 E
--.15(ve)-.25 G 3.224 -.4(r, k).15 H -.15(ey).3 G 4.923(sw).15 G 2.423
-(hich map to themselv)-4.923 F 2.423(es are not further remapped,)-.15 F
-(re)122 696 Q -.05(ga)-.15 G 1.088(rdless of the setting of the).05 F F0
--.18(re)3.588 G(map).18 E F1 3.588(option. F)3.588 F 1.088(or e)-.15 F
-1.088(xample, the command \231)-.15 F F2 1.088(:map n nz.)B F1<9a>A
-(maps the \231)122 708 Q F2(n)A F1 2.5<9a6b>C .3 -.15(ey t)-2.6 H 2.5
-(ot).15 G(he)-2.5 E F0(n)2.5 E F1(and)2.5 E F0(z)2.5 E F1(commands.)2.5
-E EP
-%%Page: 49 48
-%%BeginPageSetup
-BP
-%%EndPageSetup
-/F0 10/Times-Bold@0 SF(Nvi/Nex Refer)72 60 Q(ence \(Ex Commands\))-.18 E
-(USD:13-49)233.61 E/F1 10/Times-Roman@0 SF 1.6 -.8(To e)122 96 T
-(xit an in\214nitely looping map, use the terminal).65 E/F2 10/Courier@0
-SF(<interrupt>)2.5 E F1(character)2.5 E(.)-.55 E 21.39(Line: Unchanged.)
-122 120 R 8.05(Options: Af)122 132 R(fected by the)-.25 E F0 -.18(re)2.5
-G(map).18 E F1(option.)2.5 E F0([line] ma[rk] <character>)97 156 Q
-([line] k <character>)97 168 Q F1 2.919(Mark the line with the mark)122
-180 R F2(<character>)5.419 E F1 7.919(.T)C 2.919(he e)-7.919 F 2.919
-(xpressions \231)-.15 F F2('<character>)A F1 5.419<9a61>C(nd)-5.419 E
-<99>122 192 Q F2(`<character>)A F1 2.5<9a63>C
-(an then be used as an address in an)-2.5 E 2.5(yc)-.15 G
-(ommand that uses one.)-2.5 E 21.39(Line: Unchanged.)122 216 R 8.05
-(Options: None.)122 228 R F0([range] m[o)97 252 Q -.1(ve)-.1 G 2.5(]l).1
-G(ine)-2.5 E F1(Mo)122 264 Q .336 -.15(ve t)-.15 H .036
-(he speci\214ed lines after the tar).15 F .036(get line.)-.18 F 2.536
-(At)5.036 G(ar)-2.536 E .036(get line of 0 places the lines at the be)
--.18 F(ginning)-.15 E(of the \214le.)122 276 Q 21.39(Line: Set)122 300 R
-(to the \214rst of the mo)2.5 E -.15(ve)-.15 G 2.5(dl).15 G(ines.)-2.5 E
-8.05(Options: None.)122 312 R F0(mk[exr)97 336 Q(c][!] \214le)-.18 E F1
-.263(Write the abbre)122 348 R .262
-(viations, editor options and maps to the speci\214ed \214le.)-.25 F
-.262(Information is written in)5.262 F 2.831(af)122 360 S .332
-(orm which can later be read back in using the)-2.831 F F0 .332(ex sour)
-2.832 F(ce)-.18 E F1 2.832(command. If)2.832 F F2(file)2.832 E F1 .332
-(already e)2.832 F(xists,)-.15 E(the)122 372 Q F0(mk)2.619 E(exr)-.1 E
-(c)-.18 E F1 .119(command will f)2.619 F 2.619(ail. This)-.1 F .119
-(check can be o)2.619 F -.15(ve)-.15 G .118(rridden by appending a \231)
-.15 F F2(!)A F1 5.118<9a63>C .118(haracter to)-5.118 F(the command.)122
-384 Q 21.39(Line: Unchanged.)122 408 R 8.05(Options: None.)122 420 R F0
-(n[ext][!] [\214le ...])97 444 Q F1 .136(Edit the ne)122 456 R .136
-(xt \214le from the ar)-.15 F .137(gument list.)-.18 F(The)5.137 E F0
-(next)2.637 E F1 .137(command will f)2.637 F .137
-(ail if the \214le has been modi-)-.1 F .168
-(\214ed since the last complete write.)122 468 R .167
-(This check can be o)5.167 F -.15(ve)-.15 G .167
-(rridden by appending the \231).15 F F2(!)A F1 5.167<9a63>C(harac-)
--5.167 E .814(ter to the command name.)122 480 R .815(The ar)5.814 F
-.815(gument list can optionally be replaced by specifying a ne)-.18 F(w)
--.25 E .167(one as ar)122 492 R .167(guments to this command.)-.18 F
-.167(In this case, editing starts with the \214rst \214le on the ne)
-5.167 F 2.666(wl)-.25 G(ist.)-2.666 E .381
-(Capitalizing the \214rst letter of the command, i.e.)122 516 R F0(Next)
-5.381 E F1 2.881(,w)C .381(hile in)-2.881 F F0(vi)2.881 E F1 .382
-(mode, will set the ar)2.881 F(gument)-.18 E 1.479
-(list and edit the \214le in a ne)122 528 R 3.979(ws)-.25 G 3.979
-(creen. In)-3.979 F 1.479(this case, an)3.979 F 3.979(ym)-.15 G 1.479
-(odi\214cations to the current \214le are)-3.979 F(ignored.)122 540 Q
-21.39(Line: Set)122 564 R(as described for the)2.5 E F0(edit)2.5 E F1
-(command.)2.5 E 8.05(Options: Af)122 576 R(fected by the options)-.25 E
-F0(auto)2.5 E(write)-.1 E F1(and)2.5 E F0(writeany)2.5 E F1(.)A F0
-([line] o[pen] /patter)97 600 Q(n/ [\215ags])-.15 E F1 .436
-(Enter open mode.)122 612 R .437(Open mode is the same as being in)5.436
-F F0(vi)2.937 E F1 2.937(,b)C .437(ut with a one-line windo)-3.137 F
-4.237 -.65(w. A)-.25 H .437(ll the).65 F(standard)122 624 Q F0(vi)2.56 E
-F1 .06(commands are a)2.56 F -.25(va)-.2 G 2.56(ilable. If).25 F 2.56
-(am)2.56 G .06(atch is found for the optional RE ar)-2.56 F .06
-(gument, the cur)-.18 F(-)-.2 E
-(sor is set to the start of the matching pattern.)122 636 Q/F3 10
-/Times-Italic@0 SF(This command is not yet implemented.)122 660 Q F1
-21.39(Line: Unchanged,)122 684 R 1.079(unless the optional RE is speci\214ed, in which case it is set to the line)
-3.579 F(where the matching pattern is found.)167 696 Q 8.05(Options: Af)
-122 708 R(fected by the)-.25 E F0(open)2.5 E F1(option.)2.5 E EP
-%%Page: 50 49
-%%BeginPageSetup
-BP
-%%EndPageSetup
-/F0 10/Times-Bold@0 SF 231.11(USD:13-50 Nvi/Nex)72 60 R(Refer)2.5 E
-(ence \(Ex Commands\))-.18 E(pr)97 96 Q(e[ser)-.18 E -.1(ve)-.1 G(]).1 E
-/F1 10/Times-Roman@0 SF(Sa)122 108 Q .568 -.15(ve t)-.2 H .268
-(he \214le in a form that can later be reco).15 F -.15(ve)-.15 G .268
-(red using the).15 F F0 .268(ex \255r)2.768 F F1 2.768(option. When)
-2.768 F .268(the \214le is pre-)2.768 F(serv)122 120 Q
-(ed, an email message is sent to the user)-.15 E(.)-.55 E 21.39
-(Line: Unchanged.)122 144 R 8.05(Options: None.)122 156 R F0(pr)97 180 Q
--.15(ev)-.18 G([ious][!]).15 E F1 .943(Edit the pre)122 192 R .943
-(vious \214le from the ar)-.25 F .944(gument list.)-.18 F(The)5.944 E F0
-(pr)3.444 E -.15(ev)-.18 G(ious).15 E F1 .944(command will f)3.444 F
-.944(ail if the \214le has)-.1 F .884
-(been modi\214ed since the last complete write.)122 204 R .883
-(This check can be o)5.884 F -.15(ve)-.15 G .883
-(rridden by appending the).15 F<99>122 216 Q/F2 10/Courier@0 SF(!)A F1 5
-<9a63>C(haracter to the command name.)-5 E .632
-(Capitalizing the \214rst letter of the command, i.e.)122 240 R F0(Pr)
-5.632 E -.15(ev)-.18 G(ious).15 E F1 3.133(,w)C .633(hile in)-3.133 F F0
-(vi)3.133 E F1 .633(mode, will edit the \214le)3.133 F(in a ne)122 252 Q
-2.5(ws)-.25 G 2.5(creen. In)-2.5 F(this case, an)2.5 E 2.5(ym)-.15 G
-(odi\214cations to the current \214le are ignored.)-2.5 E 21.39
-(Line: Set)122 276 R(as described for the)2.5 E F0(edit)2.5 E F1
-(command.)2.5 E 8.05(Options: Af)122 288 R(fected by the options)-.25 E
-F0(auto)2.5 E(write)-.1 E F1(and)2.5 E F0(writeany)2.5 E F1 5(.N)C(one.)
--5 E F0([range] p[rint] [count] [\215ags])97 312 Q F1
-(Display the speci\214ed lines.)122 324 Q 21.39(Line: Set)122 348 R
-(to the last line displayed.)2.5 E 8.05(Options: Af)122 360 R
-(fected by the)-.25 E F0(list)2.5 E F1(and)2.5 E F0(number)2.5 E F1
-(option.)2.5 E F0([line] pu[t] [b)97 384 Q(uffer])-.2 E F1 .239
-(Append b)122 396 R(uf)-.2 E .239(fer contents to the current line.)-.25
-F .239(If a b)5.239 F(uf)-.2 E .238
-(fer is speci\214ed, its contents are appended to)-.25 F
-(the line, otherwise, the contents of the unnamed b)122 408 Q(uf)-.2 E
-(fer are used.)-.25 E 21.39(Line: Set)122 432 R
-(to the line after the current line.)2.5 E 8.05(Options: None.)122 444 R
-F0(q[uit][!])97 468 Q F1 1.046(End the editing session.)122 480 R 1.047
-(If the \214le has been modi\214ed since the last complete write, the)
-6.047 F F0(quit)3.547 E F1 .655(command will f)122 492 R 3.155
-(ail. This)-.1 F .655(check may be o)3.155 F -.15(ve)-.15 G .655
-(rridden by appending a \231).15 F F2(!)A F1 5.654<9a63>C .654
-(haracter to the com-)-5.654 F(mand.)122 504 Q .739
-(If there are more \214les to edit, the)122 528 R F0(quit)3.239 E F1
-.739(command will f)3.239 F 3.239(ail. Appending)-.1 F 3.239<6199>3.239
-G F2(!)-3.239 E F1 5.739<9a63>C .739(haracter to the)-5.739 F .333
-(command name or entering tw)122 540 R(o)-.1 E F0(quit)2.833 E F1 .333
-(commands \(i.e.)2.833 F F0(wq)5.333 E F1(,)A F0(quit)2.833 E F1(,)A F0
-(xit)2.833 E F1(or)2.833 E F0(ZZ)2.833 E F1 2.833(\)i)C 2.833(nar)-2.833
-G -.25(ow)-2.833 G 2.833(\)w).25 G .332(ill o)-2.833 F -.15(ve)-.15 G
--.2(r-).15 G(ride this check and the editor will e)122 552 Q(xit.)-.15 E
-21.39(Line: Unchanged.)122 576 R 8.05(Options: None.)122 588 R F0
-([line] r[ead][!] [\214le])97 612 Q F1 1.287(Read a \214le.)122 624 R
-3.787(Ac)6.287 G(op)-3.787 E 3.787(yo)-.1 G 3.787(ft)-3.787 G 1.287
-(he speci\214ed \214le is appended to the line.)-3.787 F(If)6.287 E F2
-(line)3.787 E F1 1.287(is 0, the cop)3.787 F 3.787(yi)-.1 G(s)-3.787 E
-.291(inserted at the be)122 636 R .291(ginning of the \214le.)-.15 F .29
-(If no \214le is speci\214ed, the current \214le is read; if there is no)
-5.291 F 1.284(current \214le, then)122 648 R F2(file)3.784 E F1 1.285
-(becomes the current \214le.)3.784 F 1.285
-(If there is no current \214le and no)6.285 F F2(file)3.785 E F1(is)
-3.785 E(speci\214ed, then the)122 660 Q F0 -.18(re)2.5 G(ad).18 E F1
-(command will f)2.5 E(ail.)-.1 E(If)122 684 Q F2(file)3.389 E F1 .889
-(is preceded by a \231)3.389 F F2(!)A F1 5.889<9a63>C(haracter)-5.889 E
-(,)-.4 E F2(file)3.389 E F1 .889
-(is treated as if it were a shell command, and)3.389 F .229
-(passed to the program named by the)122 696 R F0(shell)2.729 E F1 .229
-(edit option.)2.729 F .23(The standard and standard error outputs)5.229
-F .44
-(of that command are read into the \214le after the speci\214ed line.)
-122 708 R .439(The special meaning of the \231)5.439 F F2(!)A F1<9a>A
-(character can be o)122 720 Q -.15(ve)-.15 G
-(rridden by escaping it with a backslash \(\231).15 E F2(\\)A F1
-(\232\) character)A(.)-.55 E EP
-%%Page: 51 50
-%%BeginPageSetup
-BP
-%%EndPageSetup
-/F0 10/Times-Bold@0 SF(Nvi/Nex Refer)72 60 Q(ence \(Ex Commands\))-.18 E
-(USD:13-51)233.61 E/F1 10/Times-Roman@0 SF 21.39(Line: When)122 96 R
--.15(exe)2.864 G .364(cuted from).15 F F0(ex)2.864 E F1 2.864(,t)C .364
-(he current line is set to the last line read.)-2.864 F .364(When e)
-5.364 F -.15(xe)-.15 G(cuted).15 E(from)167 108 Q F0(vi)2.5 E F1 2.5(,t)
-C(he current line is set to the \214rst line read.)-2.5 E 8.05
-(Options: None.)122 120 R F0 -.18(re)97 144 S(c[o).18 E -.1(ve)-.1 G
-(r] \214le).1 E F1(Reco)122 156 Q -.15(ve)-.15 G(r).15 E/F2 10/Courier@0
-SF(file)3.799 E F1 1.299(if it w)3.799 F 1.299(as pre)-.1 F 1.299
-(viously sa)-.25 F -.15(ve)-.2 G 3.799(d. If).15 F 1.299(no sa)3.799 F
--.15(ve)-.2 G 3.799<648c>.15 G 1.299(le by that name e)-3.799 F 1.298
-(xists, the)-.15 F F0 -.18(re)3.798 G(co).18 E -.1(ve)-.1 G(r).1 E F1
-(command beha)122 168 Q -.15(ve)-.2 G 2.5(se).15 G(qui)-2.5 E -.25(va)
--.25 G(lently to the).25 E F0(edit)2.5 E F1(command.)2.5 E 21.39
-(Line: Set)122 192 R(as described for the)2.5 E F0(edit)2.5 E F1
-(command.)2.5 E 8.05(Options: None.)122 204 R F0 -.18(re)97 228 S
-(s[ize] [+|-]size).18 E -.37(Vi)122 240 S F1 .91(mode only)3.78 F 5.91
-(.G)-.65 G(ro)-5.91 E 3.41(wo)-.25 G 3.41(rs)-3.41 G .911
-(hrink the current screen.)-3.41 F(If)5.911 E F2(size)3.411 E F1 .911
-(is a positi)3.411 F -.15(ve)-.25 G 3.411(,s).15 G .911(igned number)
--3.411 F 3.411(,t)-.4 G(he)-3.411 E .523(current screen is gro)122 252 R
-.523(wn by that man)-.25 F 3.023(yl)-.15 G 3.023(ines. If)-3.023 F F2
-(size)3.022 E F1 .522(is a ne)3.022 F -.05(ga)-.15 G(ti).05 E -.15(ve)
--.25 G 3.022(,s).15 G .522(igned number)-3.022 F 3.022(,t)-.4 G .522
-(he current)-3.022 F .022(screen is shrunk by that man)122 264 R 2.522
-(yl)-.15 G 2.522(ines. If)-2.522 F F2(size)2.523 E F1 .023
-(is not signed, the current screen is set to the spec-)2.523 F(i\214ed)
-122 276 Q F2(size)2.5 E F1 5(.A)C(pplicable only to split screens.)-5 E
-21.39(Line: Unchanged.)122 300 R 8.05(Options: None.)122 312 R F0 -.18
-(re)97 336 S(w[ind][!]).18 E F1(Re)122 348 Q .832(wind the ar)-.25 F
-.832(gument list.)-.18 F .832(If the current \214le has been modi\214ed since the last complete write,)
-5.832 F(the)122 360 Q F0 -.18(re)2.717 G(wind).18 E F1 .218
-(command will f)2.717 F 2.718(ail. This)-.1 F .218(check may be o)2.718
-F -.15(ve)-.15 G .218(rridden by appending the \231).15 F F2(!)A F1
-5.218<9a63>C(haracter)-5.218 E(to the command.)122 372 Q
-(Otherwise, the current \214le is set to the \214rst \214le in the ar)
-122 396 Q(gument list.)-.18 E 21.39(Line: Set)122 420 R
-(as described for the)2.5 E F0(edit)2.5 E F1(command.)2.5 E 8.05
-(Options: Af)122 432 R(fected by the)-.25 E F0(auto)2.5 E(write)-.1 E F1
-(and)2.5 E F0(writeany)2.5 E F1(options.)2.5 E F0(se[t] [option[=[v)97
-456 Q(alue]] ...] [nooption ...] [option? ...] [all])-.1 E F1 1.033
-(Display or set editor options.)122 468 R 1.033(When no ar)6.033 F 1.033
-(guments are speci\214ed, the editor option)-.18 F F0(term)3.532 E F1
-3.532(,a)C(nd)-3.532 E(an)122 480 Q 2.947(ye)-.15 G .447
-(ditor options whose v)-2.947 F .447(alues ha)-.25 F .747 -.15(ve b)-.2
-H .447(een changed from the def).15 F .447(ault settings are displayed.)
--.1 F(If)5.448 E(the ar)122 492 Q(gument)-.18 E F2(all)2.5 E F1
-(is speci\214ed, the v)2.5 E
-(alues of all of editor options are displayed.)-.25 E 1.721
-(Specifying an option name follo)122 516 R 1.721
-(wed by the character \231)-.25 F F2(?)A F1 6.721<9a63>C 1.72
-(auses the current v)-6.721 F 1.72(alue of that)-.25 F .11
-(option to be displayed.)122 528 R .11(The \231)5.11 F F2(?)A F1 5.11
-<9a63>C .11(an be separated from the option name by whitespace charac-)
--5.11 F 3.753(ters. The)122 540 R<99>3.753 E F2(?)A F1 6.253<9a69>C
-3.753(sn)-6.253 G 1.253(ecessary only for Boolean v)-3.753 F 1.253
-(alued options.)-.25 F 1.253(Boolean options can be gi)6.253 F -.15(ve)
--.25 G(n).15 E -.25(va)122 552 S .485(lues by the form \231).25 F F2
-.485(set option)B F1 2.985<9a74>C 2.985(ot)-2.985 G .485
-(urn them on, or \231)-2.985 F F2 .485(set nooption)B F1 2.985<9a74>C
-2.985(ot)-2.985 G .485(urn them of)-2.985 F(f.)-.25 E 2.252
-(String and numeric options can be assigned by the form \231)122 564 R
-F2 2.251(set option=value)B F1 4.751(\232. An)B(y)-.15 E .759(whitespace characters in strings can be included literally by preceding each with a backslash.)
-122 576 R 1.394(More than one option can be set or listed by a single set command, by specifying multiple)
-122 588 R(ar)122 600 Q(guments, each separated from the ne)-.18 E
-(xt by whitespace characters.)-.15 E 21.39(Line: Unchanged.)122 624 R
-8.05(Options: None.)122 636 R F0(sh[ell])97 660 Q F1 .781
-(Run the shell program.)122 672 R .782(The program named by the)5.781 F
-F0(shell)3.282 E F1 .782(option is run with a)3.282 F F0<ad69>3.282 E F1
-.782(\(for interac-)3.282 F(ti)122 684 Q -.15(ve)-.25 G 2.5<298d>.15 G
-2.5(ag. Editing)-2.5 F(is resumed when that program e)2.5 E(xits.)-.15 E
-21.39(Line: Unchanged.)122 708 R EP
-%%Page: 52 51
-%%BeginPageSetup
-BP
-%%EndPageSetup
-/F0 10/Times-Bold@0 SF 231.11(USD:13-52 Nvi/Nex)72 60 R(Refer)2.5 E
-(ence \(Ex Commands\))-.18 E/F1 10/Times-Roman@0 SF 8.05(Options: Af)122
-96 R(fected by the)-.25 E F0(shell)2.5 E F1(option.)2.5 E F0(so[ur)97
-120 Q(ce] \214le)-.18 E F1(Read and e)122 132 Q -.15(xe)-.15 G(cute).15
-E F0(ex)2.5 E F1(commands from a \214le.)2.5 E F0(Sour)5 E(ce)-.18 E F1
-(commands may be nested.)2.5 E 21.39(Line: Unchanged.)122 156 R 8.05
-(Options: None.)122 168 R F0([range] s[ubstitute] [/patter)97 192 Q(n/r)
--.15 E(eplace/] [options] [count] [\215ags])-.18 E
-([range] & [options] [count] [\215ags])97 204 Q
-([range] ~ [options] [count] [\215ags])97 216 Q F1(Mak)122 228 Q 3.36
-(es)-.1 G 3.36(ubstitutions. Replace)-3.36 F .859
-(the \214rst instance of)3.36 F/F2 10/Courier@0 SF(pattern)3.359 E F1
-.859(with the string)3.359 F F2(replace)3.359 E F1 .859(on the)3.359 F
-3.739(speci\214ed line\(s\).)122 240 R 3.739(If the \231)8.739 F F2
-(/pattern/repl/)A F1 6.239<9a61>C -.18(rg)-6.239 G 3.739
-(ument is not speci\214ed, the \231).18 F F2(/pat-)A(tern/repl/)122 252
-Q F1 3.307<9a66>C .807(rom the pre)-3.307 F(vious)-.25 E F0(substitute)
-3.307 E F1 .807(command is used.)3.307 F(An)5.807 E 3.306(yc)-.15 G .806
-(haracter other than an)-3.306 F(alphabetic, numeric, <blank> or backslash character may be used as the delimiter)
-122 264 Q(.)-.55 E(If)122 288 Q F2(options)3.496 E F1 .996
-(includes the letter \231)3.496 F F2(c)A F1 3.496<9a28>C .996
-(con\214rm\), you will be prompted for con\214rmation before)-3.496 F
-1.46(each replacement is done.)122 300 R 1.46(An af)6.46 F(\214rmati)
--.25 E 1.76 -.15(ve r)-.25 H 1.46(esponse \(in English, a \231).15 F F2
-(y)A F1 3.96<9a63>C 1.46(haracter\) causes the)-3.96 F .93
-(replacement to be made.)122 312 R 3.431(Aq)5.93 G .931
-(uit response \(in English, a \231)-3.431 F F2(q)A F1 3.431<9a63>C .931
-(haracter\) causes the)-3.431 F F0(substitute)3.431 E F1 1.013
-(command to be terminated.)122 324 R(An)6.012 E 3.512(yo)-.15 G 1.012
-(ther response causes the replacement not to be made, and)-3.512 F(the)
-122 336 Q F0(substitute)2.995 E F1 .495(command continues.)2.995 F(If)
-5.495 E F2(options)2.995 E F1 .495(includes the letter \231)2.995 F F2
-(g)A F1 2.995<9a28>C .495(global\), all nono)-2.995 F -.15(ve)-.15 G -.2
-(r-).15 G(lapping instances of)122 348 Q F2(pattern)2.5 E F1
-(in the line are replaced.)2.5 E(The)122 372 Q F0(&)2.745 E F1 -.15(ve)
-2.745 G .245(rsion of the command is the same as not specifying a pattern or replacement string to)
-.15 F(the)122 384 Q F0(substitute)3.351 E F1 .851(command, and the \231)
-3.351 F F2(&)A F1 3.351<9a69>C 3.352(sr)-3.351 G .852
-(eplaced by the pattern and replacement information)-3.352 F
-(from the pre)122 396 Q(vious substitute command.)-.25 E(The)122 420 Q
-F0(~)2.661 E F1 -.15(ve)2.661 G .161
-(rsion of the command is the same as).15 F F0(&)2.661 E F1(and)2.66 E F0
-(s)2.66 E F1 2.66(,e)C .16(xcept that the search pattern used is the)
--2.81 F(last RE used in)122 432 Q/F3 10/Times-Italic@0 SF(any)2.5 E F1
-(command, not necessarily the one used in the last)2.5 E F0(substitute)
-2.5 E F1(command.)2.5 E -.15(Fo)122 456 S 2.5(re).15 G
-(xample, in the sequence)-2.65 E F2(s/red/blue/)162 472.2 Q(/green)162
-484.2 Q(~)162 496.2 Q F1(the \231)122 512.4 Q F2(~)A F1 2.5<9a69>C 2.5
-(se)-2.5 G(qui)-2.5 E -.25(va)-.25 G(lent to \231).25 E F2
-(s/green/blue/)A F1<9a2e>A(The)122 536.4 Q F0(substitute)2.508 E F1 .008
-(command may be interrupted, using the terminal interrupt character)
-2.508 F 5.009(.A)-.55 G .009(ll substi-)-5.009 F
-(tutions completed before the interrupt are retained.)122 548.4 Q 21.39
-(Line: Set)122 572.4 R(to the last line upon which a substitution w)2.5
-E(as made.)-.1 E 8.05(Options: Af)122 584.4 R(fected by the)-.25 E F0
-(ignor)2.5 E(ecase)-.18 E F1(and)2.5 E F0(magic)2.5 E F1(option.)2.5 E
-F0(su[spend][!])97 608.4 Q(st[op][!])97 620.4 Q(<contr)97 632.4 Q(ol-Z>)
--.18 E F1 2.793(Suspend the edit session.)122 644.4 R 2.793
-(Appending a \231)7.793 F F2(!)A F1 7.793<9a63>C 2.793
-(haracter to these commands turns of)-7.793 F 5.293(ft)-.25 G(he)-5.293
-E F0(auto)122 656.4 Q(write)-.1 E F1(option for the command.)2.5 E 21.39
-(Line: Unchanged.)122 680.4 R 8.05(Options: Af)122 692.4 R
-(fected by the)-.25 E F0(auto)2.5 E(write)-.1 E F1(and)2.5 E F0
-(writeany)2.5 E F1(options.)2.5 E EP
-%%Page: 53 52
-%%BeginPageSetup
-BP
-%%EndPageSetup
-/F0 10/Times-Bold@0 SF(Nvi/Nex Refer)72 60 Q(ence \(Ex Commands\))-.18 E
-(USD:13-53)233.61 E(ta[g][!] tagstring)97 96 Q/F1 10/Times-Roman@0 SF
-1.098(Edit the \214le containing the speci\214ed tag.)122 108 R 1.098
-(If the tag is in a dif)6.098 F 1.099(ferent \214le, then the ne)-.25 F
-3.599<778c>-.25 G 1.099(le is)-3.599 F 3.564(edited. If)122 120 R 1.063
-(the current \214le has been modi\214ed since the last complete write, the)
-3.564 F F0(tag)3.563 E F1(command)3.563 E .118(will f)122 132 R 2.618
-(ail. This)-.1 F .118(check can be o)2.618 F -.15(ve)-.15 G .118
-(rridden by appending the \231).15 F/F2 10/Courier@0 SF(!)A F1 5.118
-<9a63>C .118(haracter to the command name.)-5.118 F(The)122 156 Q F0
-(tag)3.473 E F1 .972(command searches for)3.473 F F2(tagstring)3.472 E
-F1 .972(in the tags \214le\(s\) speci\214ed by the option.)3.472 F
-(\(See)5.972 E/F3 10/Times-Italic@0 SF(cta)122 168 Q(gs)-.1 E F1
-(\(1\) for more information on tags \214les.\))A .78
-(Capitalizing the \214rst letter of the command, i.e.)122 192 R F0 -.92
-(Ta)5.78 G(g).92 E F1 3.28(,w)C .78(hile in)-3.28 F F0(vi)3.28 E F1 .78
-(mode, will edit the \214le in a)3.28 F(ne)122 204 Q 2.5(ws)-.25 G 2.5
-(creen. In)-2.5 F(this case, an)2.5 E 2.5(ym)-.15 G
-(odi\214cations to the current \214le are ignored.)-2.5 E 21.39
-(Line: Set)122 228 R(to the line indicated by the tag.)2.5 E 8.05
-(Options: Af)122 240 R(fected by the)-.25 E F0(auto)2.5 E(write)-.1 E F1
-(,)A F0(taglength)2.5 E F1(,)A F0(tags)2.5 E F1(and)2.5 E F0(writeany)
-2.5 E F1(options.)2.5 E F0(tagn[ext][!])97 264 Q F1 .478
-(Edit the \214le containing the ne)122 276 R .477(xt conte)-.15 F .477
-(xt for the current tag.)-.15 F .477(If the conte)5.477 F .477
-(xt is in a dif)-.15 F .477(ferent \214le,)-.25 F .625(then the ne)122
-288 R 3.126<778c>-.25 G .626(le is edited.)-3.126 F .626(If the current \214le has been modi\214ed since the last complete write,)
-5.626 F(the)122 300 Q F0(tagnext)2.825 E F1 .325(command will f)2.825 F
-2.825(ail. This)-.1 F .325(check can be o)2.825 F -.15(ve)-.15 G .325
-(rridden by appending the \231).15 F F2(!)A F1 5.325<9a63>C(haracter)
--5.325 E(to the command name.)122 312 Q .156
-(Capitalizing the \214rst letter of the command, i.e.)122 336 R F0 -.92
-(Ta)5.156 G(gnext).92 E F1 2.656(,w)C .156(hile in)-2.656 F F0(vi)2.656
-E F1 .156(mode, will edit the \214le in)2.656 F 2.5(an)122 348 S .5 -.25
-(ew s)-2.5 H 2.5(creen. In).25 F(this case, an)2.5 E 2.5(ym)-.15 G
-(odi\214cations to the current \214le are ignored.)-2.5 E 21.39
-(Line: Set)122 372 R(to the line indicated by the tag.)2.5 E 8.05
-(Options: Af)122 384 R(fected by the)-.25 E F0(auto)2.5 E(write)-.1 E F1
-(and)2.5 E F0(writeany)2.5 E F1(options.)2.5 E F0
-(tagp[op][!] [\214le | number])97 408 Q F1 .316
-(Pop to the speci\214ed tag in the tags stack.)122 420 R .315
-(If neither)5.315 F F2(file)2.815 E F1(or)2.815 E F2(number)2.815 E F1
-.315(is speci\214ed, the)2.815 F F0(tagpop)2.815 E F1 .054
-(command pops to the most recent entry on the tags stack.)122 432 R(If)
-5.055 E F2(file)2.555 E F1(or)2.555 E F2(number)2.555 E F1 .055
-(is speci\214ed, the)2.555 F F0(tagpop)122 444 Q F1 1.429(command pops to the most recent entry in the tags stack for that \214le, or numbered)
-3.93 F .536(entry in the tags stack, respecti)122 456 R -.15(ve)-.25 G
-(ly).15 E 5.536(.\()-.65 G .536(See the)-5.536 F F0(display)3.036 E F1
-.536(command for information on displaying)3.036 F(the tags stack.\))122
-468 Q .22
-(If the \214le has been modi\214ed since the last complete write, the)
-122 492 R F0(tagpop)2.72 E F1 .22(command will f)2.72 F 2.72(ail. This)
--.1 F(check may be o)122 504 Q -.15(ve)-.15 G
-(rridden by appending a \231).15 E F2(!)A F1 5<9a63>C
-(haracter to the command name.)-5 E 21.39(Line: Set)122 528 R
-(to the line indicated by the tag.)2.5 E 8.05(Options: Af)122 540 R
-(fected by the)-.25 E F0(auto)2.5 E(write)-.1 E F1(and)2.5 E F0
-(writeany)2.5 E F1(options.)2.5 E F0(tagp[r)97 564 Q -.15(ev)-.18 G
-(][!]).15 E F1 .544(Edit the \214le containing the pre)122 576 R .544
-(vious conte)-.25 F .544(xt for the current tag.)-.15 F .544
-(If the conte)5.544 F .544(xt is in a dif)-.15 F(ferent)-.25 E 1.083
-(\214le, then the ne)122 588 R 3.583<778c>-.25 G 1.083(le is edited.)
--3.583 F 1.083
-(If the current \214le has been modi\214ed since the last complete)6.083
-F 1.418(write, the)122 600 R F0(tagpr)3.918 E -.15(ev)-.18 G F1 1.418
-(command will f)4.068 F 3.918(ail. This)-.1 F 1.419(check can be o)3.919
-F -.15(ve)-.15 G 1.419(rridden by appending the \231).15 F F2(!)A F1<9a>
-A(character to the command name.)122 612 Q .11
-(Capitalizing the \214rst letter of the command, i.e.)122 636 R F0 -.92
-(Ta)5.11 G(gpr).92 E -.15(ev)-.18 G F1 2.61(,w).15 G .11(hile in)-2.61 F
-F0(vi)2.61 E F1 .11(mode, will edit the \214le in)2.61 F 2.5(an)122 648
-S .5 -.25(ew s)-2.5 H 2.5(creen. In).25 F(this case, an)2.5 E 2.5(ym)
--.15 G(odi\214cations to the current \214le are ignored.)-2.5 E 21.39
-(Line: Set)122 672 R(to the line indicated by the tag.)2.5 E 8.05
-(Options: Af)122 684 R(fected by the)-.25 E F0(auto)2.5 E(write)-.1 E F1
-(and)2.5 E F0(writeany)2.5 E F1(options.)2.5 E F0(tagt[op][!])97 708 Q
-F1(Pop to the least recent tag on the tags stack, clearing the tags stack.)
-122 720 Q EP
-%%Page: 54 53
-%%BeginPageSetup
-BP
-%%EndPageSetup
-/F0 10/Times-Bold@0 SF 231.11(USD:13-54 Nvi/Nex)72 60 R(Refer)2.5 E
-(ence \(Ex Commands\))-.18 E/F1 10/Times-Roman@0 SF .359
-(If the \214le has been modi\214ed since the last complete write, the)
-122 96 R F0(tagtop)2.86 E F1 .36(command will f)2.86 F 2.86(ail. This)
--.1 F(check may be o)122 108 Q -.15(ve)-.15 G
-(rridden by appending a \231).15 E/F2 10/Courier@0 SF(!)A F1 5<9a63>C
-(haracter to the command name.)-5 E 21.39(Line: Set)122 132 R
-(to the line indicated by the tag.)2.5 E 8.05(Options: Af)122 144 R
-(fected by the)-.25 E F0(auto)2.5 E(write)-.1 E F1(and)2.5 E F0
-(writeany)2.5 E F1(options.)2.5 E F0(una[b)97 168 Q(br)-.1 E -.15(ev)
--.18 G 2.5(]l).15 G(hs)-2.5 E F1(Delete an abbre)122 180 Q 2.5
-(viation. Delete)-.25 F F2(lhs)2.5 E F1(from the current list of abbre)
-2.5 E(viations.)-.25 E 21.39(Line: Unchanged.)122 204 R 8.05
-(Options: None.)122 216 R F0(u[ndo])97 240 Q F1 .405
-(Undo the last change made to the \214le.)122 252 R .405
-(Changes made by)5.405 F F0(global)2.905 E F1(,)A F0(v)2.905 E F1(,)A F0
-(visual)2.905 E F1 .405(and map sequences)2.905 F 1.066
-(are considered a single command.)122 264 R 1.066(If repeated, the)6.066
-F F0(u)3.566 E F1 1.066(command alternates between these tw)3.566 F(o)
--.1 E(states, and is its o)122 276 Q(wn in)-.25 E -.15(ve)-.4 G(rse.).15
-E 21.39(Line: Set)122 300 R(to the last line modi\214ed by the command.)
-2.5 E 8.05(Options: None.)122 312 R F0(unm[ap][!] lhs)97 336 Q F1 .206
-(Unmap a mapped string.)122 348 R .205
-(Delete the command mode map de\214nition for)5.206 F F2(lhs)2.705 E F1
-5.205(.I)C 2.705(fa\231)-5.205 G F2(!)-2.705 E F1 5.205<9a63>C(harac-)
--5.205 E(ter is appended to the command name, delete the te)122 360 Q
-(xt input mode map de\214nition instead.)-.15 E 21.39(Line: Unchanged.)
-122 384 R 8.05(Options: None.)122 396 R F0 -.1(ve)97 420 S([rsion]).1 E
-F1(Display the v)122 432 Q(ersion of the)-.15 E F0(ex/vi)2.5 E F1
-(editor)2.5 E(.)-.55 E F0([line] vi[sual] [type] [count] [\215ags])97
-456 Q(Ex)122 468 Q F1 1.105(mode only)3.605 F 6.105(.E)-.65 G(nter)
--6.105 E F0(vi)3.605 E F1 6.105(.T)C(he)-6.105 E F2(type)3.605 E F1
-1.105(is optional, and can be \231)3.605 F F2<ad>A F1 1.105<9a2c2099>B
-F2(+)A F1 3.605<9a6f>C 3.605<7299>-3.605 G F2(^)-3.605 E F1 1.105
-(\232, as in the)B F0 1.105(ex z)3.605 F F1 .312(command, to specify the position of the speci\214ed line in the screen windo)
-122 480 R 4.112 -.65(w. \()-.25 H .312(The def).65 F .311(ault is to)-.1
-F .974(place the line at the top of the screen windo)122 492 R -.65(w.)
--.25 G 5.975(\)A).65 G F2(count)-2.5 E F1 .975
-(speci\214es the number of lines that)3.475 F
-(will initially be displayed.)122 504 Q(\(The def)5 E(ault is the v)-.1
-E(alue of the)-.25 E F0(windo)2.5 E(w)-.1 E F1(editor option.\))2.5 E
-21.39(Line: Unchanged)122 528 R(unless)2.5 E F2(line)2.5 E F1
-(is speci\214ed, in which case it is set to that line.)2.5 E 8.05
-(Options: None.)122 540 R F0(vi[sual][!] [+cmd] [\214le])97 564 Q -.37
-(Vi)122 576 S F1(mode only)2.87 E 5(.E)-.65 G(dit a ne)-5 E 2.5<778c>
--.25 G 2.5(le. Identical)-2.5 F(to the \231)2.5 E F2
-(edit[!] [+cmd] [file])A F1 2.5<9a63>C(ommand.)-2.5 E .744
-(Capitalizing the \214rst letter of the command, i.e.)122 600 R F0 -.37
-(Vi)5.744 G(sual).37 E F1 3.244(,w)C .744(ill edit the \214le in a ne)
--3.244 F 3.244(ws)-.25 G 3.244(creen. In)-3.244 F(this case, an)122 612
-Q 2.5(ym)-.15 G(odi\214cations to the current \214le are ignored.)-2.5 E
-F0(viu[sage] [command])97 636 Q F1 1.078(Display usage for a)122 648 R
-F0(vi)3.578 E F1 3.578(command. If)3.578 F F2(command)3.578 E F1 1.078
-(is speci\214ed, a usage statement for that com-)3.578 F
-(mand is displayed.)122 660 Q(Otherwise, usage statements for all)5 E F0
-(vi)2.5 E F1(commands are displayed.)2.5 E 21.39(Line: Unchanged.)122
-684 R 8.05(Options: None.)122 696 R EP
-%%Page: 55 54
-%%BeginPageSetup
-BP
-%%EndPageSetup
-/F0 10/Times-Bold@0 SF(Nvi/Nex Refer)72 60 Q(ence \(Ex Commands\))-.18 E
-(USD:13-55)233.61 E([range] w[rite][!] [>>] [\214le])97 96 Q
-([range] w[rite] [!] [\214le])97 108 Q([range] wn[!] [>>] [\214le])97
-120 Q([range] wq[!] [>>] [\214le])97 132 Q/F1 10/Times-Roman@0 SF .67
-(Write the \214le.)122 144 R .67
-(The speci\214ed lines \(the entire \214le, if no range is gi)5.67 F
--.15(ve)-.25 G .67(n\) is written to).15 F/F2 10/Courier@0 SF(file)3.17
-E F1 5.67(.I)C(f)-5.67 E F2(file)122 156 Q F1 .802
-(is not speci\214ed, the current pathname is used.)3.301 F(If)5.802 E F2
-(file)3.302 E F1 .802(is speci\214ed, and it e)3.302 F .802
-(xists, or if)-.15 F .988(the current pathname w)122 168 R .988
-(as set using the)-.1 F F0(\214le)3.487 E F1 .987
-(command, and the \214le already e)3.487 F .987(xists, these com-)-.15 F
-1.196(mands will f)122 180 R 3.696(ail. Appending)-.1 F 3.696<6199>3.696
-G F2(!)-3.696 E F1 6.196<9a63>C 1.197
-(haracter to the command name will o)-6.196 F -.15(ve)-.15 G 1.197
-(rride this check).15 F(and the write will be attempted, re)122 192 Q
--.05(ga)-.15 G(rdless.).05 E 1.027(Specifying the optional \231)122 216
-R F2(>>)A F1 3.527<9a73>C 1.027
-(tring will cause the write to be appended to the \214le, in which)
--3.527 F(case no tests are made for the \214le already e)122 228 Q
-(xisting.)-.15 E 1.966(If the \214le is preceded by a \231)122 252 R F2
-(!)A F1 6.966<9a63>C(haracter)-6.966 E 4.466(,t)-.4 G 1.966
-(he program named by the shell edit option is)-4.466 F(in)122 264 Q -.2
-(vo)-.4 G -.1(ke).2 G 2.735(dw).1 G .235(ith \214le as its second ar)
--2.735 F .235
-(gument, and the speci\214ed lines are passed as standard input to)-.18
-F .465(that command.)122 276 R .465(The \231)5.465 F F2(!)A F1 5.465
-<9a69>C 2.965(nt)-5.465 G .466
-(his usage must be separated from command name by at least one)-2.965 F
-.056(whitespace character)122 288 R 5.056(.T)-.55 G .056
-(he special meaning of the \231)-5.056 F F2(!)A F1 5.056<9a6d>C .056
-(ay be o)-5.056 F -.15(ve)-.15 G .056(rridden by escaping it with a).15
-F(backslash \(\231)122 300 Q F2(\\)A F1(\232\) character)A(.)-.55 E(The)
-122 324 Q F0(wq)3.047 E F1 -.15(ve)3.047 G .548
-(rsion of the write command will e).15 F .548
-(xit the editor after writing the \214le, if there are no)-.15 F .56
-(further \214les to edit.)122 336 R .56(Appending a \231)5.56 F F2(!)A
-F1 5.56<9a63>C .56(haracter to the command name or entering tw)-5.56 F
-3.06<6f99>-.1 G(quit\232)-3.06 E .244(commands \(i.e.)122 348 R F0(wq)
-5.244 E F1(,)A F0(quit)2.744 E F1(,)A F0(xit)2.744 E F1(or)2.744 E F0
-(ZZ)2.744 E F1 2.744(\)i)C 2.744(nar)-2.744 G -.25(ow)-2.744 G 2.744
-(\)w).25 G .245(ill o)-2.744 F -.15(ve)-.15 G .245
-(rride this check and the editor will e).15 F(xit,)-.15 E(ignoring an)
-122 360 Q 2.5<798c>-.15 G(les that ha)-2.5 E .3 -.15(ve n)-.2 H
-(ot yet been edited.).15 E(The)122 384 Q F0(wn)3.342 E F1 -.15(ve)3.342
-G .841(rsion of the write command will mo).15 F 1.141 -.15(ve t)-.15 H
-3.341(ot).15 G .841(he ne)-3.341 F .841
-(xt \214le after writing the \214le, unless)-.15 F(the write f)122 396 Q
-(ails.)-.1 E 21.39(Line: Unchanged.)122 420 R 8.05(Options: Af)122 432 R
-(fected by the)-.25 E F0 -.18(re)2.5 G(adonly).18 E F1(and)2.5 E F0
-(writeany)2.5 E F1(options.)2.5 E F0([range] x[it][!] [\214le])97 456 Q
-F1 .863(Write the \214le if it has been modi\214ed.)122 468 R .863
-(The speci\214ed lines are written to)5.863 F F2(file)3.364 E F1 3.364
-(,i)C 3.364(ft)-3.364 G .864(he \214le has)-3.364 F .129
-(been modi\214ed since the last complete write to an)122 480 R 2.629
-<798c>-.15 G 2.629(le. If)-2.629 F(no)2.629 E F2(range)2.629 E F1 .128
-(is speci\214ed, the entire \214le)2.629 F(is written.)122 492 Q(The)122
-516 Q F0(xit)3.208 E F1 .709(command will e)3.208 F .709(xit the editor after writing the \214le, if there are no further \214les to edit.)
--.15 F .422(Appending a \231)122 528 R F2(!)A F1 5.422<9a63>C .421
-(haracter to the command name or entering tw)-5.422 F 2.921<6f99>-.1 G
-.421(quit\232 commands \(i.e.)-2.921 F F0(wq)5.421 E F1(,)A F0(quit)122
-540 Q F1(,)A F0(xit)3.4 E F1(or)3.4 E F0(ZZ)3.4 E F1 3.4(\)i)C 3.4(nar)
--3.4 G -.25(ow)-3.4 G 3.4(\)w).25 G .9(ill o)-3.4 F -.15(ve)-.15 G .901
-(rride this check and the editor will e).15 F .901(xit, ignoring an)-.15
-F 3.401<798c>-.15 G(les)-3.401 E(that ha)122 552 Q .3 -.15(ve n)-.2 H
-(ot yet been edited.).15 E 21.39(Line: Unchanged.)122 576 R 8.05
-(Options: Af)122 588 R(fected by the)-.25 E F0 -.18(re)2.5 G(adonly).18
-E F1(and)2.5 E F0(writeany)2.5 E F1(options.)2.5 E F0([range] ya[nk] [b)
-97 612 Q(uffer] [count])-.2 E F1(Cop)122 624 Q 2.5(yt)-.1 G
-(he speci\214ed lines to a b)-2.5 E(uf)-.2 E(fer)-.25 E 5(.I)-.55 G 2.5
-(fn)-5 G 2.5(ob)-2.5 G(uf)-2.7 E(fer is speci\214ed, the unnamed b)-.25
-E(uf)-.2 E(fer is used.)-.25 E 21.39(Line: Unchanged.)122 648 R 8.05
-(Options: None.)122 660 R F0([line] z [type] [count] [\215ags])97 684 Q
-F1 .279(Adjust the windo)122 696 R 4.079 -.65(w. I)-.25 H 2.779(fn).65 G
-(o)-2.779 E F2(type)2.779 E F1 .279(is speci\214ed, then)2.779 F F2
-(count)2.779 E F1 .278(lines follo)2.779 F .278
-(wing the speci\214ed line are)-.25 F 4.896(displayed. The)122 708 R
-(def)4.897 E(ault)-.1 E F2(count)4.897 E F1 2.397(is the v)4.897 F 2.397
-(alue of the)-.25 F F0(windo)4.897 E(w)-.1 E F1 4.897(option. The)4.897
-F F2(type)4.897 E F1(ar)4.897 E(gument)-.18 E .017
-(changes the position at which)122 720 R F2(line)2.517 E F1 .017
-(is displayed on the screen by changing the number of lines)2.517 F EP
-%%Page: 56 55
-%%BeginPageSetup
-BP
-%%EndPageSetup
-/F0 10/Times-Bold@0 SF 231.11(USD:13-56 Nvi/Nex)72 60 R(Refer)2.5 E
-(ence \(Ex Commands\))-.18 E/F1 10/Times-Roman@0 SF
-(displayed before and after)122 96 Q/F2 10/Courier@0 SF(line)2.5 E F1 5
-(.T)C(he follo)-5 E(wing)-.25 E F2(type)2.5 E F1
-(characters may be used:)2.5 E 39.36<ad50>122 120 S
-(lace the line at the bottom of the screen.)-39.36 E 39.36(+P)122 132 S
-(lace the line at the top of the screen.)-39.36 E 42.5(.P)122 144 S
-(lace the line in the middle of the screen.)-42.5 E 41.67(^W)122 156 S
-.193(rite out count lines starting)-41.67 F F2 .193(count * 2)2.693 F F1
-.193(lines before)2.693 F F2(line)2.693 E F1 2.694(;t)C .194(he net ef)
--2.694 F .194(fect of this)-.25 F(is that a \231)167 168 Q F2(z^)A F1
-2.5<9a63>C(ommand follo)-2.5 E(wing a)-.25 E F0(z)2.5 E F1
-(command writes the pre)2.5 E(vious page.)-.25 E 39.36(=C)122 180 S
-(enter)-39.36 E F2(line)3.824 E F1 1.323(on the screen with a line of h)
-3.824 F 1.323(yphens displayed immediately before)-.05 F 1.663
-(and after it.)167 192 R 1.664(The number of preceding and follo)6.664 F
-1.664(wing lines of te)-.25 F 1.664(xt displayed are)-.15 F
-(reduced to account for those lines.)167 204 Q 21.39(Line: Set)122 228 R
-.084(to the last line displayed, with the e)2.584 F .083
-(xception of the)-.15 F F2(type)2.583 E F1 2.583(,w)C .083
-(here the current line)-2.583 F
-(is set to the line speci\214ed by the command.)167 240 Q 8.05
-(Options: Af)122 252 R(fected by the)-.25 E F0(scr)2.5 E(oll)-.18 E F1
-(option.)2.5 E F0 2.5(18. Set)97 276 R(Options)2.5 E F1 .438
-(There are a lar)122 292.2 R .439(ge number of options that may be set \(or unset\) to change the editor')
--.18 F 2.939(sb)-.55 G(eha)-2.939 E(vior)-.2 E(.)-.55 E
-(This section describes the options, their abbre)97 304.2 Q
-(viations and their def)-.25 E(ault v)-.1 E(alues.)-.25 E .251
-(In each entry belo)122 320.4 R 1.551 -.65(w, t)-.25 H .251
-(he \214rst part of the tag line is the full name of the option, follo)
-.65 F .251(wed by an)-.25 F(y)-.15 E(equi)97 332.4 Q -.25(va)-.25 G .762
-(lent abbre).25 F 3.262(viations. \(Re)-.25 F -.05(ga)-.15 G .762
-(rdless of the abbre).05 F .762
-(viations, it is only necessary to use the minimum)-.25 F .84
-(number of characters necessary to distinguish an abbre)97 344.4 R .84
-(viation from all other commands for it to be)-.25 F .258(accepted, in)
-97 356.4 R F0(nex)2.758 E F1(/)A F0 -.4(nv)C(i).4 E F1 5.258(.H)C
-(istorically)-5.258 E 2.758(,o)-.65 G .259(nly the full name and the of)
--2.758 F .259(\214cial abbre)-.25 F .259(viations were accepted by)-.25
-F F0(ex)97 368.4 Q F1(/)A F0(vi)A F1 5.953(.U)C .953
-(sing full names in your startup \214les and en)-5.953 F .953
-(vironmental v)-.4 F .953(ariables will probably mak)-.25 F 3.452(et)-.1
-G(hem)-3.452 E .016(more portable.\))97 380.4 R .016
-(The part in square brack)5.016 F .017(ets is the def)-.1 F .017(ault v)
--.1 F .017(alue of the option.)-.25 F .017(Most of the options are)5.017
-F(boolean, i.e. the)97 392.4 Q 2.5(ya)-.15 G(re either on or of)-2.5 E
-(f, and do not ha)-.25 E .3 -.15(ve a)-.2 H 2.5(na).15 G(ssociated v)
--2.5 E(alue.)-.25 E(Options apply to both)122 408.6 Q F0(ex)2.5 E F1
-(and)2.5 E F0(vi)2.5 E F1(modes, unless otherwise speci\214ed.)2.5 E -.4
-(Wi)122 424.8 S .344(th a fe).4 F 2.844(we)-.25 G .344
-(xceptions, all options are settable per screen, i.e. the)-2.994 F F0
-(tags)2.843 E F1 .343(option can be set dif)2.843 F(fer)-.25 E(-)-.2 E
-1.242(ently in each screen.)97 436.8 R 1.243(The e)6.243 F 1.243
-(xceptions are the)-.15 F F0(columns)3.743 E F1(,)A F0(lines)3.743 E F1
-(,)A F0(secur)3.743 E(e)-.18 E F1(and)3.743 E F0(term)3.743 E F1 3.743
-(options. Changing)3.743 F(these options modi\214es the respecti)97
-448.8 Q .3 -.15(ve i)-.25 H(nformation for all screens.).15 E -.15(Fo)
-122 465 S 2.625(ri).15 G .125(nformation on modifying the options or to display the options and their current v)
--2.625 F .124(alues, see)-.25 F
-(the \231set\232 command in the section entitled \231)97 477 Q F0
-(Ex Commands)A F1<9a2e>A F0(altwerase [off])97 501 Q -.37(Vi)122 513 S
-F1(only)2.967 E 5.097(.C)-.65 G .097(hange ho)-5.097 F(w)-.25 E F0(vi)
-2.597 E F1 .097(does w)2.597 F .097(ord erase during te)-.1 F .097
-(xt input.)-.15 F .097(When this option is set, te)5.097 F .098
-(xt is bro-)-.15 F -.1(ke)122 525 S 2.979(nu).1 G 2.979(pi)-2.979 G .478
-(nto three classes: alphabetic, numeric and underscore characters, other nonblank char)
--2.979 F(-)-.2 E .397(acters, and blank characters.)122 537 R .398
-(Changing from one class to another marks the end of a w)5.397 F 2.898
-(ord. In)-.1 F .059(addition, the class of the \214rst character erased is ignored \(which is e)
-122 549 R .058(xactly what you w)-.15 F .058(ant when)-.1 F
-(erasing pathname components\).)122 561 Q F0(autoindent, ai [off])97 585
-Q F1 .367(If this option is set, whene)122 597 R -.15(ve)-.25 G 2.867
-(ry).15 G .367(ou create a ne)-2.867 F 2.867(wl)-.25 G .367
-(ine \(using the)-2.867 F F0 .367(vi A)2.867 F F1(,)A F0(a)2.867 E F1(,)
-A F0(C)2.867 E F1(,)A F0(c)2.867 E F1(,)A F0(I)2.867 E F1(,)A F0(i)2.867
-E F1(,)A F0(O)2.867 E F1(,)A F0(o)2.867 E F1(,)A F0(R)2.867 E F1(,)A F0
-(r)2.868 E F1(,)A F0(S)2.868 E F1(,)A(and)122 609 Q F0(s)3.134 E F1 .634
-(commands, or the)3.134 F F0 .633(ex append)3.134 F F1(,)A F0(change)
-3.133 E F1 3.133(,a)C(nd)-3.133 E F0(insert)3.133 E F1 .633
-(commands\) the ne)3.133 F 3.133(wl)-.25 G .633(ine is automati-)-3.133
-F .58(cally indented to align the cursor with the \214rst nonblank character of the line from which you)
-122 621 R .26(created it.)122 633 R .26
-(Lines are indented using tab characters to the e)5.26 F .259
-(xtent possible \(based on the v)-.15 F .259(alue of)-.25 F(the)122 645
-Q F0(tabstop)2.667 E F1 .168
-(option\) and then using space characters as necessary)2.667 F 5.168(.F)
--.65 G .168(or commands inserting te)-5.318 F(xt)-.15 E .556
-(into the middle of a line, an)122 657 R 3.056(yb)-.15 G .556
-(lank characters to the right of the cursor are discarded, and the)
--3.056 F(\214rst nonblank character to the right of the cursor is aligned as described abo)
-122 669 Q -.15(ve)-.15 G(.).15 E .06(The indent characters are themselv)
-122 693 R .06(es some)-.15 F .06(what special.)-.25 F .06
-(If you do not enter more characters on)5.06 F .795(the ne)122 705 R
-3.295(wl)-.25 G .795(ine before mo)-3.295 F .795
-(ving to another line, or entering)-.15 F F2(<escape>)3.295 E F1 3.295
-(,t)C .795(he indent character will)-3.295 F 1.7
-(be deleted and the line will be empty)122 717 R 6.7(.F)-.65 G 1.7(or e)
--6.85 F 1.7(xample, if you enter)-.15 F F2(<carriage-return>)4.2 E EP
-%%Page: 57 56
-%%BeginPageSetup
-BP
-%%EndPageSetup
-/F0 10/Times-Bold@0 SF(Nvi/Nex Refer)72 60 Q(ence \(Options\))-.18 E
-(USD:13-57)262.77 E/F1 10/Times-Roman@0 SF 1.366
-(twice in succession, the line created by the \214rst)122 96 R/F2 10
-/Courier@0 SF(<carriage-return>)3.866 E F1 1.366(will not ha)3.866 F
-1.666 -.15(ve a)-.2 H -.15(ny).15 G(characters in it, re)122 108 Q -.05
-(ga)-.15 G(rdless of the indentation of the pre).05 E
-(vious or subsequent line.)-.25 E 1.348(Indent characters also require that you enter additional erase characters to delete them.)
-122 132 R -.15(Fo)6.349 G(r).15 E -.15(ex)122 144 S .271
-(ample, if you ha).15 F .571 -.15(ve a)-.2 H 2.771(ni).15 G .271
-(ndented line, containing only blanks, the \214rst)-2.771 F F2
-(<word-erase>)2.77 E F1(char)2.77 E(-)-.2 E .472(acter you enter will erase up to end of the indent characters, and the second will erase back to)
-122 156 R .895(the be)122 168 R .895(ginning of the line.)-.15 F
-(\(Historically)5.895 E 3.395(,o)-.65 G .895(nly the)-3.395 F F2
-(<control-D>)3.395 E F1 -.1(ke)3.394 G 3.394(yw)-.05 G .894
-(ould erase the indent)-3.494 F 2.6(characters. Both)122 180 R(the)2.6 E
-F2(<control-D>)2.6 E F1 -.1(ke)2.6 G 2.6(ya)-.05 G .1
-(nd the usual erase k)-2.6 F -.15(ey)-.1 G 2.6(sw).15 G .1(ork in)-2.7 F
-F0 -.4(nv)2.6 G(i).4 E F1 2.6(.\) In)B .1(addition, if)2.6 F .875
-(the cursor is positioned at the end of the indent characters, the k)122
-192 R -.15(ey)-.1 G 3.375<7399>.15 G F2(0<control-D>)-3.375 E F1 3.375
-<9a77>C(ill)-3.375 E .311(erase all of the indent characters for the current line, resetting the indentation le)
-122 204 R -.15(ve)-.25 G 2.811(lt).15 G 2.811(o0)-2.811 G 5.311(.S)
--2.811 G(imi-)-5.311 E(larly)122 216 Q 3.483(,t)-.65 G .983(he k)-3.483
-F -.15(ey)-.1 G 3.483<7399>.15 G F2(^<control-D>)-3.483 E F1 3.483<9a77>
-C .983(ill erase all of the indent characters for the current line,)
--3.483 F(lea)122 228 Q(ving the indentation le)-.2 E -.15(ve)-.25 G 2.5
-(lf).15 G(or future created lines unaf)-2.5 E(fected.)-.25 E(Finally)122
-252 Q 2.77(,i)-.65 G 2.77(ft)-2.77 G(he)-2.77 E F0(autoindent)2.77 E F1
-.27(option is set, the)2.77 F F0(S)2.771 E F1(and)2.771 E F0(cc)2.771 E
-F1 .271(commands change from the \214rst nonblank)2.771 F .125
-(of the line to the end of the line, instead of from the be)122 264 R
-.125(ginning of the line to the end of the line.)-.15 F F0
-(autoprint, ap [off])97 288 Q(Ex)122 300 Q F1(only)3.901 E 6.401(.C)-.65
-G 1.401(ause the current line to be automatically displayed after the)
--6.401 F F0(ex)3.902 E F1(commands)3.902 E F0(<)3.902 E F1(,)A F0(>)
-3.902 E F1(,)A F0(copy)122 312 Q F1(,)A F0(delete)2.519 E F1(,)A F0
-(join)2.519 E F1(,)A F0(mo)2.519 E -.1(ve)-.1 G F1(,).1 E F0(put)2.519 E
-F1(,)A F0(t)2.519 E F1(,)A F0(Undo)2.519 E F1 2.519(,a)C(nd)-2.519 E F0
-(undo)2.519 E F1 5.018(.T)C .018
-(his automatic display is suppressed during)-5.018 F F0(global)122 324 Q
-F1(and)2.915 E F0(v)2.915 E F1 .415(commands, and for an)2.915 F 2.915
-(yc)-.15 G .416(ommand where optional \215ags are used to e)-2.915 F
-.416(xplicitly dis-)-.15 F(play the line.)122 336 Q F0(auto)97 360 Q
-(write, aw [off])-.1 E F1 .473(If this option is set, the)122 372 R F0
-.472(vi !)2.972 F F1(,)A F0(^^)2.972 E F1(,)A F0(^])2.972 E F1(and)2.972
-E F0(<contr)2.972 E(ol-Z>)-.18 E F1 .472(commands, and the)2.972 F F0
-.472(ex edit)2.972 F F1(,)A F0(next)2.972 E F1(,)A F0 -.18(re)2.972 G
-(wind).18 E F1(,)A F0(stop)122 384 Q F1(,)A F0(suspend)2.847 E F1(,)A F0
-(tag)2.847 E F1(,)A F0(tagpop)2.847 E F1 2.847(,a)C(nd)-2.847 E F0
-(tagtop)2.848 E F1 .348
-(commands automatically write the current \214le back to)2.848 F 1.252
-(the current \214le name if it has been modi\214ed since it w)122 396 R
-1.252(as last written.)-.1 F 1.251(If the write f)6.251 F 1.251
-(ails, the)-.1 F(command f)122 408 Q(ails and goes no further)-.1 E(.)
--.55 E .366(Appending the optional force \215ag character \231)122 432 R
-F2(!)A F1 5.366<9a74>C 2.866(ot)-5.366 G(he)-2.866 E F0(ex)2.867 E F1
-(commands)2.867 E F0(next)2.867 E F1(,)A F0 -.18(re)2.867 G(wind).18 E
-F1(,)A F0(stop)2.867 E F1(,)A F0(sus-)2.867 E(pend)122 444 Q F1(,)A F0
-(tag)2.5 E F1(,)A F0(tagpop)2.5 E F1 2.5(,a)C(nd)-2.5 E F0(tagtop)2.5 E
-F1(stops the automatic write from being attempted.)2.5 E(\(Historically)
-122 468 Q 2.666(,t)-.65 G(he)-2.666 E F0(next)2.666 E F1 .165
-(command ignored the optional force \215ag.\))2.666 F .165(Note, the)
-5.165 F F0(ex)2.665 E F1(commands)2.665 E F0(edit)2.665 E F1(,)A F0
-(quit)122 480 Q F1(,)A F0(shell)2.5 E F1 2.5(,a)C(nd)-2.5 E F0(xit)2.5 E
-F1(are)2.5 E/F3 10/Times-Italic@0 SF(not)2.5 E F1(af)2.5 E
-(fected by the)-.25 E F0(auto)2.5 E(write)-.1 E F1(option.)2.5 E(The)122
-504 Q F0(auto)2.5 E(write)-.1 E F1
-(option is ignored if the \214le is considered read-only for an)2.5 E
-2.5(yr)-.15 G(eason.)-2.5 E F0(backup [""])97 528 Q F1 .538(If this option is set, it speci\214es a pathname used as a backup \214le, and, whene)
-122 540 R -.15(ve)-.25 G 3.039(ra\214).15 G .539(le is writ-)-3.039 F
-(ten, the \214le')122 552 Q 2.5(sc)-.55 G
-(urrent contents are copied to it.)-2.5 E(The pathname is \231)5 E F2(#)
-A F1<9a2c2099>A F2(%)A F1 2.5<9a61>C(nd \231)-2.5 E F2(!)A F1 5<9a65>C
-(xpanded.)-5.15 E 1.206
-(If the \214rst character of the pathname is \231)122 576 R F2(N)A F1
-1.206(\232, a v)B 1.205(ersion number is appended to the pathname)-.15 F
-.614(\(and the \231)122 588 R F2(N)A F1 3.114<9a63>C .614
-(haracter is then discarded\).)-3.114 F -1.11(Ve)5.615 G .615
-(rsion numbers are al)1.11 F -.1(wa)-.1 G .615(ys incremented, and each)
-.1 F .75(backup \214le will ha)122 600 R 1.05 -.15(ve a ve)-.2 H .75
-(rsion number one greater than the highest v).15 F .75
-(ersion number currently)-.15 F(found in the directory)122 612 Q(.)-.65
-E .128(Backup \214les must be re)122 636 R .128(gular \214les, o)-.15 F
-.128(wned by the real user ID of the user running the editor)-.25 F
-2.629(,a)-.4 G(nd)-2.629 E(not accessible by an)122 648 Q 2.5(yo)-.15 G
-(ther user)-2.5 E(.)-.55 E F0(beautify)97 672 Q 2.5(,b)-.55 G 2.5(f[)
--2.5 G(off])-2.5 E F1 1.536(If this option is set, all control characters that are not currently being specially interpreted,)
-122 684 R .59(other than)122 696 R F2(<tab>)3.091 E F1(,)A F2(<newline>)
-3.091 E F1 3.091(,a)C(nd)-3.091 E F2(<form-feed>)3.091 E F1 3.091(,a)C
-.591(re discarded from commands read in)-3.091 F(by)122 708 Q F0(ex)
-2.791 E F1 .291(from command \214les, and from input te)2.791 F .291
-(xt entered to)-.15 F F0(vi)2.79 E F1 .29
-(\(either into the \214le or to the colon)2.79 F(command line\).)122 720
-Q -1.25 -.7(Te x)5 H 2.5<748c>.7 G(les read by)-2.5 E F0(ex)2.5 E F1(/)A
-F0(vi)A F1(are)2.5 E F3(not)2.5 E F1(af)2.5 E(fected by the)-.25 E F0
-(beautify)2.5 E F1(option.)2.5 E EP
-%%Page: 58 57
-%%BeginPageSetup
-BP
-%%EndPageSetup
-/F0 10/Times-Bold@0 SF 260.27(USD:13-58 Nvi/Nex)72 60 R(Refer)2.5 E
-(ence \(Options\))-.18 E(cdpath [en)97 96 Q(vir)-.4 E(onment v)-.18 E
-(ariable CDP)-.1 E -.95(AT)-.74 G(H, or curr).95 E(ent dir)-.18 E
-(ectory])-.18 E/F1 10/Times-Roman@0 SF .628(This option is used to specify a colon separated list of directories which are used as path pre-)
-122 108 R<8c78>122 120 Q 1.172(es for an)-.15 F 3.672(yr)-.15 G(elati)
--3.672 E 1.472 -.15(ve p)-.25 H 1.172(ath names used as ar).15 F 1.172
-(guments for the)-.18 F F0(cd)3.672 E F1 3.672(command. The)3.672 F -.25
-(va)3.672 G 1.171(lue of this).25 F .422(option def)122 132 R .422
-(aults to the v)-.1 F .422(alue of the en)-.25 F .422(vironmental v)-.4
-F(ariable)-.25 E/F2 10/Courier@0 SF(CDPATH)2.923 E F1 .423
-(if it is set, otherwise to the)2.923 F 1.008(current directory)122 144
-R 6.008(.F)-.65 G 1.008
-(or compatibility with the POSIX 1003.2 shell, the)-6.158 F F0(cd)3.507
-E F1 1.007(command does)3.507 F/F3 10/Times-Italic@0 SF(not)3.507 E F1
-.372(check the current directory as a path pre\214x for relati)122 156 R
-.673 -.15(ve p)-.25 H .373(ath names unless it is e).15 F .373
-(xplicitly speci-)-.15 F 3.19(\214ed. It)122 168 R .69
-(may be so speci\214ed by entering an empty string or a \231)3.19 F F2
-(.)A F1 5.69<9a63>C .69(haracter into the)-5.69 F F2(CDPATH)3.19 E F1
--.25(va)122 180 S(riable or the option v).25 E(alue.)-.25 E F0
-(cedit [no default])97 204 Q F1 1.38
-(This option adds the ability to edit the colon command-line history)122
-216 R 6.381(.T)-.65 G 1.381(his option is set to a)-6.381 F 3.368
-(string. Whene)122 228 R -.15(ve)-.25 G 3.368(rt).15 G .868(he \214rst character of that string is entered on the colon command line, you)
--3.368 F .882(will enter a normal editing windo)122 240 R 3.382(wo)-.25
-G 3.382(nt)-3.382 G .882(he collected commands that you')-3.382 F 1.182
--.15(ve e)-.5 H .882(ntered on the).15 F F0(vi)3.382 E F1 1.272
-(colon command-line.)122 252 R -1.1(Yo)6.272 G 3.772(um)1.1 G 1.272
-(ay then modify and/or e)-3.772 F -.15(xe)-.15 G 1.272
-(cute the commands.).15 F 1.271(All normal te)6.271 F(xt)-.15 E .698
-(editing is a)122 264 R -.25(va)-.2 G .698(ilable, e).25 F .698
-(xcept that you cannot use)-.15 F F0(<contr)3.199 E(ol-W>)-.18 E F1 .699
-(to switch to an alternate screen.)3.199 F .06(Entering a)122 276 R F0
-(<carriage-r)2.56 E(etur)-.18 E(n>)-.15 E F1 .06(will e)2.56 F -.15(xe)
--.15 G .06(cute the current line of the screen windo).15 F 2.56(wa)-.25
-G 2.56(sa)-2.56 G 2.56(ne)-2.56 G 2.56(xc)-2.71 G(om-)-2.56 E .297
-(mand in the conte)122 288 R .297(xt of the screen from which you created the colon command-line screen, and)
--.15 F(you will then return to that screen.)122 300 Q .232(Because of)
-122 324 R F0(vi)2.732 E F1 1.332 -.55('s p)D .231
-(arsing rules, it can be dif).55 F .231
-(\214cult to set the colon command-line edit character to)-.25 F(the)122
-336 Q F2(<escape>)6.616 E F1(character)6.616 E 9.116(.T)-.55 G 6.616(os)
--9.916 G 4.116(et it to)-6.616 F F2(<escape>)6.616 E F1 6.616(,u)C 4.116
-(se \231)-6.616 F F2 4.116(set cedit=<literal-)B(next><escape>)122 348 Q
-F1<9a2e>A .05(If the)122 372 R F0(cedit)2.55 E F1 .05
-(edit option is set to the same character as the)2.55 F F0(\214lec)2.549
-E F1 .049(edit option,)2.549 F F0(vi)2.549 E F1 .049(will perform colon)
-2.549 F .528(command-line editing if the character is entered as the \214rst character of the line, otherwise,)
-122 384 R F0(vi)3.028 E F1(will perform \214le name e)122 396 Q
-(xpansion.)-.15 E F0(columns, co [80])97 420 Q F1 .063
-(The number of columns in the screen.)122 432 R .062
-(Setting this option causes)5.062 F F0(ex)2.562 E F1(/)A F0(vi)A F1 .062
-(to set \(or reset\) the en)2.562 F(vi-)-.4 E .245(ronmental v)122 444 R
-(ariable)-.25 E F2(COLUMNS)2.745 E F1 5.245(.S)C .245
-(ee the section entitled \231)-5.245 F F0 .246(Sizing the Scr)B(een)-.18
-E F1 2.746<9a6d>C .246(ore information.)-2.746 F F0(comment [off])97 468
-Q -.37(Vi)122 480 S F1(only)3.044 E 5.174(.I)-.65 G 2.674(ft)-5.174 G
-.174(he \214rst non-empty line of the \214le be)-2.674 F .174
-(gins with the string \231)-.15 F F2(/*)A F1 .174
-(\232, this option causes)B F0(vi)2.673 E F1 .503(to skip to the end of that C-language comment \(probably a terribly boring le)
-122 492 R -.05(ga)-.15 G 3.003(ln).05 G .503(otice\) before)-3.003 F
-(displaying the \214le.)122 504 Q F0(dir)97 528 Q(ectory)-.18 E 2.5(,d)
--.55 G(ir [en)-2.5 E(vir)-.4 E(onment v)-.18 E(ariable TMPDIR, or /tmp])
--.1 E F1 .516(The directory where temporary \214les are created.)122 540
-R .516(The en)5.516 F .516(vironmental v)-.4 F(ariable)-.25 E F2(TMPDIR)
-3.016 E F1 .515(is used)3.015 F(as the def)122 552 Q(ault v)-.1 E
-(alue if it e)-.25 E(xists, otherwise)-.15 E F2(/tmp)2.5 E F1(is used.)
-2.5 E F0(edcompatible, ed [off])97 576 Q F1 .81(Remember the v)122 588 R
-.81(alues of the \231c\232 and \231g\232 suf)-.25 F<8c78>-.25 E .81
-(es to the)-.15 F F0(substitute)3.31 E F1 .81(commands, instead of ini-)
-3.31 F .584(tializing them as unset for each ne)122 600 R 3.084(wc)-.25
-G 3.084(ommand. Specifying)-3.084 F .584
-(pattern and replacement strings to)3.084 F(the)122 612 Q F0(substitute)
-2.5 E F1(command unsets the \231c\232 and \231g\232 suf)2.5 E<8c78>-.25
-E(es as well.)-.15 E F0(escapetime [1])97 636 Q F1 .568(The 10th')122
-648 R 3.068(so)-.55 G 3.068(fas)-3.068 G(econd)-3.068 E F0(ex)3.069 E F1
-(/)A F0(vi)A F1 -.1(wa)3.069 G .569(its for a subsequent k).1 F .869
--.15(ey t)-.1 H 3.069(oc).15 G .569(omplete an)-3.069 F F2(<escape>)
-3.069 E F1 -.1(ke)3.069 G 3.069(ym)-.05 G(ap-)-3.069 E(ping.)122 660 Q
-F0(err)97 684 Q(orbells, eb [off])-.18 E(Ex)122 696 Q F1(only)2.739 E(.)
--.65 E F0(Ex)5.239 E F1 .238
-(error messages are normally presented in in)2.738 F -.15(ve)-.4 G .238
-(rse video.).15 F .238(If that is not possible for)5.238 F .285(the terminal, setting this option causes error messages to be announced by ringing the terminal)
-122 708 R(bell.)122 720 Q EP
-%%Page: 59 58
-%%BeginPageSetup
-BP
-%%EndPageSetup
-/F0 10/Times-Bold@0 SF(Nvi/Nex Refer)72 60 Q(ence \(Options\))-.18 E
-(USD:13-59)262.77 E(exr)97 96 Q(c, ex [off])-.18 E/F1 10/Times-Roman@0
-SF 1.513(If this option is turned on in the EXINIT en)122 108 R 1.513
-(vironment v)-.4 F 1.512(ariables, or the system or $HOME)-.25 F .44
-(startup \214les, the local startup \214les are read, unless the)122 120
-R 2.941(ya)-.15 G .441(re the same as the system or $HOME)-2.941 F .868
-(startup \214les or f)122 132 R .867
-(ail to pass the standard permission checks.)-.1 F .867
-(See the section entitled \231)5.867 F F0(Startup)A(Inf)122 144 Q
-(ormation)-.25 E F1 2.5<9a66>C(or more information.)-2.5 E F0
-(extended [off])97 168 Q F1 1.303(This option causes all re)122 180 R
-1.304(gular e)-.15 F 1.304
-(xpressions to be treated as POSIX 1003.2 Extended Re)-.15 F(gular)-.15
-E(Expressions \(which are similar to historic)122 192 Q/F2 10
-/Times-Italic@0 SF -.4(eg)2.5 G -.37(re).4 G(p).37 E F1(\(1\) style e)A
-(xpressions\).)-.15 E F0(\214lec [no default])97 216 Q F1 .608
-(This option adds the ability to do shell e)122 228 R .607
-(xpansion when entering input on the colon command)-.15 F 2.852
-(line. This)122 240 R .352(option is set to a string.)2.852 F(Whene)
-5.352 E -.15(ve)-.25 G 2.852(rt).15 G .352
-(he \214rst character of that string is entered on the)-2.852 F .748(colon command line, the <blank> delimited string immediately before the cursor is e)
-122 252 R(xpanded)-.15 E .588(as if it were follo)122 264 R .589
-(wed by a)-.25 F/F3 10/Courier@0 SF(*)3.089 E F1(character)3.089 E 3.089
-(,a)-.4 G .589(nd \214le name e)-3.089 F .589(xpansion for the)-.15 F F0
-(ex)3.089 E F1 .589(edit command w)3.089 F(as)-.1 E 3.709(done. If)122
-276 R 1.208(no match is found, the screen is \215ashed and te)3.709 F
-1.208(xt input resumed.)-.15 F 1.208(If a single match)6.208 F .912
-(results, that match replaces the e)122 288 R .912(xpanded te)-.15 F
-3.412(xt. In)-.15 F .912(addition, if the single match is for a direc-)
-3.412 F(tory)122 300 Q 3.564(,a)-.65 G F3(/)A F1 1.063
-(character is appended and \214le completion is repeated.)3.563 F 1.063
-(If more than a single match)6.063 F 1.054(results, an)122 312 R 3.554
-(yu)-.15 G 1.054(nique pre\214x shared by the matches replaces the e)
--3.554 F 1.055(xpanded te)-.15 F 1.055(xt, the matches are)-.15 F
-(displayed, and te)122 324 Q(xt input resumed.)-.15 E 1.349(Because of)
-122 348 R F0(vi)3.849 E F1 2.448 -.55('s p)D 1.348
-(arsing rules, it can be dif).55 F 1.348
-(\214cult to set the path completion character to tw)-.25 F(o)-.1 E
-6.253(command v)122 360 R(alues,)-.25 E F3(<escape>)8.753 E F1(and)8.753
-E F3(<tab>)8.753 E F1 11.254(.T)C 8.754(os)-12.054 G 6.254(et it to)
--8.754 F F3(<escape>)8.754 E F1 8.754(,u)C 6.254(se \231)-8.754 F F3
-(set)A(filec=<literal-next><escape>)122 372 Q F1 14.505(\232. T)B 14.505
-(os)-.8 G 12.004(et it to)-14.505 F F3(<tab>)14.504 E F1 14.504(,u)C
-12.004(se \231)-14.504 F F3(set)A(filec=\\<tab>)122 384 Q F1<9a2e>A .049
-(If the)122 408 R F0(cedit)2.549 E F1 .049
-(edit option is set to the same character as the)2.549 F F0(\214lec)2.55
-E F1 .05(edit option,)2.55 F F0(vi)2.55 E F1 .05(will perform colon)2.55
-F .528(command-line editing if the character is entered as the \214rst character of the line, otherwise,)
-122 420 R F0(vi)3.028 E F1(will perform \214le name e)122 432 Q
-(xpansion.)-.15 E F0(\215ash [on])97 456 Q F1 .309
-(This option causes the screen to \215ash instead of beeping the k)122
-468 R -.15(ey)-.1 G .309(board, on error).15 F 2.809(,i)-.4 G 2.809(ft)
--2.809 G .309(he terminal)-2.809 F(has the capability)122 480 Q(.)-.65 E
-F0(hardtabs, ht [8])97 504 Q F1 .562
-(This option de\214nes the spacing between hardw)122 516 R .561
-(are tab settings, i.e.)-.1 F .561(the tab e)5.561 F .561
-(xpansion done by)-.15 F .71
-(the operating system and/or the terminal itself.)122 528 R(As)5.711 E
-F0(nex)3.211 E F1(/)A F0 -.4(nv)C(i).4 E F1(ne)3.211 E -.15(ve)-.25 G
-3.211(rw).15 G(rites)-3.211 E F3(<tab>)3.211 E F1 .711(characters to)
-3.211 F(the terminal, unlik)122 540 Q 2.5(eh)-.1 G(istoric v)-2.5 E
-(ersions of)-.15 E F0(ex)2.5 E F1(/)A F0(vi)A F1 2.5(,t)C
-(his option does not currently ha)-2.5 E .3 -.15(ve a)-.2 H .3 -.15
-(ny a).15 H -.25(ff).15 G(ect.).25 E F0(iclo)97 564 Q(wer [off])-.1 E F1
-(The)122 576 Q F0(iclo)3.416 E(wer)-.1 E F1 .916(edit option mak)3.416 F
-.916(es all Re)-.1 F .915(gular Expressions case-insensiti)-.15 F -.15
-(ve)-.25 G 3.415(,a).15 G 3.415(sl)-3.415 G .915(ong as an upper)-3.415
-F(-)-.2 E(case letter does not appear in the search string.)122 588 Q F0
-(ignor)97 612 Q(ecase, ic [off])-.18 E F1 .601(This option causes re)122
-624 R .601(gular e)-.15 F .601(xpressions, both in)-.15 F F0(ex)3.101 E
-F1 .602(commands and in searches, to be e)3.101 F -.25(va)-.25 G(luated)
-.25 E(in a case-insensiti)122 636 Q .3 -.15(ve m)-.25 H(anner).15 E(.)
--.55 E F0 -.1(ke)97 660 S(ytime [6]).1 E F1(The 10th')122 672 Q 2.5(so)
--.55 G 2.5(fas)-2.5 G(econd)-2.5 E F0(ex)2.5 E F1(/)A F0(vi)A F1 -.1(wa)
-2.5 G(its for a subsequent k).1 E .3 -.15(ey t)-.1 H 2.5(oc).15 G
-(omplete a k)-2.5 E .3 -.15(ey m)-.1 H(apping.).15 E F0(leftright [off])
-97 696 Q -.37(Vi)122 708 S F1(only)3.98 E 6.11(.T)-.65 G 1.11
-(his option causes the screen to be scrolled left-right to vie)-6.11 F
-3.61(wl)-.25 G 1.11(ines longer than the)-3.61 F 1.325
-(screen, instead of the traditional)122 720 R F0(vi)3.826 E F1 1.326
-(screen interf)3.826 F 1.326
-(ace which folds long lines at the right-hand)-.1 F EP
-%%Page: 60 59
-%%BeginPageSetup
-BP
-%%EndPageSetup
-/F0 10/Times-Bold@0 SF 260.27(USD:13-60 Nvi/Nex)72 60 R(Refer)2.5 E
-(ence \(Options\))-.18 E/F1 10/Times-Roman@0 SF(mar)122 96 Q
-(gin of the terminal.)-.18 E F0(lines, li [24])97 120 Q -.37(Vi)122 132
-S F1(only)2.979 E 5.109(.T)-.65 G .109
-(he number of lines in the screen.)-5.109 F .108
-(Setting this option causes)5.108 F F0(ex)2.608 E F1(/)A F0(vi)A F1 .108
-(to set \(or reset\) the)2.608 F(en)122 144 Q .905(vironmental v)-.4 F
-(ariable)-.25 E/F2 10/Courier@0 SF(LINES)3.405 E F1 5.906(.S)C .906
-(ee the section entitled \231)-5.906 F F0 .906(Sizing the Scr)B(een)-.18
-E F1 3.406<9a66>C .906(or more infor)-3.406 F(-)-.2 E(mation.)122 156 Q
-F0(lisp [off])97 180 Q -.37(Vi)122 192 S F1(only)3.334 E 5.464(.T)-.65 G
-.464(his option changes the beha)-5.464 F .464(vior of the)-.2 F F0 .464
-(vi \()2.964 F F1(,)A F0(\))2.964 E F1(,)A F0({)2.964 E F1(,)A F0(})
-2.964 E F1(,)A F0([[)2.964 E F1(and)2.964 E F0(]])2.964 E F1 .464
-(commands to match the)2.964 F(Lisp language.)122 204 Q(Also, the)5 E F0
-(autoindent)2.5 E F1(option')2.5 E 2.5(sb)-.55 G(eha)-2.5 E
-(vior is changed to be appropriate for Lisp.)-.2 E/F3 10/Times-Italic@0
-SF(This option is not yet implemented.)122 228 Q F0(list [off])97 252 Q
-F1 .377(This option causes lines to be displayed in an unambiguous f)122
-264 R 2.877(ashion. Speci\214cally)-.1 F 2.877(,t)-.65 G .378
-(abs are dis-)-2.877 F(played as control characters, i.e.)122 276 Q<99>5
-E F2(^I)A F1(\232, and the ends of lines are mark)A(ed with a \231)-.1 E
-F2($)A F1 2.5<9a63>C(haracter)-2.5 E(.)-.55 E F0(lock [on])97 300 Q F1
-.554(This option causes the editor to attempt to get an e)122 312 R
-(xclusi)-.15 E .853 -.15(ve l)-.25 H .553(ock on an).15 F 3.053<798c>
--.15 G .553(le being edited, read)-3.053 F .171(or written.)122 324 R
-.171(Reading or writing a \214le that cannot be lock)5.171 F .171
-(ed produces a w)-.1 F .172(arning message, b)-.1 F .172(ut no)-.2 F
-1.014(other ef)122 336 R 3.514(fect. Editing)-.25 F 3.514<618c>3.514 G
-1.014(le that cannot be lock)-3.514 F 1.013
-(ed results in a read only edit session, as if the)-.1 F F0 -.18(re)122
-348 S(adonly).18 E F1(edit option were set.)2.5 E F0(magic [on])97 372 Q
-F1 .538(This option is on by def)122 384 R 3.039(ault. T)-.1 F .539
-(urning the)-.45 F F0(magic)3.039 E F1 .539(option of)3.039 F 3.039(fc)
--.25 G .539(auses all re)-3.039 F .539(gular e)-.15 F .539
-(xpression char)-.15 F(-)-.2 E 1.369(acters e)122 396 R 1.369
-(xcept for \231)-.15 F F2(^)A F1 3.869<9a61>C 1.369(nd \231)-3.869 F F2
-($)A F1 1.369(\232, to be treated as ordinary characters.)B 2.968 -.8
-(To r)6.368 H 1.368(e-enable characters).8 F(indi)122 408 Q(vidually)
--.25 E 3.135(,w)-.65 G .635(hen the)-3.135 F F0(magic)3.135 E F1 .635
-(option is of)3.135 F .635(f, precede them with a backslash \231)-.25 F
-F2(\\)A F1 3.135<9a63>C(haracter)-3.135 E 5.635(.S)-.55 G(ee)-5.635 E
-(the section entitled \231)122 420 Q F0(Regular Expr)A
-(essions and Replacement Strings)-.18 E F1 2.5<9a66>C
-(or more information.)-2.5 E F0(matchtime [7])97 444 Q -.37(Vi)122 456 S
-F1(only)4.175 E 6.305(.T)-.65 G 1.305(he 10th')-6.305 F 3.805(so)-.55 G
-3.805(fas)-3.805 G(econd)-3.805 E F0(vi)3.805 E F1 1.304
-(pauses on the matching character when the)3.805 F F0(sho)3.804 E
-(wmatch)-.1 E F1(option is set.)122 468 Q F0(mesg [on])97 492 Q F1 .373
-(This option allo)122 504 R .373
-(ws other users to contact you using the)-.25 F F3(talk)2.873 E F1 .374
-(\(1\) and)B F3(write)2.874 E F1 .374(\(1\) utilities, while you)B .718
-(are editing.)122 516 R F0(Ex)5.718 E F1(/)A F0(vi)A F1 .718
-(does not turn message on, i.e. if messages were turned of)3.218 F 3.217
-(fw)-.25 G .717(hen the editor)-3.217 F -.1(wa)122 528 S 2.99(si).1 G
--1.9 -.4(nv o)-2.99 H -.1(ke).4 G .49(d, the).1 F 2.99(yw)-.15 G .49
-(ill stay turned of)-2.99 F 2.991(f. This)-.25 F .491
-(option only permits you to disallo)2.991 F 2.991(wm)-.25 G .491
-(essages for)-2.991 F(the edit session.)122 540 Q(See the)5 E F3(mesg)
-2.5 E F1(\(1\) utility for more information.)A F0(msgcat [./])97 564 Q
-F1 .081(This option selects a message catalog to be used to display error and informational messages in)
-122 576 R 3.268(as)122 588 S .768(peci\214ed language.)-3.268 F .768
-(If the v)5.768 F .769
-(alue of this option ends with a '/', it is treated as the name of a)
--.25 F 2.026(directory that contains a message catalog \231)122 600 R F2
-(vi_XXXX)A F1 2.025(\232, where \231)B F2(XXXX)A F1 4.525<9a69>C 4.525
-(st)-4.525 G 2.025(he v)-4.525 F 2.025(alue of the)-.25 F F2(LANG)122
-612 Q F1(en)4.028 E 1.528(vironmental v)-.4 F 1.528(ariable, if it')-.25
-F 4.028(ss)-.55 G 1.528(et, or the v)-4.028 F 1.529(alue of the)-.25 F
-F2(LC_MESSAGES)4.029 E F1(en)4.029 E(vironmental)-.4 E -.25(va)122 624 S
-.596(riable if it').25 F 3.096(sn)-.55 G 3.096(ot. If)-3.096 F .596
-(neither of those en)3.096 F .596(vironmental v)-.4 F .595
-(ariables are set, or if the option doesn')-.25 F(t)-.18 E(end in a '/', the option is treated as the full path name of the message catalog to use.)
-122 636 Q(If an)122 660 Q 2.5(ym)-.15 G
-(essages are missing from the catalog, the backup te)-2.5 E
-(xt \(English\) is used instead.)-.15 E 3.118(See the distrib)122 684 R
-3.118(ution \214le)-.2 F F2(catalog/README)5.618 E F1 3.118
-(for additional information on b)5.618 F 3.118(uilding and)-.2 F
-(installing message catalogs.)122 696 Q EP
-%%Page: 61 60
-%%BeginPageSetup
-BP
-%%EndPageSetup
-/F0 10/Times-Bold@0 SF(Nvi/Nex Refer)72 60 Q(ence \(Options\))-.18 E
-(USD:13-61)262.77 E(modelines, modeline [off])97 96 Q/F1 10
-/Times-Roman@0 SF .292(If the)122 108 R F0(modelines)2.792 E F1 .292
-(option is set,)2.792 F F0(ex)2.792 E F1(/)A F0(vi)A F1 .292
-(has historically scanned the \214rst and last \214v)2.792 F 2.791(el)
--.15 G .291(ines of each)-2.791 F .358
-(\214le as it is read for editing, looking for an)122 120 R(y)-.15 E F0
-(ex)2.858 E F1 .358(commands that ha)2.858 F .658 -.15(ve b)-.2 H .358
-(een placed in those lines.).15 F .204(After the startup information has been processed, and before the user starts editing the \214le, an)
-122 132 R(y)-.15 E(commands embedded in the \214le are e)122 144 Q -.15
-(xe)-.15 G(cuted.).15 E .624
-(Commands were recognized by the letters \231e\232 or \231v\232 follo)
-122 168 R .625(wed by \231x\232 or \231i\232, at the be)-.25 F(ginning)
--.15 E 1.263(of a line or follo)122 180 R 1.262
-(wing a tab or space character)-.25 F 3.762(,a)-.4 G 1.262(nd follo)
--3.762 F 1.262(wed by a \231:\232, an)-.25 F F0(ex)3.762 E F1 1.262
-(command, and)3.762 F(another \231:\232.)122 192 Q .886(This option is a security problem of immense proportions, and should not be used under an)
-122 216 R(y)-.15 E(circumstances.)122 228 Q/F2 10/Times-Italic@0 SF
-(This option will ne)122 252 Q(ver be implemented.)-.15 E F0
-(noprint [""])97 276 Q F1 1.226(Characters that are ne)122 288 R -.15
-(ve)-.25 G 3.726(rh).15 G 1.225(andled as printable characters.)-3.726 F
-1.225(By def)6.225 F 1.225(ault, the C library function)-.1 F F2
-(isprint)122 300 Q F1 .355
-(\(3\) is used to determine if a character is printable or not.)B .355
-(This edit option o)5.355 F -.15(ve)-.15 G .355(rrides that).15 F
-(decision.)122 312 Q F0(number)97 336 Q 2.5(,n)-.92 G 2.5(u[)-2.5 G
-(off])-2.5 E F1
-(Precede each line displayed with its current line number)122 348 Q(.)
--.55 E F0(octal [off])97 372 Q F1 1.337(Display unkno)122 384 R 1.337
-(wn characters as octal numbers \(\231)-.25 F/F3 10/Courier@0 SF(\\###)A
-F1 1.336(\232\), instead of the def)B 1.336(ault he)-.1 F(xadecimal)-.15
-E<2899>122 396 Q F3(\\x##)A F1<9a292e>A F0(open [on])97 420 Q(Ex)122 432
-Q F1(only)2.5 E 5(.I)-.65 G 2.5(ft)-5 G(his option is not set, the)-2.5
-E F0(open)2.5 E F1(and)2.5 E F0(visual)2.5 E F1(commands are disallo)2.5
-E(wed.)-.25 E F0(optimize, opt [on])97 456 Q -.37(Vi)122 468 S F1(only)
-3.704 E 5.834(.T)-.65 G .834(hroughput of te)-5.834 F .834(xt is e)-.15
-F .835(xpedited by setting the terminal not to do automatic carriage)
--.15 F .364(returns when printing more than one \(logical\) line of output, greatly speeding output on termi-)
-122 480 R(nals without addressable cursors when te)122 492 Q
-(xt with leading white space is printed.)-.15 E F2
-(This option is not yet implemented.)122 516 Q F0
-(paragraphs, para [IPLPPPQPP LIpplpipbp])97 540 Q -.37(Vi)122 552 S F1
-(only)3.4 E 5.53(.D)-.65 G .53
-(e\214ne additional paragraph boundaries for the)-5.53 F F0({)3.03 E F1
-(and)3.03 E F0(})3.03 E F1 3.03(commands. The)3.03 F -.25(va)3.03 G .53
-(lue of this).25 F(option must be a character string consisting of zero or more character pairs.)
-122 564 Q 1.004(In the te)122 588 R 1.004
-(xt to be edited, the character string)-.15 F F3(<newline>.<char-pair>)
-3.503 E F1 3.503(,\()C(where)-3.503 E F3(<char-)3.503 E(pair>)122 600 Q
-F1 .745(is one of the character pairs in the option')3.245 F 3.245(sv)
--.55 G .746(alue\) de\214nes a paragraph boundary)-3.495 F 5.746(.F)-.65
-G(or)-5.896 E -.15(ex)122 612 S .508(ample, if the option were set to)
-.15 F F3(LaA<space>##)3.008 E F1 3.008(,t)C .508(hen all of the follo)
--3.008 F .507(wing additional para-)-.25 F(graph boundaries w)122 624 Q
-(ould be recognized:)-.1 E(<ne)162 652.2 Q(wline>.La)-.25 E(<ne)162
-664.2 Q(wline>.A<space>)-.25 E(<ne)162 676.2 Q(wline>.##)-.25 E F0
-(print [""])97 704.4 Q F1 .782(Characters that are al)122 716.4 R -.1
-(wa)-.1 G .782(ys handled as printable characters.).1 F .782(By def)
-5.782 F .783(ault, the C library function)-.1 F EP
-%%Page: 62 61
-%%BeginPageSetup
-BP
-%%EndPageSetup
-/F0 10/Times-Bold@0 SF 260.27(USD:13-62 Nvi/Nex)72 60 R(Refer)2.5 E
-(ence \(Options\))-.18 E/F1 10/Times-Italic@0 SF(isprint)122 96 Q/F2 10
-/Times-Roman@0 SF .355
-(\(3\) is used to determine if a character is printable or not.)B .355
-(This edit option o)5.355 F -.15(ve)-.15 G .355(rrides that).15 F
-(decision.)122 108 Q F0(pr)97 132 Q(ompt [on])-.18 E(Ex)122 144 Q F2
-(only)2.975 E 5.475(.T)-.65 G .475(his option causes)-5.475 F F0(ex)
-2.975 E F2 .475(to prompt for command input with a \231)2.975 F/F3 10
-/Courier@0 SF(:)A F2 2.976<9a63>C .476(haracter; when it is)-2.976 F
-(not set, no prompt is displayed.)122 156 Q F0 -.18(re)97 180 S(adonly)
-.18 E 2.5(,r)-.55 G 2.5(o[)-2.68 G(off])-2.5 E F2 .328(This option causes a force \215ag to be required to attempt to write the \214le.)
-122 192 R .328(Setting this option is)5.328 F(equi)122 204 Q -.25(va)
--.25 G .66(lent to using the).25 F F0<ad52>3.16 E F2 .661
-(command line option, or e)3.16 F -.15(xe)-.15 G .661(cuting the).15 F
-F0(vi)3.161 E F2 .661(program using the name)3.161 F F0(view)122 216 Q
-F2(.)A(The)122 240 Q F0 -.18(re)2.866 G(adonly).18 E F2 .366
-(edit option is not usually persistent, lik)2.866 F 2.865(eo)-.1 G .365
-(ther edit options.)-2.865 F .365(If the)5.365 F F0<ad52>2.865 E F2
-(command)2.865 E .717(line option is set,)122 252 R F0(vi)3.217 E F2
-.717(is e)3.217 F -.15(xe)-.15 G .717(cuted as).15 F F0(view)3.217 E F2
-3.217(,o)C 3.217(rt)-3.217 G(he)-3.217 E F0 -.18(re)3.217 G(adonly).18 E
-F2 .717(edit option is e)3.217 F .718(xplicitly set, all \214les)-.15 F
-.379(edited in the screen will be mark)122 264 R .379(ed readonly)-.1 F
-2.879(,a)-.65 G .379
-(nd the force \215ag will be required to write them.)-2.879 F(Ho)122 276
-Q(we)-.25 E -.15(ve)-.25 G 1.694 -.4(r, i).15 H 3.394(fn).4 G .895
-(one of these conditions are true, or the)-3.394 F F0 -.18(re)3.395 G
-(adonly).18 E F2 .895(edit option is e)3.395 F .895(xplicitly unset,)
--.15 F .906(then the)122 288 R F0 -.18(re)3.406 G(adonly).18 E F2 .906(edit option will toggle based on the write permissions of the \214le currently)
-3.406 F 1.405(being edited as of when it is loaded into the edit b)122
-300 R(uf)-.2 E(fer)-.25 E 6.405(.I)-.55 G 3.905(no)-6.405 G 1.405
-(ther w)-3.905 F 1.405(ords, the)-.1 F F0 -.18(re)3.905 G(adonly).18 E
-F2(edit)3.905 E .546(option will be set if the current \214le lacks write permissions, and will not be set if the user has)
-122 312 R(write permissions for the \214le.)122 324 Q F0 -.18(re)97 348
-S(cdir [/v).18 E(ar/tmp/vi.r)-.1 E(eco)-.18 E -.1(ve)-.1 G(r]).1 E F2
-(The directory where reco)122 360 Q -.15(ve)-.15 G
-(ry \214les are stored.).15 E .06(If you change the v)122 384 R .06
-(alue of)-.25 F F0 -.18(re)2.56 G(cdir).18 E F2 2.56(,b)C 2.561(ec)-2.56
-G .061(areful to choose a directory whose contents are not re)-2.561 F
-(gu-)-.15 E .341(larly deleted.)122 396 R .341
-(Bad choices include directories in memory based \214lesystems, or)5.341
-F F3(/tmp)2.84 E F2 2.84(,o)C 2.84(nm)-2.84 G(ost)-2.84 E
-(systems, as their contents are remo)122 408 Q -.15(ve)-.15 G 2.5(dw).15
-G(hen the machine is rebooted.)-2.5 E .535(Public directories lik)122
-432 R(e)-.1 E F3(/usr/tmp)3.035 E F2(and)3.035 E F3(/var/tmp)3.035 E F2
-.535(are usually safe, although some sites peri-)3.035 F 1.106
-(odically prune old \214les from them.)122 444 R 1.106
-(There is no requirement that you use a public directory)6.106 F(,)-.65
-E(e.g. a sub-directory of your home directory will w)122 456 Q
-(ork \214ne.)-.1 E(Finally)122 480 Q 3.409(,i)-.65 G 3.409(fy)-3.409 G
-.909(ou change the v)-3.409 F .909(alue of)-.25 F F0 -.18(re)3.409 G
-(cdir).18 E F2 3.409(,y)C .909(ou must modify the reco)-3.409 F -.15(ve)
--.15 G .91(ry script to operate in).15 F(your chosen reco)122 492 Q -.15
-(ve)-.15 G(ry area.).15 E(See the section entitled \231)122 516 Q F0
-(Reco)A -.1(ve)-.1 G(ry).1 E F2 2.5<9a66>C(or further information.)-2.5
-E F0 -.18(re)97 540 S(draw).18 E 2.5(,r)-.55 G 2.5(e[)-2.68 G(off])-2.5
-E -.37(Vi)122 552 S F2(only)4.457 E 6.587(.T)-.65 G 1.586(he editor simulates \(using great amounts of output\), an intelligent terminal on a)
--6.587 F .06(dumb terminal \(e.g. during insertions in)122 564 R F0(vi)
-2.56 E F2 .061(the characters to the right of the cursor are refreshed)
-2.561 F(as each input character is typed\).)122 576 Q F1
-(This option is not yet implemented.)122 600 Q F0 -.18(re)97 624 S
-(map [on]).18 E F2 .692(If this option is set, it is possible to de\214ne macros in terms of other macros.)
-122 636 R .691(Otherwise, each)5.691 F -.1(ke)122 648 S 4.36(yi)-.05 G
-4.36(so)-4.36 G 1.86(nly remapped up to one time.)-4.36 F -.15(Fo)6.86 G
-4.361(re).15 G 1.861(xample, if \231)-4.511 F F3(A)A F2 4.361<9a69>C
-4.361(sm)-4.361 G 1.861(apped to \231)-4.361 F F3(B)A F2 1.861
-(\232, and \231)B F3(B)A F2 4.361<9a69>C(s)-4.361 E .029(mapped to \231)
-122 660 R F3(C)A F2 .029(\232, The k)B -.15(ey)-.1 G(strok).15 E 2.529
-<6599>-.1 G F3(A)-2.529 E F2 2.529<9a77>C .029(ill be mapped to \231)
--2.529 F F3(C)A F2 2.528<9a69>C 2.528(ft)-2.528 G(he)-2.528 E F0 -.18
-(re)2.528 G(map).18 E F2 .028(option is set, and to \231)2.528 F F3(B)A
-F2<9a>A(if it is not set.)122 672 Q F0 -.18(re)97 696 S(port [5]).18 E
-F2 .798(Set the threshold of the number of lines that need to be changed or yank)
-122 708 R .799(ed before a message)-.1 F 1.017
-(will be displayed to the user)122 720 R 6.017(.F)-.55 G 1.017(or e)
--6.167 F -.15(ve)-.25 G 1.017(rything b).15 F 1.017
-(ut the yank command, the v)-.2 F 1.016(alue is the lar)-.25 F(gest)-.18
-E EP
-%%Page: 63 62
-%%BeginPageSetup
-BP
-%%EndPageSetup
-/F0 10/Times-Bold@0 SF(Nvi/Nex Refer)72 60 Q(ence \(Options\))-.18 E
-(USD:13-63)262.77 E/F1 10/Times-Roman@0 SF -.25(va)122 96 S .411
-(lue about which the editor is silent, i.e. by def).25 F .411
-(ault, 6 lines must be deleted before the user is)-.1 F 2.97
-(noti\214ed. Ho)122 108 R(we)-.25 E -.15(ve)-.25 G 1.27 -.4(r, i).15 H
-2.97(ft).4 G .47(he number of lines yank)-2.97 F .469
-(ed is greater than)-.1 F/F2 10/Times-Italic@0 SF .469(or equal to)2.969
-F F1 .469(the set v)2.969 F .469(alue, it is)-.25 F
-(reported to the user)122 120 Q(.)-.55 E F0(ruler [off])97 144 Q -.37
-(Vi)122 156 S F1(only)2.87 E 5(.D)-.65 G(isplay a ro)-5 E
-(w/column ruler on the colon command line.)-.25 E F0(scr)97 180 Q
-(oll, scr [\(en)-.18 E(vir)-.4 E(onment v)-.18 E
-(ariable LINES - 1\) / 2])-.1 E F1
-(Set the number of lines scrolled by the)122 192 Q F0(ex <contr)2.5 E
-(ol-D>)-.18 E F1(and)2.5 E F0(<end-of-\214le>)2.5 E F1(commands.)2.5 E
-(Historically)122 216 Q 2.796(,t)-.65 G(he)-2.796 E F0 .296(ex z)2.796 F
-F1 .296(command, when speci\214ed without a count, used tw)2.796 F 2.796
-(ot)-.1 G .297(imes the size of the)-2.796 F(scroll v)122 228 Q
-(alue; the POSIX 1003.2 standard speci\214ed the windo)-.25 E 2.5(ws)
--.25 G(ize, which is a better choice.)-2.5 E F0(sear)97 252 Q
-(chincr [off])-.18 E F1(The)122 264 Q F0(sear)2.898 E(chincr)-.18 E F1
-.398(edit option mak)2.898 F .397(es the search commands)-.1 F F0(/)
-2.897 E F1(and)2.897 E F0(?)2.897 E F1 .397
-(incremental, i.e. the screen is)5.397 F 1.685
-(updated and the cursor mo)122 276 R -.15(ve)-.15 G 4.185(st).15 G 4.185
-(ot)-4.185 G 1.686(he matching te)-4.185 F 1.686
-(xt as the search pattern is entered.)-.15 F 1.686(If the)6.686 F .176(search pattern is not found, the screen is beeped and the cursor remains on the colon-command)
-122 288 R 3.182(line. Erasing)122 300 R .683
-(characters from the search pattern backs the cursor up to the pre)3.182
-F .683(vious matching)-.25 F(te)122 312 Q(xt.)-.15 E F0
-(sections, sect [NHSHH HUnhsh])97 336 Q -.37(Vi)122 348 S F1(only)3.01 E
-5.14(.D)-.65 G .14(e\214ne additional section boundaries for the)-5.14 F
-F0([[)2.64 E F1(and)2.64 E F0(]])2.64 E F1 2.64(commands. The)2.64 F F0
-(sections)2.64 E F1(option)2.64 E .525(should be set to a character string consisting of zero or more character pairs.)
-122 360 R .526(In the te)5.526 F .526(xt to be)-.15 F 1.025
-(edited, the character string)122 372 R/F3 10/Courier@0 SF
-(<newline>.<char-pair>)3.525 E F1 3.524(,\()C(where)-3.524 E F3
-(<char-pair>)3.524 E F1 1.024(is one of)3.524 F .821
-(the character pairs in the option')122 384 R 3.321(sv)-.55 G .822
-(alue\), de\214nes a section boundary in the same manner that)-3.571 F
-F0(paragraph)122 396 Q F1(option boundaries are de\214ned.)2.5 E F0
-(secur)97 420 Q 2.5(e[)-.18 G(off])-2.5 E F1(The)122 432 Q F0(secur)
-3.038 E(e)-.18 E F1 .538(edit option turns of)3.038 F 3.038(fa)-.25 G
-.538(ll access to e)-3.038 F .538(xternal programs.)-.15 F .538
-(This means that the v)5.538 F(ersions)-.15 E .116(of the)122 444 R F0
--.18(re)2.616 G(ad).18 E F1(and)2.617 E F0(write)2.617 E F1 .117
-(commands that \214lter te)2.617 F .117(xt through other programs, the)
--.15 F F0 .117(vi !)2.617 F F1(and)5.117 E F0(<contr)2.617 E(ol-)-.18 E
-(Z>)122 456 Q F1 .938(commands, the)3.438 F F0 .938(ex !)3.438 F F1(,)A
-F0(script)3.438 E F1(,)A F0(shell)3.438 E F1(,)A F0(stop)3.438 E F1(and)
-3.438 E F0(suspend)3.438 E F1 .938(commands and \214le name e)3.438 F
-(xpansion)-.15 E(will not be permitted.)122 468 Q(Once set, the)5 E F0
-(secur)2.5 E(e)-.18 E F1(edit option may not be unset.)2.5 E F0
-(shell, sh [en)97 492 Q(vir)-.4 E(onment v)-.18 E
-(ariable SHELL, or /bin/sh])-.1 E F1 .504
-(Select the shell used by the editor)122 504 R 5.504(.T)-.55 G .504
-(he speci\214ed path is the pathname of the shell in)-5.504 F -.2(vo)-.4
-G -.1(ke).2 G 3.005(db).1 G(y)-3.005 E(the)122 516 Q F0 1.068(vi !)3.568
-F F1 1.068(shell escape command and by the)6.068 F F0 1.068(ex shell)
-3.568 F F1 3.567(command. This)3.568 F 1.067(program is also used to)
-3.567 F(resolv)122 528 Q 2.5(ea)-.15 G .3 -.15(ny s)-2.5 H
-(hell meta-characters in).15 E F0(ex)2.5 E F1(commands.)2.5 E F0
-(shellmeta [~{[*?$`'"\\])97 552 Q F1 .647(The set of characters that)122
-564 R F0(ex)3.147 E F1 .648(checks for when doing \214le name e)3.147 F
-3.148(xpansion. If)-.15 F(an)3.148 E 3.148(yo)-.15 G 3.148(ft)-3.148 G
-.648(he speci-)-3.148 F 1.089
-(\214ed characters are found in the \214le name ar)122 576 R 1.089
-(guments to the)-.18 F F0(ex)3.588 E F1 1.088(commands, the ar)3.588 F
-1.088(guments are)-.18 F -.15(ex)122 588 S 1.506
-(panded using the program de\214ned by the).15 F F0(shell)4.006 E F1
-4.006(option. The)4.006 F(def)4.006 E 1.506(ault set of characters is a)
--.1 F(union of meta characters from the V)122 600 Q
-(ersion 7 and the Berk)-1.11 E(ele)-.1 E 2.5(yCs)-.15 G(hell.)-2.5 E F0
-(shiftwidth, sw [8])97 624 Q F1 .103
-(Set the autoindent and shift command indentation width.)122 636 R .103
-(This width is used by the)5.103 F F0(autoindent)2.602 E F1
-(option and by the)122 648 Q F0(<)2.5 E F1(,)A F0(>)2.5 E F1 2.5(,a)C
-(nd)-2.5 E F0(shift)2.5 E F1(commands.)2.5 E F0(sho)97 672 Q
-(wmatch, sm [off])-.1 E -.37(Vi)122 684 S F1(only)3.841 E 5.971(.T)-.65
-G .971(his option causes)-5.971 F F0(vi)3.471 E F1 3.471(,w)C .972
-(hen a \231)-3.471 F F3(})A F1 3.472<9a6f>C 3.472<7299>-3.472 G F3(\))
--3.472 E F1 3.472<9a69>C 3.472(se)-3.472 G .972(ntered, to brie\215y mo)
--3.472 F 1.272 -.15(ve t)-.15 H .972(he cursor the).15 F(matching \231)
-122 696 Q F3({)A F1 2.5<9a6f>C 2.5<7299>-2.5 G F3(\()-2.5 E F1 2.5
-(\232. See)B(the)2.5 E F0(matchtime)2.5 E F1
-(option for more information.)2.5 E EP
-%%Page: 64 63
-%%BeginPageSetup
-BP
-%%EndPageSetup
-/F0 10/Times-Bold@0 SF 260.27(USD:13-64 Nvi/Nex)72 60 R(Refer)2.5 E
-(ence \(Options\))-.18 E(sho)97 96 Q(wmode [off])-.1 E -.37(Vi)122 108 S
-/F1 10/Times-Roman@0 SF(only)3.929 E 6.059(.T)-.65 G 1.058
-(his option causes)-6.059 F F0(vi)3.558 E F1 1.058
-(to display a string identifying the current editor mode on the)3.558 F
-.43(colon command line.)122 120 R .43
-(The string is preceded by an asterisk \(`)5.43 F(`*')-.74 E .43
-('\) if the \214le has been modi\214ed)-.74 F(since it w)122 132 Q
-(as last completely written,)-.1 E F0(sidescr)97 156 Q(oll [16])-.18 E
--.37(Vi)122 168 S F1(only)3.294 E 5.424(.S)-.65 G .424
-(ets the number of columns that are shifted to the left or right, when)
--5.424 F F0(vi)2.923 E F1 .423(is doing left-)2.923 F .568
-(right scrolling and the left or right mar)122 180 R .569
-(gin is crossed.)-.18 F .569(See the)5.569 F F0(leftright)3.069 E F1
-.569(option for more infor)3.069 F(-)-.2 E(mation.)122 192 Q F0(slo)97
-216 Q -.1(wo)-.1 G(pen, slo).1 E 2.5(w[)-.1 G(off])-2.5 E F1 .438
-(This option af)122 228 R .437(fects the display algorithm used by)-.25
-F F0(vi)2.937 E F1 2.937(,h)C .437(olding of)-2.937 F 2.937(fd)-.25 G
-.437(isplay updating during input)-2.937 F(of ne)122 240 Q 2.5(wt)-.25 G
--.15(ex)-2.5 G 2.5(tt).15 G 2.5(oi)-2.5 G(mpro)-2.5 E .3 -.15(ve t)-.15
-H(hroughput when the terminal in use is slo).15 E 2.5(wa)-.25 G
-(nd unintelligent.)-2.5 E/F2 10/Times-Italic@0 SF
-(This option is not yet implemented.)122 264 Q F0(sour)97 288 Q
-(ceany [off])-.18 E F1 .612(If this option is turned on,)122 300 R F0
-(vi)3.112 E F1 .612(historically read startup \214les that were o)3.112
-F .612(wned by someone other)-.25 F 1.465(than the editor user)122 312 R
-6.464(.S)-.55 G 1.464(ee the section entitled \231)-6.464 F F0 1.464
-(Startup Inf)B(ormation)-.25 E F1 3.964<9a66>C 1.464
-(or more information.)-3.964 F .886(This option is a security problem of immense proportions, and should not be used under an)
-122 324 R(y)-.15 E(circumstances.)122 336 Q F2(This option will ne)122
-360 Q(ver be implemented.)-.15 E F0(tabstop, ts [8])97 384 Q F1
-(This option sets tab widths for the editor display)122 396 Q(.)-.65 E
-F0(taglength, tl [0])97 420 Q F1 1.416(This option sets the maximum number of characters that are considered signi\214cant in a tag)
-122 432 R 2.5(name. Setting)122 444 R(the v)2.5 E(alue to 0 mak)-.25 E
-(es all of the characters in the tag name signi\214cant.)-.1 E F0
-(tags, tag [tags /v)97 468 Q(ar/db/libc.tags /sys/k)-.1 E(er)-.1 E
-(n/tags])-.15 E F1(Sets the list of tags \214les, in search order)122
-480 Q 2.5(,w)-.4 G(hich are used when the editor searches for a tag.)
--2.5 E F0(term, ttytype, tty [en)97 504 Q(vir)-.4 E(onment v)-.18 E
-(ariable TERM])-.1 E F1 .568(Set the terminal type.)122 516 R .568
-(Setting this option causes)5.568 F F0(ex)3.068 E F1(/)A F0(vi)A F1 .568
-(to set \(or reset\) the en)3.068 F .568(vironmental v)-.4 F(ari-)-.25 E
-(able)122 528 Q/F3 10/Courier@0 SF(TERM)2.5 E F1(.)A F0(terse [off])97
-552 Q F1 .589(This option has historically made editor messages less v)
-122 564 R 3.089(erbose. It)-.15 F .588(has no ef)3.089 F .588
-(fect in this imple-)-.25 F 2.5(mentation. See)122 576 R(the)2.5 E F0
--.1(ve)2.5 G(rbose).1 E F1(option for more information.)2.5 E F0
-(tildeop)97 600 Q F1(Modify the)122 612 Q F0(~)2.5 E F1(command to tak)
-2.5 E 2.5(ea)-.1 G 2.5(na)-2.5 G(ssociated motion.)-2.5 E F0
-(timeout, to [on])97 636 Q F1 1.057(If this option is set,)122 648 R F0
-(ex)3.558 E F1(/)A F0(vi)A F1 -.1(wa)3.558 G 1.058
-(its for a speci\214c period for a subsequent k).1 F 1.358 -.15(ey t)-.1
-H 3.558(oc).15 G 1.058(omplete a k)-3.558 F -.15(ey)-.1 G .694
-(mapping \(see the)122 660 R F0 -.1(ke)3.193 G(ytime).1 E F1 3.193
-(option\). If)3.193 F .693(the option is not set, the editor w)3.193 F
-.693(aits until enough k)-.1 F -.15(ey)-.1 G(s).15 E
-(are entered to resolv)122 672 Q 2.5(et)-.15 G(he ambiguity)-2.5 E 2.5
-(,r)-.65 G -2.25 -.15(eg a)-2.5 H(rdless of ho).15 E 2.5(wl)-.25 G
-(ong it tak)-2.5 E(es.)-.1 E F0(ttywerase [off])97 696 Q -.37(Vi)122 708
-S F1(only)3.731 E 5.861(.T)-.65 G .861(his option changes ho)-5.861 F(w)
--.25 E F0(vi)3.362 E F1 .862(does w)3.362 F .862(ord erase during te)-.1
-F .862(xt input.)-.15 F .862(If this option is set,)5.862 F(te)122 720 Q
-.87(xt is brok)-.15 F .87(en up into tw)-.1 F 3.37(oc)-.1 G .87
-(lasses, blank characters and nonblank characters.)-3.37 F .87
-(Changing from)5.87 F EP
-%%Page: 65 64
-%%BeginPageSetup
-BP
-%%EndPageSetup
-/F0 10/Times-Bold@0 SF(Nvi/Nex Refer)72 60 Q(ence \(Options\))-.18 E
-(USD:13-65)262.77 E/F1 10/Times-Roman@0 SF
-(one class to another marks the end of a w)122 96 Q(ord.)-.1 E F0 -.1
-(ve)97 120 S(rbose [off]).1 E -.37(Vi)122 132 S F1(only)3.328 E(.)-.65 E
-F0 -.37(Vi)5.458 G F1 .459(historically bells the terminal for man)3.328
-F 2.959(yo)-.15 G -.15(bv)-2.959 G .459(ious mistak).15 F .459
-(es, e.g. trying to mo)-.1 F .759 -.15(ve p)-.15 H(ast).15 E .776
-(the left-hand mar)122 144 R .775(gin, or past the end of the \214le.)
--.18 F .775(If this option is set, an error message is dis-)5.775 F
-(played for all errors.)122 156 Q F0(w300 [no default])97 180 Q -.37(Vi)
-122 192 S F1(only)3.49 E 5.62(.S)-.65 G .62(et the windo)-5.62 F 3.12
-(ws)-.25 G .621(ize if the baud rate is less than 1200 baud.)-3.12 F
-.621(See the)5.621 F F0(windo)3.121 E(w)-.1 E F1(option)3.121 E
-(for more information.)122 204 Q F0(w1200 [no default])97 228 Q -.37(Vi)
-122 240 S F1(only)3.645 E 5.775(.S)-.65 G .775(et the windo)-5.775 F
-3.275(ws)-.25 G .775(ize if the baud rate is equal to 1200 baud.)-3.275
-F .775(See the)5.775 F F0(windo)3.275 E(w)-.1 E F1(option)3.275 E
-(for more information.)122 252 Q F0(w9600 [no default])97 276 Q -.37(Vi)
-122 288 S F1(only)4.427 E 6.557(.S)-.65 G 1.557(et the windo)-6.557 F
-4.057(ws)-.25 G 1.557(ize if the baud rate is greater than 1200 baud.)
--4.057 F 1.557(See the)6.557 F F0(windo)4.058 E(w)-.1 E F1
-(option for more information.)122 300 Q F0(war)97 324 Q 2.5(n[)-.15 G
-(on])-2.5 E(Ex)122 336 Q F1(only)3.317 E 5.817(.T)-.65 G .817
-(his option causes a w)-5.817 F .816
-(arning message to the terminal if the \214le has been modi\214ed,)-.1 F
-(since it w)122 348 Q(as last written, before a)-.1 E F0(!)2.5 E F1
-(command.)5 E F0(windo)97 372 Q 1.1 -.55(w, w, w)-.1 H 2.5(i[).55 G(en)
--2.5 E(vir)-.4 E(onment v)-.18 E(ariable LINES - 1])-.1 E F1 .742
-(This option determines the def)122 384 R .743
-(ault number of lines in a screenful, as displayed by the)-.1 F F0(z)
-3.243 E F1(com-)3.243 E 3.393(mand. It)122 396 R .892
-(also determines the number of lines scrolled by the)3.393 F F0(vi)3.392
-E F1(commands)3.392 E F0(<contr)3.392 E(ol-B>)-.18 E F1(and)3.392 E F0
-(<contr)122 408 Q(ol-F>)-.18 E F1 3.418(,a)C .918(nd the def)-3.418 F
-.918(ault number of lines scrolled by the)-.1 F F0(vi)3.419 E F1
-(commands)3.419 E F0(<contr)3.419 E(ol-D>)-.18 E F1(and)3.419 E F0
-(<contr)122 420 Q(ol-U>)-.18 E F1 5.61(.T)C .61(he v)-5.61 F .61
-(alue of windo)-.25 F 3.11(wc)-.25 G .609
-(an be unrelated to the real screen size, although it starts)-3.11 F
-.083(out as the number of lines on the screen.)122 432 R .083
-(See the section entitled \231)5.083 F F0 .083(Sizing the Scr)B(een)-.18
-E F1 2.583<9a66>C .083(or more)-2.583 F 3.63(information. Setting)122
-444 R 1.13(the v)3.63 F 1.13(alue of the)-.25 F F0(windo)3.629 E(w)-.1 E
-F1 1.129(option is the same as using the)3.629 F F0<ad77>3.629 E F1
-(command)3.629 E(line option.)122 456 Q .717(If the v)122 480 R .717
-(alue of the)-.25 F F0(windo)3.217 E(w)-.1 E F1 .717
-(option \(as set by the)3.217 F F0(windo)3.217 E(w)-.1 E F1(,)A F0(w300)
-3.217 E F1(,)A F0(w1200)3.217 E F1(or)3.217 E F0(w9600)3.217 E F1 .718
-(options\) is)3.217 F .096
-(smaller than the actual size of the screen, lar)122 492 R .095
-(ge screen mo)-.18 F -.15(ve)-.15 G .095
-(ments will result in displaying only).15 F .182
-(that smaller number of lines on the screen.)122 504 R .182
-(\(Further mo)5.182 F -.15(ve)-.15 G .182
-(ments in that same area will result in).15 F .439
-(the screen being \214lled.\))122 516 R .438(This can pro)5.439 F .438
-(vide a performance impro)-.15 F -.15(ve)-.15 G .438(ment when vie).15 F
-.438(wing dif)-.25 F(ferent)-.25 E(places in one or more \214les o)122
-528 Q -.15(ve)-.15 G 2.5(ras).15 G(lo)-2.5 E 2.5(wl)-.25 G(ink.)-2.5 E
-.403(Resetting the windo)122 552 R 2.903(ws)-.25 G .403
-(ize does not reset the def)-2.903 F .404
-(ault number of lines scrolled by the)-.1 F F0(<contr)2.904 E(ol-)-.18 E
-(D>)122 564 Q F1(and)2.5 E F0(<contr)2.5 E(ol-U>)-.18 E F1(commands.)2.5
-E F0(wraplen, wl [0])97 588 Q F1 .114(This option is identical to the)
-122 600 R F0(wrapmar)2.613 E(gin)-.1 E F1 .113(option, with the e)2.613
-F .113(xception that it speci\214es the num-)-.15 F
-(ber of columns from the)122 612 Q/F2 10/Times-Italic@0 SF(left)2.5 E F1
-(mar)2.5 E(gin before the line splits, not the right mar)-.18 E(gin.)
--.18 E(If both)122 636 Q F0(wraplen)2.5 E F1(and)2.5 E F0(wrapmar)2.5 E
-(gin)-.1 E F1(are set, the)2.5 E F0(wrapmar)2.5 E(gin)-.1 E F1 -.25(va)
-2.5 G(lue is used.).25 E F0(wrapmar)97 660 Q(gin, wm [0])-.1 E -.37(Vi)
-122 672 S F1(only)3.205 E 5.335(.I)-.65 G 2.835(ft)-5.335 G .335(he v)
--2.835 F .335(alue of the)-.25 F F0(wrapmar)2.835 E(gin)-.1 E F1 .336
-(option is non-zero,)2.835 F F0(vi)2.836 E F1 .336
-(will split lines so that the)2.836 F 2.836(ye)-.15 G(nd)-2.836 E .175
-(at least that number of columns before the right-hand mar)122 684 R
-.174(gin of the screen.)-.18 F .174(\(Note, the v)5.174 F .174(alue of)
--.25 F F0(wrapmar)122 696 Q(gin)-.1 E F1(is)3.382 E F2(not)3.382 E F1
-3.382(at)3.382 G -.15(ex)-3.382 G 3.382(tl).15 G 3.382(ength. In)-3.382
-F 3.382(as)3.382 G .883(creen that is 80 columns wide, the command \231)
--3.382 F/F3 10/Courier@0 SF(:set)A(wrapmargin=8)122 708 Q F1 2.5<9a61>C
-(ttempts to k)-2.5 E
-(eep the lines less than or equal to 72 columns wide.\))-.1 E EP
-%%Page: 66 65
-%%BeginPageSetup
-BP
-%%EndPageSetup
-/F0 10/Times-Bold@0 SF 260.27(USD:13-66 Nvi/Nex)72 60 R(Refer)2.5 E
-(ence \(Options\))-.18 E/F1 10/Times-Roman@0 SF .216
-(Lines are split at the pre)122 96 R .216
-(vious whitespace character closest to the number)-.25 F 5.215(.A)-.55 G
-.515 -.15(ny t)-5.215 H .215(railing whites-).15 F 1.568
-(pace characters before that character are deleted.)122 108 R 1.568
-(If the line is split because of an inserted)6.568 F/F2 10/Courier@0 SF
-(<space>)122 120 Q F1(or)2.5 E F2(<tab>)2.5 E F1(character)2.5 E 2.5(,a)
--.4 G(nd you then enter another)-2.5 E F2(<space>)2.5 E F1(character)2.5
-E 2.5(,i)-.4 G 2.5(ti)-2.5 G 2.5(sd)-2.5 G(iscarded.)-2.5 E .389
-(If wrapmar)122 144 R .39(gin is set to 0, or if there is no blank character upon which to split the line, the line)
--.18 F(is not brok)122 156 Q(en.)-.1 E(If both)122 180 Q F0(wraplen)2.5
-E F1(and)2.5 E F0(wrapmar)2.5 E(gin)-.1 E F1(are set, the)2.5 E F0
-(wrapmar)2.5 E(gin)-.1 E F1 -.25(va)2.5 G(lue is used.).25 E F0
-(wrapscan, ws [on])97 204 Q F1 .108
-(This option causes searches to wrap around the end or the be)122 216 R
-.107(ginning of the \214le, and back to the)-.15 F(starting point.)122
-228 Q(Otherwise, the end or be)5 E
-(ginning of the \214le terminates the search.)-.15 E F0(writeany)97 252
-Q 2.5(,w)-.55 G 2.5(a[)-2.5 G(off])-2.5 E F1 .904
-(If this option is set, \214le-o)122 264 R -.15(ve)-.15 G .905
-(rwriting checks that w).15 F .905(ould usually be made before the)-.1 F
-F0(write)3.405 E F1(and)3.405 E F0(xit)122 276 Q F1 1.187
-(commands, or before an automatic write \(see the)3.688 F F0(auto)3.687
-E(write)-.1 E F1 1.187(option\), are not made.)3.687 F(This)6.187 E
-(allo)122 288 Q(ws a write to an)-.25 E 2.5<798c>-.15 G(le, pro)-2.5 E
-(vided the \214le permissions allo)-.15 E 2.5(wi)-.25 G(t.)-2.5 E EP
-%%Page: 67 66
-%%BeginPageSetup
-BP
-%%EndPageSetup
-/F0 10/Times-Bold@0 SF(Nvi/Nex Refer)72 60 Q 303.33(ence USD:13-67)-.18
-F 2.5(19. Index)97 96 R/F1 10/Times-Roman@0 SF 78.336(!2)97 112.2 S
-(2, 43)-78.336 E 86.006("" 42)97 124.2 R 76.666(#2)97 136.2 S(2, 43)
--76.666 E 91.666($2)97 148.2 S(3)-91.666 E 88.336(%2)97 160.2 S(3)
--88.336 E 73.886(&2)97 172.2 S(3, 52)-73.886 E 93.336(\(2)97 184.2 S(4)
--93.336 E 93.336(\)2)97 196.2 S(4)-93.336 E 91.666(*4)97 208.2 S(3)
--91.666 E 91.026(+2)97 220.2 S(0)-91.026 E 94.166(,2)97 232.2 S(4)
--94.166 E 75.826(/RE/ 25)97 244.2 R 91.666(02)97 256.2 S(6)-91.666 E
-39.006(0<control-D> 39)97 268.2 R 93.886(:2)97 280.2 S(6)-93.886 E
-93.886(;2)97 292.2 S(7)-93.886 E 76.026(<2)97 304.2 S(7, 43)-76.026 E
-23.476(<carriage-return> 14)97 316.2 R 44.006(<control-A> 18)97 328.2 R
-44.556(<control-B> 18)97 340.2 R 14.006(<control-D> 18,)97 352.2 R
-(39, 42)2.5 E 45.116(<control-E> 18)97 364.2 R 45.666(<control-F> 18)97
-376.2 R 44.006(<control-G> 19)97 388.2 R 29.006(<control-H> 19,)97 400.2
-R(39)2.5 E 47.336(<control-J> 19)97 412.2 R 45.116(<control-L> 19)97
-424.2 R 42.336(<control-M> 19)97 436.2 R 44.006(<control-N> 19)97 448.2
-R 45.666(<control-P> 20)97 460.2 R 44.556(<control-R> 19)97 472.2 R
-30.116(<control-T> 20,)97 484.2 R(39)2.5 E 44.006(<control-U> 20)97
-496.2 R 26.786(<control-W> 20,)97 508.2 R(39)2.5 E 44.006
-(<control-X> 39)97 520.2 R 44.006(<control-Y> 20)97 532.2 R 30.116
-(<control-Z> 21,)97 544.2 R(52)2.5 E 47.896(<control-]> 21)97 556.2 R
-47.896(<control-^> 21)97 568.2 R 25.676(<end-of-\214le> 41,)97 580.2 R
-(42)2.5 E 62.346(<erase> 39)97 592.2 R 41.236(<escape> 21,)97 604.2 R
-(39)2.5 E 18.446(<interrupt> 13,)97 616.2 R(38, 40)2.5 E(<line erase>)97
-628.2 Q(39)47.346 E(<literal-ne)97 640.2 Q 24.156(xt> 13,)-.15 F(39)2.5
-E(<ne)97 652.2 Q 51.476(wline> 15)-.25 F 70.106(<nul> 39)97 664.2 R
-60.676(<space> 21)97 676.2 R(<w)97 688.2 Q(ord erase>)-.1 E(39)41.896 E
-91.026(=4)97 700.2 S(4)-91.026 E 76.026(>2)97 712.2 S(7, 44)-76.026 E
-72.506(?RE? 25)97 724.2 R 72.456(@2)259.666 112.2 S(7, 43)-72.456 E
-89.446(A2)259.666 124.2 S(7)-89.446 E 89.996(B2)259.666 136.2 S(7)
--89.996 E 89.996(C2)259.666 148.2 S(8)-89.996 E 89.446(D2)259.666 160.2
-S(8)-89.446 E 90.556(E2)259.666 172.2 S(8)-90.556 E 91.106(F2)259.666
-184.2 S(8)-91.106 E 89.446(G2)259.666 196.2 S(9)-89.446 E 89.446(H2)
-259.666 208.2 S(9)-89.446 E 93.336(I2)259.666 220.2 S(9)-93.336 E 92.776
-(J2)259.666 232.2 S(9)-92.776 E 90.556(L2)259.666 244.2 S(9)-90.556 E
-87.776(M3)259.666 256.2 S(0)-87.776 E 89.446(N2)259.666 268.2 S(5)
--89.446 E 89.446(O3)259.666 280.2 S(0)-89.446 E 91.106(P3)259.666 292.2
-S(0)-91.106 E 89.446(Q3)259.666 304.2 S(0)-89.446 E 89.996(R3)259.666
-316.2 S(0)-89.996 E 91.106(S3)259.666 328.2 S(1)-91.106 E 90.556(T3)
-259.666 340.2 S(1)-90.556 E 89.446(U3)259.666 352.2 S(1)-89.446 E 87.226
-(W3)259.666 364.2 S(1)-87.226 E 89.446(X3)259.666 376.2 S(1)-89.446 E
-89.446(Y3)259.666 388.2 S(2)-89.446 E 81.946(ZZ 32)259.666 400.2 R
-87.506([[ 32)259.666 412.2 R 91.026<ad32>259.666 424.2 S(5)-91.026 E
-87.506(]] 32)259.666 436.2 R 93.336(^3)259.666 448.2 S(2)-93.336 E
-40.676(^<control-D> 39)259.666 460.2 R 91.666(_3)259.666 472.2 S(3)
--91.666 E 42.916(`<character> 24)259.666 484.2 R 92.226(a3)259.666 496.2
-S(3)-92.226 E(abbre)259.666 508.2 Q 69.706(v4)-.25 G(4)-69.706 E
-(alternate pathname)259.666 520.2 Q(13)20.856 E 56.406(altwerase 56)
-259.666 532.2 R 65.286(append 45)259.666 544.2 R(ar)259.666 556.2 Q
-77.686(gs 45)-.18 F 51.946(autoindent 56)259.666 568.2 R 58.056
-(autoprint 57)259.666 580.2 R(auto)259.666 592.2 Q 56.646(write 57)-.25
-F 91.666(b3)259.666 604.2 S(3)-91.666 E 65.286(backup 57)259.666 616.2 R
-61.396(beautify 57)259.666 628.2 R 84.166(bg 45)259.666 640.2 R(bigw)
-259.666 652.2 Q 60.936(ord 17)-.1 F -.2(bu)259.666 664.2 S -.25(ff).2 G
-70.186(er 13).25 F 92.226(c3)259.666 676.2 S(3)-92.226 E 84.726(cd 45)
-259.666 688.2 R 67.506(cdpath 57)259.666 700.2 R 74.726(cedit 58)259.666
-712.2 R 65.846(change 45)259.666 724.2 R 73.616(chdir 45)422.332 112.2 R
-60.276(columns 58)422.332 124.2 R 56.946(comment 58)422.332 136.2 R(cop)
-422.332 148.2 Q 77.326(y4)-.1 G(5)-77.326 E 56.946(count 16,)422.332
-160.2 R(41)2.5 E(current pathname)422.332 172.2 Q(13)26.966 E 91.666(d3)
-422.332 184.2 S(3)-91.666 E 70.286(delete 46)422.332 196.2 R 58.066
-(directory 58)422.332 208.2 R 65.276(display 46)422.332 220.2 R 92.226
-(e3)422.332 232.2 S(4)-92.226 E 40.286(edcompatible 58)422.332 244.2 R
-79.166(edit 46)422.332 256.2 R 55.846(errorbells 58)422.332 268.2 R
-49.736(escapetime 58)422.332 280.2 R -.15(ex)422.332 292.2 S 77.106
-(rc 58).15 F -.15(ex)422.332 304.2 S 58.216(tended 59).15 F -.15(ex)
-422.332 316.2 S 62.106(usage 46).15 F 93.336(f3)422.332 328.2 S(4)
--93.336 E 85.836(fg 47)422.332 340.2 R 66.386(\214le 41,)422.332 352.2 R
-(47)2.5 E 76.946(\214lec 59)422.332 364.2 R 75.276(\215ags 41)422.332
-376.2 R 75.276(\215ash 59)422.332 388.2 R 69.166(global 47)422.332 400.2
-R 60.286(hardtabs 59)422.332 412.2 R 76.946(help 47)422.332 424.2 R
-93.886(i3)422.332 436.2 S(4)-93.886 E(iclo)422.332 448.2 Q 64.426
-(wer 59)-.25 F 51.406(ignorecase 59)422.332 460.2 R 71.946(insert 47)
-422.332 472.2 R 93.886(j1)422.332 484.2 S(9)-93.886 E 78.606(join 48)
-422.332 496.2 R 76.666(k2)422.332 508.2 S(0, 49)-76.666 E -.1(ke)422.332
-520.2 S 62.196(ytime 59)-.05 F 93.886(l2)422.332 532.2 S(1)-93.886 E
-61.946(leftright 59)422.332 544.2 R 79.166(line 41)422.332 556.2 R
-75.276(lines 60)422.332 568.2 R 79.716(lisp 60)422.332 580.2 R 66.936
-(list 48,)422.332 592.2 R(60)2.5 E 76.946(lock 60)422.332 604.2 R 88.886
-(m3)422.332 616.2 S(4)-88.886 E 69.726(magic 60)422.332 628.2 R 76.946
-(map 48)422.332 640.2 R 73.616(mark 49)422.332 652.2 R 51.946
-(matchtime 60)422.332 664.2 R 73.056(mesg 60)422.332 676.2 R(mk)422.332
-688.2 Q -.15(ex)-.1 G 64.426(rc 49).15 F 53.056(modelines 60)422.332
-700.2 R 65.826(motion 16)422.332 712.2 R(mo)422.332 724.2 Q 72.546 -.15
-(ve 4)-.15 H(9).15 E EP
-%%Page: 68 67
-%%BeginPageSetup
-BP
-%%EndPageSetup
-/F0 10/Times-Bold@0 SF 303.33(USD:13-68 Nvi/Nex)72 60 R(Refer)2.5 E
-(ence)-.18 E/F1 10/Times-Roman@0 SF 65.836(msgcat 60)97 96 R 91.666(n2)
-97 108 S(5)-91.666 E(ne)97 120 Q 77.096(xt 49)-.15 F 65.276(noprint 61)
-97 132 R 48.616(number 43,)97 144 R(61)2.5 E 91.666(o3)97 156 S(4)
--91.666 E 74.726(octal 61)97 168 R 59.726(open 49,)97 180 R(61)2.5 E
-59.166(optimize 61)97 192 R 91.666(p3)97 204 S(5)-91.666 E 54.186
-(paragraph 17)97 216 R 50.296(paragraphs 61)97 228 R(preserv)97 240 Q
-62.946(e4)-.15 G(9)-62.946 E(pre)97 252 Q 59.976(vious 50)-.25 F(pre)97
-264 Q(vious conte)-.25 E 28.186(xt 16)-.15 F 60.276(print 50,)97 276 R
-(61)2.5 E 65.276(prompt 62)97 288 R 81.386(put 50)97 300 R 78.606
-(quit 50)97 312 R 93.336(r3)97 324 S(5)-93.336 E 71.956(range 41)97 336
-R 76.956(read 50)97 348 R 59.176(readonly 62)97 360 R 70.846(recdir 62)
-97 372 R(reco)97 384 Q -.15(ve)-.15 G 66.986(r5).15 G(1)-66.986 E(redra)
-97 396 Q 69.056(w6)-.15 G(2)-69.056 E 69.176(remap 62)97 408 R 70.286
-(report 62)97 420 R 70.846(resize 51)97 432 R(re)97 444 Q 66.646
-(wind 51)-.25 F 75.286(ruler 63)97 456 R 92.776(s3)97 468 S(5)-92.776 E
-71.946(scroll 63)97 480 R 53.076(searchincr 63)97 492 R 65.836
-(section 17)97 504 R 61.946(sections 63)97 516 R 68.626(secure 63)97 528
-R 59.736(sentence 17)97 540 R 83.056(set 51)97 552 R 60.276(shell 51,)97
-564 R(63)2.5 E 55.836(shellmeta 63)97 576 R 53.606(shiftwidth 63)97 588
-R(sho)97 600 Q 48.866(wmatch 63)-.25 F(sho)97 612 Q 51.086(wmode 63)-.25
-F 55.836(sidescroll 64)97 624 R(slo)97 636 Q -.1(wo)-.25 G 56.186
-(pen 64).1 F 68.066(source 52)97 648 R(sourcean)97 660 Q 56.276(y6)-.15
-G(4)-56.276 E 77.496(stop 52)97 672 R 55.826(substitute 52)97 684 R
-61.946(suspend 52)97 696 R 78.886(t3)97 708 S(5, 45)-78.886 E 65.276
-(tabstop 64)97 720 R 81.946(tag 52)259.666 96 R 56.946(taglength 64)
-259.666 108 R(tagne)259.666 120 Q 64.876(xt 53)-.15 F 66.946(tagpop 53)
-259.666 132 R(tagpre)259.666 144 Q 66.926(v5)-.25 G(3)-66.926 E 78.056
-(tags 64)259.666 156 R 69.166(tagtop 53)259.666 168 R 75.836(term 64)
-259.666 180 R 75.286(terse 64)259.666 192 R 66.386(tildeop 64)259.666
-204 R 63.606(timeout 64)259.666 216 R 55.846(ttywerase 64)259.666 228 R
-91.666(u3)259.666 240 S(5)-91.666 E(unabbre)259.666 252 Q 59.706(v5)-.25
-G(4)-59.706 E 74.166(undo 54)259.666 264 R 66.946(unmap 54)259.666 276 R
-(unnamed b)259.666 288 Q(uf)-.2 E 31.026(fer 14)-.25 F 91.666(v4)259.666
-300 S(7)-91.666 E -.15(ve)259.666 312 S 63.216(rbose 65).15 F -.15(ve)
-259.666 324 S 64.876(rsion 54).15 F 70.276(visual 54)259.666 336 R
-63.616(viusage 54)259.666 348 R 89.446(w3)259.666 360 S(6)-89.446 E
-66.946(w1200 65)259.666 372 R 71.946(w300 65)259.666 384 R 66.946
-(w9600 65)259.666 396 R -.1(wa)259.666 408 S 74.276(rn 65).1 F 49.736
-(whitespace 14)259.666 420 R(windo)259.666 432 Q 64.696(w6)-.25 G(5)
--64.696 E 81.946(wn 55)259.666 444 R -.1(wo)259.666 456 S 73.716(rd 17)
-.1 F 81.946(wq 55)259.666 468 R 61.956(wraplen 65)259.666 480 R(wrapmar)
-259.666 492 Q 46.026(gin 65)-.18 F 56.406(wrapscan 66)259.666 504 R
-73.616(write 54)259.666 516 R(writean)259.666 528 Q 61.826(y6)-.15 G(6)
--61.826 E 91.666(x3)259.666 540 S(6)-91.666 E 83.606(xit 55)259.666 552
-R 91.666(y3)259.666 564 S(6)-91.666 E 74.726(yank 55)259.666 576 R
-77.226(z3)259.666 588 S(6, 55)-77.226 E 91.866({3)259.666 600 S(7)
--91.866 E 94.666(|3)259.666 612 S(7)-94.666 E 91.866(}3)259.666 624 S(7)
--91.866 E 63.336(~3)259.666 636 S(7, 38, 52)-63.336 E EP
-%%Page: 2 68
-%%BeginPageSetup
-BP
-%%EndPageSetup
-/F0 10/Times-Bold@0 SF 308.33(USD:13-2 Nvi/Nex)72 60 R(Refer)2.5 E(ence)
--.18 E/F1 12/Times-Bold@0 SF -1.104(Ta)255.386 96 S(ble of Contents)
-1.104 E/F2 10/Times-Roman@0 SF 1.84(Description ................................................................................................................................)
-97 122.4 R(3)31 E(Additional Features in Ne)97 136.8 Q 2.27(x/Nvi ................................................................................................)
--.15 F(3)31 E(Startup Information)97 151.2 Q 28.5(................................................................................................................... 4)
-4.34 F(Reco)97 165.6 Q -.15(ve)-.15 G .48(ry ....................................................................................................................................)
-.15 F(5)31 E(Sizing the Screen)97 180 Q 28.5(....................................................................................................................... 7)
-3.51 F(Character Display)97 194.4 Q 28.5(...................................................................................................................... 8)
-3.52 F(Multiple Screens)97 208.8 Q 28.5(........................................................................................................................ 8)
-2.95 F -.8(Ta)97 223.2 S(gs, T).8 E(ag Stacks, and Cscope)-.8 E 28.5(.................................................................................................... 9)
-2.62 F(Re)97 237.6 Q(gular Expressions and Replacement Strings)-.15 E
-23.5(......................................................................... 10)
-3.67 F(Scripting Languages)97 252 Q 23.5(.................................................................................................................. 11)
-3.51 F(General Editor Description)97 266.4 Q 23.5(........................................................................................................ 12)
-2.69 F 1.2 -.6(Vi D)97 280.8 T 2.44(escription ...........................................................................................................................)
-.6 F(15)26 E 1.2 -.6(Vi C)97 295.2 T 1.04(ommands ............................................................................................................................)
-.6 F(17)26 E 1.2 -.6(Vi T)97 309.6 T -.15(ex)-.1 G 2.5(tI).15 G
-(nput Commands)-2.5 E 23.5(.......................................................................................................... 38)
-4.95 F(Ex Addressing)97 324 Q 23.5(........................................................................................................................... 40)
-4.34 F(Ex Description)97 338.4 Q 23.5(........................................................................................................................... 41)
-3.23 F(Ex Commands)97 352.8 Q 23.5(........................................................................................................................... 42)
-4.33 F(Set Options)97 367.2 Q 23.5(................................................................................................................................ 56)
-4.05 F(Inde)97 381.6 Q 3.38(x.)-.15 G 23.5(......................................................................................................................................... 67)
--3.38 F EP
-%%Trailer
-end
-%%EOF
diff --git a/usr.bin/vi/docs/USD.doc/vi.ref/vi.ref.txt b/usr.bin/vi/docs/USD.doc/vi.ref/vi.ref.txt
deleted file mode 100644
index 9449282ce42..00000000000
--- a/usr.bin/vi/docs/USD.doc/vi.ref/vi.ref.txt
+++ /dev/null
@@ -1,6402 +0,0 @@
-
-
-
-
-
-
-
-
- EExx//VVii RReeffeerreennccee MMaannuuaall
-
- _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
-
- May 18, 1996
-
-
-
- _A_b_s_t_r_a_c_t
-
-
-
-
- This document is the reference guide for the 4.4BSD
-implementations of nneexx/nnvvii, which are reimplementations
-of the historic Berkeley eexx/vvii 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 eexx/vvii 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 eexx/vvii work on a
-large number of terminals and Unix systems.
-
- NNvvii is originally derived from software contributed
-to the University of California, Berkeley by Steve Kirk-
-endall, the author of the vvii clone eellvviiss.
-
- 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 nnvvii 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.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-NNvvii//NNeexx RReeffeerreennccee UUSSDD::1133--33
-
-
-11.. DDeessccrriippttiioonn
-
- VVii is a screen oriented text editor. EExx is a line-ori-
-ented text editor. EExx and vvii are different interfaces to
-the same program, and it is possible to switch back and
-forth during an edit session. VViieeww is the equivalent of
-using the --RR (read-only) option of vvii.
-
- This reference manual is the one provided with the
-nneexx/nnvvii versions of the eexx/vvii text editors. NNeexx/nnvvii are
-intended as bug-for-bug compatible replacements for the
-original Fourth Berkeley Software Distribution (4BSD) eexx/vvii
-programs. This reference manual is accompanied by a tradi-
-tional-style manual page. That manual page describes the
-functionality found in eexx/vvii in far less detail than the
-description here. In addition, it describes the system
-interface to eexx/vvii, e.g. command line options, session
-recovery, signals, environmental variables, and similar
-things.
-
- This reference is intended for users already familiar
-with eexx/vvii. 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 "FFaasstt SSttaarrttuupp" in the man-
-ual page. It is probably enough to get you started.
-
- There are a few features in nneexx/nnvvii that are not found
-in historic versions of eexx/vvii. Some of the more interesting
-of those features are briefly described in the next section,
-entitled "AAddddiittiioonnaall FFeeaattuurreess". For the rest of this docu-
-ment, nneexx/nnvvii is used only when it is necessary to distin-
-guish it from the historic implementations of eexx/vvii.
-
- 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.
-
-22.. AAddddiittiioonnaall FFeeaattuurreess iinn NNeexx//NNvvii
-
- There are a few features in nneexx/nnvvii that are not found
-in historic versions of eexx/vvii. Some of the more interesting
-of these are as follows:
-
-88--bbiitt cclleeaann ddaattaa,, llaarrggee lliinneess,, ffiilleess
- NNeexx/nnvvii will edit any format file. Line lengths are
- limited by available memory, and file sizes are limited
- by available disk space. The vvii text input mode com-
- mand <<ccoonnttrrooll--XX>> can insert any possible character
- value into the text.
-
-BBaacckkggrroouunndd aanndd ffoorreeggrroouunndd ssccrreeeennss
- The bbgg command backgrounds the current screen, and the
-
-
-
-
-
-
-
-
-
-
-UUSSDD::1133--44 NNvvii//NNeexx RReeffeerreennccee
-
-
- ffgg command foregrounds backgrounded screens. The ddiiss--
- ppllaayy command can be used to list the background
- screens.
-
-CCoommmmaanndd EEddiittiinngg
- You can enter a normal editing window on the collected
- commands that you've entered on the vvii colon command-
- line, and then modify and/or execute the commands. See
- the cceeddiitt edit option for more information.
-
-DDiissppllaayyss
- The ddiissppllaayy command can be used to display the current
- buffers, the backgrounded screens, and the tags stack.
-
-EExxtteennddeedd RReegguullaarr EExxpprreessssiioonnss
- The eexxtteennddeedd option causes Regular Expressions to be
- interpreted as as Extended Regular Expressions, (i.e.
- _e_g_r_e_p(1) style Regular Expressions).
-
-FFiillee NNaammee CCoommpplleettiioonn
- It is possible to do file name completion and file name
- displays when entering commands on the vvii colon com-
- mand-line. See the ffiilleecc option for more information.
-
-IInnffiinniittee uunnddoo
- Changes made during an edit session may be rolled back-
- ward and forward. A .. command immediately after a uu
- command continues either forward or backward depending
- on whether the uu command was an undo or a redo.
-
-LLeefftt--rriigghhtt ssccrroolllliinngg
- The lleeffttrriigghhtt option causes nnvvii to do left-right screen
- scrolling, instead of the traditional vvii line wrapping.
-
-MMeessssaaggee CCaattaallooggss
- It is possible to display informational and error mes-
- sages in different languages by providing a catalog of
- messages. See the mmssggccaatt option and the file cata-
- log/README ffoorr mmoorree iinnffoorrmmaattiioonn..
-
-IInnccrreemmeennttiinngg nnuummbbeerrss
- The ## command increments or decrements the number ref-
- erenced by the cursor.
-
-PPrreevviioouuss ffiillee
- The pprreevviioouuss command edits the previous file from the
- argument list.
-
-SSccrriippttiinngg llaanngguuaaggeess
- The ::ppee[[rrll]] ccmmdd, ::ppeerrlldd[[oo]] ccmmdd and ::ttcc[[ll]] ccmmdd commands
- execute Perl5 and Tcl/Tk commands, respectively, on
- lines from the edit buffer. See the "SSccrriippttiinngg LLaann--
- gguuaaggeess" section and the specific commands for more
-
-
-
-
-
-
-
-
-
-
-NNvvii//NNeexx RReeffeerreennccee UUSSDD::1133--55
-
-
- information.
-
-SSpplliitt ssccrreeeennss
- The EEddiitt, EExx, NNeexxtt, PPrreevviioouuss, TTaagg and VViissuuaall (in vvii
- mode) commands divide the screen into multiple editing
- regions and then perform their normal function in a new
- screen area. The <<ccoonnttrrooll--WW>> command rotates between
- the foreground screens. The rreessiizzee command can be used
- to grow or shrink a particular screen.
-
-TTaagg ssttaacckkss
- Tags are now maintained in a stack. The <<ccoonnttrrooll--TT>>
- command returns to the previous tag location. The ttaagg--
- ppoopp 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 ddiissppllaayy command can be used to list the tags
- stack. The ttaaggttoopp command returns to the top of the
- tag stack.
-
-UUssaaggee iinnffoorrmmaattiioonn
- The eexxuussaaggee and vviiuussaaggee commands provide usage informa-
- tion for all of the eexx and vvii commands by default, or,
- optionally, for a specific command or key.
-
-WWoorrdd sseeaarrcchh
- The <<ccoonnttrrooll--AA>> command searches for the word refer-
- enced by the cursor.
-
-33.. SSttaarrttuupp IInnffoorrmmaattiioonn
-
- EExx/vvii 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 eexx commands, not vvii commands. In addition, they are
-interpreted _b_e_f_o_r_e the file to be edited is read, and there-
-fore many eexx 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 eexx command set supported by nneexx/nnvvii is a
-superset of the command set supported by historical imple-
-mentations of eexx, nneexx/nnvvii can use the startup files created
-for the historical implementations, but the converse may not
-be true.
-
- If the --ss (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:
-
-
-
-
-
-
-
-
-
-
-UUSSDD::1133--66 NNvvii//NNeexx RReeffeerreennccee
-
-
- (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
- nneexx/nnvvii and an historic implementation of eexx/vvii, a
- possible solution is to put nneexx/nnvvii specific commands
- in the .nexrc ffiillee,, aalloonngg wwiitthh aa ::ssoouurrccee $$HHOOMMEE//..eexxrrcc
- ccoommmmaanndd ttoo rreeaadd iinn tthhee ccoommmmaannddss ccoommmmoonn ttoo bbootthh iimmppllee--
- mmeennttaattiioonnss..
-
- (4) If the eexxrrcc option was turned on by one of the previ-
- ous startup information sources, the file .nexrc ((oorr
- tthhee ffiillee ..eexxrrcc, if .nexrc ddooeess nnoott eexxiisstt)) iiss rreeaadd,, aass
- lloonngg aass tthhee eeffffeeccttiivvee uusseerr IIDD ooff tthhee uusseerr iiss tthhee ssaammee
- aass tthhee oowwnneerr ooff tthhee ffiillee..
-
- 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 --cc option are executed, in the
-context of that file.
-
-44.. RReeccoovveerryy
-
- There is no recovery program for nneexx/nnvvii, nor does
-nneexx/nnvvii 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 rreeccddiirr option (the directory
-/var/tmp/vi.recover bbyy ddeeffaauulltt)),, aanndd aarree nnaammeedd ""vvii..XXXXXXXXXXXX"",,
-wwhheerree ""XXXXXXXXXXXX"" iiss aa nnuummbbeerr rreellaatteedd ttoo tthhee pprroocceessss IIDD.. WWhheenn
-aa ffiillee iiss ffiirrsstt mmooddiiffiieedd,, aa sseeccoonndd rreeccoovveerryy ffiillee ccoonnttaaiinniinngg
-aann eemmaaiill mmeessssaaggee ffoorr tthhee uusseerr iiss ccrreeaatteedd,, aanndd iiss nnaammeedd
-""rreeccoovveerr..XXXXXXXXXXXX"",, wwhheerree,, aaggaaiinn,, ""XXXXXXXXXXXX"" iiss aassssoocciiaatteedd wwiitthh
-
-
-
-
-
-
-
-
-
-
-NNvvii//NNeexx RReeffeerreennccee UUSSDD::1133--77
-
-
-tthhee pprroocceessss IIDD.. BBootthh ffiilleess aarree rreemmoovveedd aatt tthhee eenndd ooff aa nnoorr--
-mmaall eeddiitt sseessssiioonn,, bbuutt wwiillll rreemmaaiinn iiff tthhee eeddiitt sseessssiioonn iiss
-aabbnnoorrmmaallllyy tteerrmmiinnaatteedd oorr tthhee uusseerr rruunnss tthhee eexx pprreesseerrvvee ccoomm--
-mmaanndd..
-
- The rreeccddiirr 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 wwhhiicchh aarree cclleeaarreedd ooff tthheeiirr ccoonntteennttss
-bbyy aa ssyysstteemm rreebboooott,, oorr //uussrr//ttmmpp 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, eexx/vvii 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 _"rreeccoovveerr..XXXXXXXXXXXX_" _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 --tt _o_p_t_i_o_n _o_f sseennddmmaaiill
-_(_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 eexx_/vvii
-_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
-eexx pprreesseerrvvee _c_o_m_m_a_n_d_, eexx_/vvii _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 sseennddmmaaiill utility (or a
-mailer program which supports its interface) the source file
-nvi/common/recover.c wwiillll hhaavvee ttoo bbee mmooddiiffiieedd ttoo uussee yyoouurr
-llooccaall mmaaiill ddeelliivveerryy pprrooggrraammss.. NNoottee,, iiff nneexx//nnvvii iiss cchhaannggeedd
-ttoo uussee aannootthheerr mmaaiilleerr,, iitt iiss iimmppoorrttaanntt ttoo rreemmeemmbbeerr tthhaatt tthhee
-oowwnneerr ooff tthhee ffiillee ggiivveenn ttoo tthhee mmaaiilleerr iiss tthhee nneexx//nnvvii uusseerr,,
-ssoo nnootthhiinngg iinn tthhee ffiillee sshhoouulldd bbee ttrruusstteedd aass iitt mmaayy hhaavvee bbeeeenn
-mmooddiiffiieedd iinn aann eeffffoorrtt ttoo ccoommpprroommiissee tthhee ssyysstteemm..
-
- 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
-
-
-
-
-
-
-
-
-
-
-UUSSDD::1133--88 NNvvii//NNeexx RReeffeerreennccee
-
-
-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 nneexx/nnvvii distribution.)
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-NNvvii//NNeexx RReeffeerreennccee UUSSDD::1133--99
-
-
- # @(#)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 rreeccddiirr
-option, be sure to substitute the value you're using for the
-RECDIR vvaalluuee iinn tthhee rreeccoovveerryy ssccrriipptt..
-
-
-
-
-
-
-
-
-
-
-
-UUSSDD::1133--1100 NNvvii//NNeexx RReeffeerreennccee
-
-
- If the path of your system's sseennddmmaaiill program (or what-
-ever mailer you're using) is not /usr/lib/sendmail,, bbee ssuurree
-ttoo ssuubbssttiittuuttee tthhee ccoorrrreecctt ppaatthhnnaammee ffoorr tthhee SSEENNDDMMAAIILL value in
-the recovery script. Consult the manual page for details on
-recovering preserved or aborted editing sessions.
-
-55.. SSiizziinngg tthhee SSccrreeeenn
-
- The size of the screen can be set in a number of ways.
-EExx/vvii 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.
-
-66.. CChhaarraacctteerr DDiissppllaayy
-
- In both eexx and vvii 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 ooccttaall _o_p_t_i_o_n_.
-
- In vvii command mode, the cursor is always positioned on
-the last column of characters which take up more than one
-
-
-
-
-
-
-
-
-
-
-NNvvii//NNeexx RReeffeerreennccee UUSSDD::1133--1111
-
-
-column on the screen. In vvii text input mode, the cursor is
-positioned on the first column of characters which take up
-more than one column on the screen.
-
-77.. MMuullttiippllee SSccrreeeennss
-
- NNvvii 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 EEddiitt, EExx, NNeexxtt, PPrreevviioouuss, TTaagg and VViissuuaall (in vvii
-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 rreessiizzee command permits resizing of individual
-screens. Screens may be grown, shrunk or set to an absolute
-number of rows.
-
- The ^^WW command is used to switch between screens. Each
-^^WW moves to the next lower screen in the window, or to the
-first screen in the window if there are no lower screens.
-
- The bbgg 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 ddiissppllaayy ssccrreeeennss command displays the names of the
-files associated with the current backgrounded screens in
-the window.
-
- The ffgg [[ffiillee]] command "foregrounds" the first screen in
-the list of backgrounded screens that is associated with its
-argument. If no file argument is specified, the first
-screen on the list is foregrounded. Foregrounding consists
-of backgrounding the current screen, and replacing its space
-in the window with the foregrounded screen.
-
- If the last screen in the window is exited, and there
-are backgrounded screens, the first screen on the list of
-
-
-
-
-
-
-
-
-
-
-UUSSDD::1133--1122 NNvvii//NNeexx RReeffeerreennccee
-
-
-backgrounded screens takes over the window.
-
-88.. TTaaggss,, TTaagg SSttaacckkss,, aanndd CCssccooppee
-
- NNvvii supports the historic vvii tag command <<ccoonnttrrooll--]]>>,
-and the historic eexx tag command ttaagg. These commands change
-the current file context to a new location, based on infor-
-mation found in the tags ffiilleess.. IIff yyoouu aarree uunnffaammiilliiaarr wwiitthh
-tthheessee ccoommmmaannddss,, yyoouu sshhoouulldd rreevviieeww tthheeiirr ddeessccrriippttiioonn iinn tthhee
-eexx aanndd vvii ccoommmmaannddss sseeccttiioonn ooff tthhiiss mmaannuuaall.. FFoorr aaddddiittiioonnaall
-iinnffoorrmmaattiioonn oonn ttaaggss ffiilleess,, sseeee tthhee ddiissccuussssiioonn ooff tthhee ttaaggss
-eeddiitt ooppttiioonn aanndd tthhee ssyysstteemm _c_t_a_g_s((11)) mmaannuuaall ppaaggee..
-
- In addition, nnvvii supports the notion of "tags stacks",
-using the <<ccoonnttrrooll--TT>> command. The <<ccoonnttrrooll--TT>> command
-returns the user to the previous context, i.e., the last
-place from which a <<ccoonnttrrooll--]]>> or ttaagg command was entered.
-These three commands provide the basic functionality which
-allows you to use vvii to review source code in a structured
-manner.
-
- NNvvii also provides two other basic eexx commands for tag
-support: ttaaggppoopp and ttaaggttoopp. The ttaaggppoopp command is identical
-to the <<ccoonnttrrooll--TT>> 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
-<<ccoonnttrrooll--TT>> command. The ttaaggttoopp command discards all of the
-contexts that have been pushed onto the tag stack, returning
-to the context from which the first <<ccoonnttrrooll--]]>> or ttaagg 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, ccssccooppee.
-
-CCssccooppee 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. NNvvii contains an
-interface to the ccssccooppee query language which permits you to
-query ccssccooppee and then sequentially step through the loca-
-tions in the sources files which ccssccooppee returns. There are
-two nnvvii commands which support this ability to step through
-multiple locations. They are the eexx commands ttaaggnneexxtt and
-ttaaggpprreevv. The ttaaggnneexxtt command moves to the next location for
-the current tag. The ttaaggpprreevv command moves to the previous
-location for the current tag. (See the ttaaggnneexxtt and ttaaggpprreevv
-command discussion in the eexx commands section of this manual
-for more information.) At any time during this sequential
-walk, you may use the <<ccoonnttrrooll--]]>>, ttaagg or ccssccooppee commands to
-
-
-
-
-
-
-
-
-
-
-NNvvii//NNeexx RReeffeerreennccee UUSSDD::1133--1133
-
-
-move to a new tag context, and then use the <<ccoonnttrrooll--TT>> or
-ttaaggppoopp 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, nnvvii 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 ccttaaggss implementation or other
-tool with which you build tags files, this extension should
-be simple and will require no changes to nnvvii.
-
- The nnvvii and ccssccooppee interface is based on the new eexx
-command ccssccooppee, which has five subcommands: aadddd, ffiinndd, hheellpp,
-kkiillll and rreesseett. The subcommand ffiinndd itself has eight sub-
-commands: cc, dd, ee, ff, gg, ii, ss and tt.
-
-ccss[[ccooppee]] aa[[dddd]] ddiirreeccttoorryy
- The aadddd command attaches to the ccssccooppee database in the
- specified directory. The directory name is expanded
- using the standard filename expansions. After nnvvii
- attaches to a new database, all subsequent ccssccooppee
- 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
- nnvvii is run, it is expected to be a <blank>-separated
- list of directories containing ccssccooppee databases to
- which the user wishes to attach.
-
-::ccss[[ccooppee]] ff[[iinndd]] cc||dd||ee||ff||gg||ii||ss||tt bbuuffffeerr||ppaatttteerrnn
- The ffiinndd command is the ccssccooppee query command for nnvvii.
- For this command, nnvvii queries all attached ccssccooppee
- databases for the pattern. If the pattern is a double-
- quote character followed by a valid buffer name (e.g.,
- "<character>)),, tthheenn tthhee ccoonntteennttss ooff tthhee nnaammeedd bbuuffffeerr
- aarree uusseedd aass tthhee ppaatttteerrnn.. OOtthheerrwwiissee,, tthhee ppaatttteerrnn iiss aa
- RReegguullaarr EExxpprreessssiioonn..
-
- TThhee ffiinndd ccoommmmaanndd ppuusshheess tthhee ccuurrrreenntt llooccaattiioonn oonnttoo tthhee
- ttaaggss ssttaacckk,, aanndd sswwiittcchheess ttoo tthhee ffiirrsstt llooccaattiioonn rreessuulltt--
- iinngg ffrroomm tthhee qquueerryy,, iiff tthhee qquueerryy rreettuurrnneedd aatt lleeaasstt oonnee
- rreessuulltt..
-
- FFiillee nnaammeess rreettuurrnneedd bbyy tthhee ccssccooppee qquueerryy,, iiff nnoott aabbssoo--
- lluuttee ppaatthhss,, aarree sseeaarrcchheedd ffoorr rreellaattiivvee ttoo tthhee ddiirreeccttoorryy
- wwhheerree tthhee ccssccooppee ddaattaabbaassee iiss llooccaatteedd.. IInn aaddddiittiioonn,, iiff
- tthhee ffiillee ""ccssccooppee..ttppaatthh"" aappppeeaarrss iinn tthhee ssaammee ddiirreeccttoorryy
-
-
-
-
-
-
-
-
-
-
-UUSSDD::1133--1144 NNvvii//NNeexx RReeffeerreennccee
-
-
- aass tthhee ccssccooppee ddaattaabbaassee,, iitt iiss eexxppeecctteedd ttoo ccoonnttaaiinn aa
- ccoolloonn--sseeppaarraatteedd lliisstt ooff ddiirreeccttoorryy nnaammeess wwhheerree ffiilleess
- rreeffeerreenncceedd bbyy iittss aassssoocciiaatteedd ccssccooppee ddaattaabbaassee mmaayy bbee
- ffoouunndd..
-
- TThhee ffiinndd ssuubbccoommmmaanndd iiss oonnee ooff tthhee ffoolllloowwiinngg::
-
- 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.
-
-::ccss[[ccooppee]] hh[[eellpp]] [[ccoommmmaanndd]]
- List the ccssccooppee commands, or optionally list usage help
- for any single ccssccooppee command.
-
-::ddiissppllaayy cc[[oonnnneeccttiioonnss]]
- Display the list of ccssccooppee databases to which nnvvii is
- currently connected.
-
-::ccss[[ccooppee]] kk[[iillll]] ##
- Disconnect from a specific ccssccooppee database. The con-
- nection number is the one displayed by the eexx ddiissppllaayy
- ccoonnnneeccttiioonnss command.
-
-::ccss[[ccooppee]] rr[[eesseett]]
- Disconnect from all attached ccssccooppee databases.
-
- Cscope is not freely redistributable software, but is
-fairly inexpensive and easily available. To purchase a copy
-of ccssccooppee, see http://www.att.com/ssg/products/toolch-
-est.html.
-
-99.. RReegguullaarr EExxpprreessssiioonnss aanndd RReeppllaacceemmeenntt SSttrriinnggss
-
- Regular expressions are used in line addresses, as the
-first part of the eexx ssuubbssttiittuuttee, gglloobbaall, and vv commands, and
-in search patterns.
-
- The regular expressions supported by eexx/vvii are, by
-default, the Basic Regular Expressions (BRE's) described in
-the IEEE POSIX Standard 1003.2. The eexxtteennddeedd option causes
-all regular expressions to be interpreted as the Extended
-Regular Expressions (ERE's) described by the same standard.
-(See _r_e___f_o_r_m_a_t(7) for more information.) Generally speak-
-ing, BRE's are the Regular Expressions found in _e_d(1) and
-_g_r_e_p(1), and ERE's are the Regular Expressions found in
-_e_g_r_e_p(1).
-
-
-
-
-
-
-
-
-
-
-
-NNvvii//NNeexx RReeffeerreennccee UUSSDD::1133--1155
-
-
- 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
-eexx/vvii 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 ssuubbssttiittuuttee command.
-
- When the mmaaggiicc 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 ssuubbssttiittuuttee
-command.
-
- The character "&" (or "\&" if the mmaaggiicc 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 mmaaggiicc option is _n_o_t set) stands for the replace-
-ment part of the previous ssuubbssttiittuuttee command. It is only
-valid after a ssuubbssttiittuuttee 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.
-
- If the entire replacement pattern is "%", then the last
-replacement pattern is used again.
-
-
-
-
-
-
-
-
-
-
-
-UUSSDD::1133--1166 NNvvii//NNeexx RReeffeerreennccee
-
-
- In vvii, inserting a <control-M> iinnttoo tthhee rreeppllaacceemmeenntt
-ssttrriinngg wwiillll ccaauussee tthhee mmaattcchheedd lliinnee ttoo bbee sspplliitt iinnttoo ttwwoo
-lliinneess aatt tthhaatt ppooiinntt.. ((TThhee <<ccoonnttrrooll--MM>> will be discarded.)
-
-1100.. SSccrriippttiinngg LLaanngguuaaggeess
-
- The nnvvii 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 ) See the "BBuuiillddiinngg NNvvii" section for more informa-
-tion.
-
- 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''.
-
-vviiFFiinnddSSccrreeeenn ffiillee
- Return the screenIdaassssoocciiaatteedd ffiillee.
-
-vviiAAppppeennddLLiinnee ssccrreeeennIIdd lliinneeNNuummbbeerr tteexxtt
- Append text aass aa nneeww lliinnee aafftteerr lliinnee nnuummbbeerr lliinneeNNuummbbeerr,
- in the screen screenId..
-
-vviiDDeellLLiinnee ssccrreeeennIIdd lliinneeNNuumm
- Delete the line lineNumber ffrroomm tthhee ssccrreeeenn ssccrreeeennIIdd.
-
-vviiGGeettLLiinnee ssccrreeeennIIdd lliinneeNNuummbbeerr
- Return the line lineNumber ffrroomm tthhee ssccrreeeenn ssccrreeeennIIdd.
-
-vviiIInnsseerrttLLiinnee ssccrreeeennIIdd lliinneeNNuummbbeerr tteexxtt
- Insert text aass aa nneeww lliinnee bbeeffoorree lliinnee nnuummbbeerr lliinneeNNuummbbeerr
- in the screen screenId..
-
-vviiLLaassttLLiinnee ssccrreeeennIIdd
- Return the line number of the last line in the screen
- screenId..
-
-vviiSSeettLLiinnee ssccrreeeennIIdd lliinneeNNuummbbeerr tteexxtt
- Change the line lineNumber iinn tthhee ssccrreeeenn ssccrreeeennIIdd to
- match the specified text..
-
-vviiGGeettMMaarrkk ssccrreeeennIIdd mmaarrkk
- Return the current line and column for the specified
- mark ffrroomm tthhee ssccrreeeenn ssccrreeeennIIdd.
-
-vviiSSeettMMaarrkk ssccrreeeennIIdd mmaarrkk lliinnee ccoolluummnn
- Set the specified mark ttoo bbee aatt lliinnee lliinnee, column col-
- umn,, iinn tthhee ssccrreeeenn ssccrreeeennIIdd.
-
-
-
-
-
-
-
-
-
-
-NNvvii//NNeexx RReeffeerreennccee UUSSDD::1133--1177
-
-
-vviiGGeettCCuurrssoorr ssccrreeeennIIdd
- Return the current line and column for the cursor in
- the screen screenId..
-
-vviiSSeettCCuurrssoorr ssccrreeeennIIdd lliinnee ccoolluummnn
- Set the cursor in the screen screenId ttoo tthhee ssppeecciiffiieedd
- lliinnee and column..
-
-vviiMMssgg ssccrreeeennIIdd tteexxtt
- Display the specified text aass aa vvii mmeessssaaggee iinn tthhee
- ssccrreeeenn ssccrreeeennIIdd.
-
-vviiNNeewwSSccrreeeenn ssccrreeeennIIdd [[ffiillee]]
- Create a new screen.
-
-vviiEEnnddSSccrreeeenn ssccrreeeennIIdd
- Exit the screen screenId..
-
-vviiSSwwiittcchhSSccrreeeenn ssccrreeeennIIdd ssccrreeeennIIdd
- Switch from the screen screenId ttoo tthhee ssccrreeeenn ssccrreeeennIIdd.
-
-vviiMMaappKKeeyy ssccrreeeennIIdd kkeeyy ttccllpprroocc
- Map the specified key iinn tthhee ssccrreeeenn ssccrreeeennIIdd to the Tcl
- procedure tclproc..
-
-vviiUUnnmmMMaappKKeeyy ssccrreeeennIIdd kkeeyy
- Unmap the specified key iinn tthhee ssccrreeeenn ssccrreeeennIIdd
-
-vviiGGeettOOpptt ssccrreeeennIIdd ooppttiioonn
- Return the value of the specified option ffrroomm tthhee
- ssccrreeeenn ssccrreeeennIIdd.
-
-vviiSSeettOOpptt ssccrreeeennIIdd ccoommmmaanndd
- Set one or more options in the screen screenId..
-
-1111.. GGeenneerraall EEddiittoorr DDeessccrriippttiioonn
-
- When eexx or vvii 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 aauuttoowwrriittee 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
-rreeaaddoonnllyy option or the --RR 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
-<<ccoonnttrrooll--GG>> command) will reflect this fact.
-
-
-
-
-
-
-
-
-
-
-UUSSDD::1133--1188 NNvvii//NNeexx RReeffeerreennccee
-
-
- Both eexx and vvii 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 eexx first starts running, it is in
-command mode, and usually displays a prompt (see the pprroommpptt
-option for more information). The prompt is a single colon
-(":"")) cchhaarraacctteerr.. TThheerree aarree tthhrreeee ccoommmmaannddss tthhaatt sswwiittcchh eexx
-iinnttoo tteexxtt iinnppuutt mmooddee:: aappppeenndd,, cchhaannggee aanndd iinnsseerrtt.. OOnnccee iinn
-iinnppuutt mmooddee,, eenntteerriinngg aa lliinnee ccoonnttaaiinniinngg oonnllyy aa ssiinnggllee ppeerriioodd
-(("".."")) eennddss tteexxtt iinnppuutt mmooddee aanndd rreettuurrnnss ttoo ccoommmmaanndd mmooddee,,
-wwhheerree tthhee pprroommpptt iiss rreeddiissppllaayyeedd..
-
- When vvii first starts running, it is in command mode as
-well. There are eleven commands that switch vvii into text
-input mode: AA, aa, CC, cc, II, ii, OO, oo, RR, SS and ss. Once in
-input mode, entering an <escape> cchhaarraacctteerr eennddss tteexxtt iinnppuutt
-mmooddee aanndd rreettuurrnnss ttoo ccoommmmaanndd mmooddee..
-
- EExx/vvii present three different interfaces to editing a
-file. EExx presents a line oriented interface. VVii 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 nnvvii.
-
- The following words have special meanings in both the
-eexx and vvii command descriptions:
-
-<<iinntteerrrruupptt>>
- The interrupt character is used to interrupt the cur-
- rent operation. Normally <control-C>,, wwhhaatteevveerr cchhaarraacc--
- tteerr iiss sseett ffoorr tthhee ccuurrrreenntt tteerrmmiinnaall iiss uusseedd..
-
-<<lliitteerraall--nneexxtt>>
- The literal next character is used to escape the subse-
- quent character from any special meaning. This charac-
- ter is always <control-V>.. IIff tthhee tteerrmmiinnaall iiss nnoott sseett
- uupp ttoo ddoo XXOONN//XXOOFFFF ffllooww ccoonnttrrooll,, tthheenn <<ccoonnttrrooll--QQ>> is
- used to mean literal next as well.
-
-ccuurrrreenntt ppaatthhnnaammee
- The pathname of the file currently being edited by vi.
- When the percent character ("%"")) aappppeeaarrss iinn aa ffiillee nnaammee
- eenntteerreedd aass ppaarrtt ooff aann eexx ccoommmmaanndd aarrgguummeenntt,, iitt iiss
- rreeppllaacceedd bbyy tthhee ccuurrrreenntt ppaatthhnnaammee.. ((TThhee ""%%"" cchhaarraacctteerr
- ccaann bbee eessccaappeedd bbyy pprreecceeddiinngg iitt wwiitthh aa bbaacckkssllaasshh..))
-
-aalltteerrnnaattee ppaatthhnnaammee
- The name of the last file name mentioned in an eexx com-
- mand, or, the previous current pathname if the last
- file mentioned becomes the current file. When the hash
-
-
-
-
-
-
-
-
-
-
-NNvvii//NNeexx RReeffeerreennccee UUSSDD::1133--1199
-
-
- mark character ("#"")) aappppeeaarrss iinn aa ffiillee nnaammee eenntteerreedd aass
- ppaarrtt ooff aann eexx ccoommmmaanndd aarrgguummeenntt,, iitt iiss rreeppllaacceedd bbyy tthhee
- aalltteerrnnaattee ppaatthhnnaammee.. ((TThhee ""##"" cchhaarraacctteerr ccaann bbee eessccaappeedd
- bbyy pprreecceeddiinngg iitt wwiitthh aa bbaacckkssllaasshh..))
-
-bbuuffffeerr
- 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 eexx cchhaannggee
- 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> iinn vvii
- aanndd wwiitthhoouutt tthhee ddoouubbllee qquuoottee,, ee..gg.. <<cchhaarraacctteerr>>,, iinn eexx..
- ((TThhee ddoouubbllee qquuoottee iissnn''tt nneecceessssaarryy ffoorr eexx bbeeccaauussee
- bbuuffffeerrss nnaammeess aarree ddeennootteedd bbyy tthheeiirr ppoossiittiioonn iinn tthhee ccoomm--
- mmaanndd lliinnee..)) HHiissttoorriicc iimmpplleemmeennttaattiioonnss ooff eexx//vvii lliimmiitteedd
- <<cchhaarraacctteerr>> ttoo tthhee aallpphhaannuummeerriicc cchhaarraacctteerrss;; nneexx//nnvvii
- ppeerrmmiittss tthhee uussee ooff aannyy cchhaarraacctteerr wwiitthhoouutt aannootthheerr mmeeaann--
- iinngg iinn tthhee ppoossiittiioonn wwhheerree aa bbuuffffeerr nnaammee iiss eexxppeecctteedd..
-
- BBuuffffeerrss nnaammeedd bbyy uuppppeerrccaassee cchhaarraacctteerrss aarree tthhee ssaammee aass
- bbuuffffeerrss nnaammeedd bbyy lloowweerrccaassee cchhaarraacctteerrss,, ee..gg.. tthhee bbuuffffeerr
- nnaammeedd bbyy tthhee EEnngglliisshh cchhaarraacctteerr ""AA"" iiss tthhee ssaammee aass tthhee
- bbuuffffeerr nnaammeedd bbyy tthhee cchhaarraacctteerr ""aa"",, wwiitthh tthhee eexxcceeppttiioonn
- tthhaatt,, iiff tthhee bbuuffffeerr ccoonntteennttss aarree bbeeiinngg cchhaannggeedd ((aass wwiitthh
- aa tteexxtt ddeelleettiioonn oorr vvii cchhaannggee ccoommmmaanndd)),, tthhee tteexxtt iiss
- _a_p_p_e_n_d_e_d ttoo tthhee bbuuffffeerr,, iinnsstteeaadd ooff rreeppllaacciinngg tthhee ccuurr--
- rreenntt ccoonntteennttss..
-
- TThhee bbuuffffeerrss nnaammeedd bbyy tthhee nnuummeerriicc cchhaarraacctteerrss ((iinn
- EEnngglliisshh,, ""11_" _t_h_r_o_u_g_h _"_9"")),, aarree ssppeecciiaall.. IIff aa rreeggiioonn ooff
- tteexxtt iinncclluuddiinngg cchhaarraacctteerrss ffrroomm mmoorree tthhaann oonnee lliinnee,, oorr aa
- ssiinnggllee lliinnee ooff tteexxtt ssppeecciiffiieedd bbyy uussiinngg aa lliinnee--oorriieenntteedd
- mmoottiioonn,, iiss cchhaannggeedd oorr ddeelleetteedd iinn tthhee ffiillee uussiinngg tthhee vvii
- cchhaannggee oorr ddeelleettee ccoommmmaannddss,, aa ccooppyy ooff tthhee tteexxtt iiss ppllaacceedd
- iinnttoo tthhee nnuummeerriicc bbuuffffeerr ""11"",, rreeggaarrddlleessss ooff tthhee uusseerr
- ssppeecciiffyyiinngg aannootthheerr bbuuffffeerr iinn wwhhiicchh ttoo ssaavvee iitt.. IInn
- aaddddiittiioonn,, tthheerree aarree aa ffeeww ccoommmmaannddss wwhhiicchh,, wwhheenn uusseedd aass
- aa mmoottiioonn wwiitthh tthhee vvii cchhaannggee aanndd ddeelleettee ccoommmmaannddss,, _a_l_w_a_y_s
- ccooppyy tthhee ssppeecciiffiieedd rreeggiioonn ooff tteexxtt iinnttoo tthhee nnuummeerriicc
- bbuuffffeerrss rreeggaarrddlleessss ooff tthhee rreeggiioonn iinncclluuddiinngg cchhaarraacctteerrss
- ffrroomm mmoorree tthhaann oonnee lliinnee.. TThheessee ccoommmmaannddss aarree::
-
-
- <<ccoonnttrrooll--AA>> %% (( ))
- ``<<cchhaarraacctteerr>> // ?? NN
- nn {{ }}
-
-
- Before this copy is done, the previous contents of
- buffer "1"" aarree mmoovveedd iinnttoo bbuuffffeerr ""22", "2"" iinnttoo bbuuffffeerr
-
-
-
-
-
-
-
-
-
-
-
-UUSSDD::1133--2200 NNvvii//NNeexx RReeffeerreennccee
-
-
- ""33", and so on. The contents of buffer "9"" aarree ddiiss--
- ccaarrddeedd.. IInn vvii,, tteexxtt mmaayy bbee eexxpplliicciittllyy ssttoorreedd iinnttoo tthhee
- nnuummeerriicc bbuuffffeerrss.. IInn tthhiiss ccaassee,, tthhee bbuuffffeerr rroottaattiioonn
- ddeessccrriibbeedd aabboovvee ooccccuurrss bbeeffoorree tthhee rreeppllaacceemmeenntt ooff tthhee
- bbuuffffeerr''ss ccoonntteennttss.. TThhee nnuummeerriicc bbuuffffeerrss aarree oonnllyy aavvaaiill--
- aabbllee iinn vviissuuaall aanndd ooppeenn mmooddeess,, aanndd aarree nnoott aacccceessssiibbllee
- bbyy eexx iinn aannyy wwaayy,, aalltthhoouugghh cchhaannggeedd aanndd ddeelleetteedd tteexxtt iiss
- ssttiillll ssttoorreedd tthheerree wwhhiillee iinn eexx mmooddee..
-
- WWhheenn aa vvii ccoommmmaanndd ssyynnooppssiiss sshhoowwss bbootthh aa [[bbuuffffeerr]] aanndd aa
- [[ccoouunntt]],, tthheeyy mmaayy bbee pprreesseenntteedd iinn aannyy oorrddeerr..
-
- FFiinnaallllyy,, aallll bbuuffffeerrss aarree eeiitthheerr ""lliinnee"" oorr ""cchhaarraacctteerr""
- oorriieenntteedd.. AAllll eexx ccoommmmaannddss wwhhiicchh ssttoorree tteexxtt iinnttoo
- bbuuffffeerrss aarree lliinnee oorriieenntteedd.. SSoommee vvii ccoommmmaannddss wwhhiicchh
- ssttoorree tteexxtt iinnttoo bbuuffffeerrss aarree lliinnee oorriieenntteedd,, aanndd ssoommee aarree
- cchhaarraacctteerr oorriieenntteedd;; tthhee ddeessccrriippttiioonn ffoorr eeaacchh aapppplliiccaabbllee
- vvii ccoommmmaanndd nnootteess wwhheetthheerr tteexxtt ccooppiieedd iinnttoo bbuuffffeerrss uussiinngg
- tthhee ccoommmmaanndd iiss lliinnee oorr cchhaarraacctteerr oorriieenntteedd.. IInn aaddddii--
- ttiioonn,, tthhee vvii ccoommmmaanndd ddiissppllaayy bbuuffffeerrss ddiissppllaayyss tthhee ccuurr--
- rreenntt oorriieennttaattiioonn ffoorr eeaacchh bbuuffffeerr.. GGeenneerraallllyy,, tthhee oonnllyy
- iimmppoorrttaannccee aattttaacchheedd ttoo tthhiiss oorriieennttaattiioonn iiss tthhaatt iiff tthhee
- bbuuffffeerr iiss ssuubbsseeqquueennttllyy iinnsseerrtteedd iinnttoo tthhee tteexxtt,, lliinnee
- oorriieenntteedd bbuuffffeerrss ccrreeaattee nneeww lliinneess ffoorr eeaacchh ooff tthhee lliinneess
- tthheeyy ccoonnttaaiinn,, aanndd cchhaarraacctteerr oorriieenntteedd bbuuffffeerrss ccrreeaattee nneeww
- lliinneess ffoorr aannyy lliinneess _o_t_h_e_r tthhaann tthhee ffiirrsstt aanndd llaasstt lliinneess
- tthheeyy ccoonnttaaiinn.. TThhee ffiirrsstt aanndd llaasstt lliinneess aarree iinnsseerrtteedd
- iinnttoo tthhee tteexxtt aatt tthhee ccuurrrreenntt ccuurrssoorr ppoossiittiioonn,, bbeeccoommiinngg
- ppaarrtt ooff tthhee ccuurrrreenntt lliinnee.. IIff tthheerree iiss mmoorree tthhaann oonnee
- lliinnee iinn tthhee bbuuffffeerr,, hhoowweevveerr,, tthhee ccuurrrreenntt lliinnee iittsseellff
- wwiillll bbee sspplliitt..
-
-uunnnnaammeedd bbuuffffeerr
- 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
- didn't store text into it. NNeexx/nnvvii never discards the
- contents of the unnamed buffer until new text replaces
- them.
-
-wwhhiitteessppaaccee
- The characters <tab> and <space>.
-
-
-
-
-
-
-
-
-
-
-
-NNvvii//NNeexx RReeffeerreennccee UUSSDD::1133--2211
-
-
-<<ccaarrrriiaaggee--rreettuurrnn>>
- The character represented by an ASCII <control-M>..
- TThhiiss cchhaarraacctteerr iiss aallmmoosstt aallwwaayyss ttrreeaatteedd iiddeennttiiccaallllyy ttoo
- aa <<nneewwlliinnee>> character, but differs in that it can be
- escaped into the file text or into a command.
-
-<<nneewwlliinnee>>
- The character represented by an ASCII <control-J>..
- TThhiiss cchhaarraacctteerr iiss aallmmoosstt aallwwaayyss ttrreeaatteedd iiddeennttiiccaallllyy ttoo
- aa <<ccoonnttrrooll--MM>> character, but differs in that it cannot
- be escaped into the file text or into a command.
-
-1122.. VVii DDeessccrriippttiioonn
-
- VVii 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 eexx commands, and for vvii
-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 rruulleerr and sshhoowwmmooddee 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
-lliisstt option. Historically, implementations of vvii have also
-displayed some lines as single asterisk ("@"")) cchhaarraacctteerrss..
-TThheessee wweerree lliinneess tthhaatt wweerree nnoott ccoorrrreeccttllyy ddiissppllaayyeedd,, ii..ee..
-lliinneess oonn tthhee ssccrreeeenn tthhaatt ddiidd nnoott ccoorrrreessppoonndd ttoo lliinneess iinn tthhee
-ffiillee,, oorr lliinneess tthhaatt ddiidd nnoott ffiitt oonn tthhee ccuurrrreenntt ssccrreeeenn.. NNvvii
-nneevveerr ddiissppllaayyss lliinneess iinn tthhiiss ffaasshhiioonn..
-
- VVii is a modeful editor, i.e. it has two modes, "com-
-mand" mode and "text input" mode. When vvii first starts, it
-is in command mode. There are several commands that change
-vvii into text input mode. The <escape> cchhaarraacctteerr iiss uusseedd ttoo
-rreessoollvvee tthhee tteexxtt iinnppuutt iinnttoo tthhee ffiillee,, aanndd eexxiitt bbaacckk iinnttoo
-ccoommmmaanndd mmooddee.. IInn vvii ccoommmmaanndd mmooddee,, tthhee ccuurrssoorr iiss aallwwaayyss
-ppoossiittiioonneedd oonn tthhee llaasstt ccoolluummnn ooff cchhaarraacctteerrss wwhhiicchh ttaakkee uupp
-mmoorree tthhaann oonnee ccoolluummnn oonn tthhee ssccrreeeenn.. IInn vvii tteexxtt iinnsseerrtt mmooddee,,
-tthhee ccuurrssoorr iiss ppoossiittiioonneedd oonn tthhee ffiirrsstt ccoolluummnn ooff cchhaarraacctteerrss
-wwhhiicchh ttaakkee uupp mmoorree tthhaann oonnee ccoolluummnn oonn tthhee ssccrreeeenn..
-
- 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
-
-
-
-
-
-
-
-
-
-
-UUSSDD::1133--2222 NNvvii//NNeexx RReeffeerreennccee ((VVii CCoommmmaannddss))
-
-
-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 lleeffttrriigghhtt
-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 vvii presenta-
-tion and nnvvii is in the scrolling and screen oriented posi-
-tion commands, <<ccoonnttrrooll--BB>>, <<ccoonnttrrooll--DD>>, <<ccoonnttrrooll--EE>>, <<ccoonn--
-ttrrooll--FF>>, <<ccoonnttrrooll--UU>>, <<ccoonnttrrooll--YY>>, HH, LL and MM. In histori-
-cal implementations of vvii, 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 vvii would edit the file that contained them. In nnvvii,
-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.
-
- VVii 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 vvii would select, the cursor is positioned on the last
-character in the line. (If the line is empty, the cursor is
-positioned on the first column of the line.) If a command
-moves the cursor to the most attractive position, it does
-not alter the current cursor position, and a subsequent
-movement will again attempt to move the cursor to that posi-
-tion. Therefore, although a movement to a line shorter than
-the currently most attractive position will cause the cursor
-to move to the end of that line, a subsequent movement to a
-longer line will cause the cursor to move back to the most
-attractive position.
-
- In addition, the $$ command makes the end of each line
-the most attractive cursor position rather than a specific
-column.
-
- Each vvii 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.
-
-
-
-
-
-
-
-
-
-
-NNvvii//NNeexx RReeffeerreennccee ((VVii CCoommmmaannddss)) UUSSDD::1133--2233
-
-
- The following words have special meaning for vvii com-
-mands.
-
-pprreevviioouuss ccoonntteexxtt
- The position of the cursor before the command which
- caused the last absolute movement was executed. Each
- vvii 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 eexx command is considered
- an absolute movement.
-
-mmoottiioonn
- A second vvii command can be used as an optional trailing
- argument to the vvii <<, >>, !!, cc, dd, yy, and (depending on
- the ttiillddeeoopp 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 vvii 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
- f h j k
- l n t w
- { | }
-
-
- The optional count prefix available for some of the vvii
- commands that take motion commands, or the count prefix
- available for the vvii commands that are used as motion
- components, may be included and is _a_l_w_a_y_s considered
-
-
-
-
-
-
-
-
-
-
-
-UUSSDD::1133--2244 NNvvii//NNeexx RReeffeerreennccee ((VVii CCoommmmaannddss))
-
-
- part of the motion argument. For example, the commands
- "c2w_" _a_n_d _"_2_c_w" are equivalent, and the region affected
- by the cc command is two words of text. In addition, if
- the optional count prefix is specified for both the vvii
- command and its motion component, the effect is multi-
- plicative and is considered part of the motion argu-
- ment. For example, the commands "4cw"" aanndd ""22cc22ww" are
- equivalent, and the region affected by the cc command is
- four words of text.
-
-ccoouunntt
- 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 vvii command synopsis shows both a [buffer] aanndd
- [[ccoouunntt]], they may be presented in any order.
-
-wwoorrdd
- Generally, in languages where it is applicable, vvii 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$%^ ""
- ccoonnttaaiinn tthhrreeee wwoorrddss:: ""!!@@##", "abc"" aanndd ""$$%%^^".
-
- Groups of empty lines (or lines containing only whites-
- pace characters) are treated as a single word.
-
-bbiiggwwoorrdd
- 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$%^ "" ccoonnttaaiinn oonnee bbiiggwwoorrdd:: ""!!@@##aabbcc$$%%^^".
-
- Groups of empty lines (or lines containing only whites-
- pace characters) are treated as a single bigword.
-
-ppaarraaggrraapphh
- 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.
-
-
-
-
-
-
-
-
-
-
-
-NNvvii//NNeexx RReeffeerreennccee ((VVii CCoommmmaannddss)) UUSSDD::1133--2255
-
-
- 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 ppaarraaggrraapphhss option.
-
-sseeccttiioonn
- An area of text that starts with the beginning of the
- file or a line whose first character is an open brace
- ("{"")) aanndd ccoonnttiinnuueess uunnttiill tthhee nneexxtt sseeccttiioonn oorr tthhee eenndd
- ooff tthhee ffiillee..
-
- AAddddiittiioonnaall sseeccttiioonn bboouunnddaarriieess ccaann bbee ddeeffiinneedd uussiinngg tthhee
- sseeccttiioonnss ooppttiioonn..
-
-sseenntteennccee
- 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
- ("."")) eexxccllaammaattiioonn ppooiinntt ((""!!") or question mark ("?""))
- cchhaarraacctteerr,, ffoolllloowweedd bbyy eeiitthheerr aann eenndd--ooff--lliinnee oorr ttwwoo
- wwhhiitteessppaaccee cchhaarraacctteerrss.. AAnnyy nnuummbbeerr ooff cclloossiinngg ppaarreenntthhee--
- sseess ((""))"), brackets ("]"")),, ddoouubbllee--qquuoottee ((""""") or single
- quote ("'"")) cchhaarraacctteerrss ccaann aappppeeaarr bbeettwweeeenn tthhee ppeerriioodd,,
- eexxccllaammaattiioonn ppooiinntt,, oorr qquueessttiioonn mmaarrkk aanndd tthhee wwhhiitteessppaaccee
- cchhaarraacctteerrss oorr eenndd--ooff--lliinnee..
-
- GGrroouuppss ooff eemmppttyy lliinneess ((oorr lliinneess ccoonnttaaiinniinngg oonnllyy wwhhiitteess--
- ppaaccee cchhaarraacctteerrss)) aarree ttrreeaatteedd aass aa ssiinnggllee sseenntteennccee..
-
-1133.. VVii CCoommmmaannddss
-
- The following section describes the commands available
-in the command mode of the vvii 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.
-
-[[ccoouunntt]] <<ccoonnttrrooll--AA>>
- Search forward count ttiimmeess ffoorr tthhee ccuurrrreenntt wwoorrdd.. TThhee
- ccuurrrreenntt wwoorrdd bbeeggiinnss aatt tthhee ffiirrsstt nnoonn--wwhhiitteessppaaccee cchhaarraacc--
- tteerr oonn oorr aafftteerr tthhee ccuurrrreenntt ccuurrssoorr ppoossiittiioonn,, aanndd
- eexxtteennddss uupp ttoo tthhee nneexxtt nnoonn--wwoorrdd cchhaarraacctteerr oorr tthhee eenndd ooff
- tthhee lliinnee.. TThhee sseeaarrcchh iiss lliitteerraall,, ii..ee.. nnoo cchhaarraacctteerrss iinn
- tthhee wwoorrdd hhaavvee aannyy ssppeecciiaall mmeeaanniinngg iinn tteerrmmss ooff RReegguullaarr
- EExxpprreessssiioonnss.. IItt iiss aann eerrrroorr iiff nnoo mmaattcchhiinngg ppaatttteerrnn iiss
- ffoouunndd bbeettwweeeenn tthhee ssttaarrttiinngg ppoossiittiioonn aanndd tthhee eenndd ooff tthhee
- ffiillee..
-
- TThhee <<ccoonnttrrooll--AA>> ccoommmmaanndd iiss aann aabbssoolluuttee mmoovveemmeenntt.. TThhee
- <<ccoonnttrrooll--AA>> ccoommmmaanndd mmaayy bbee uusseedd aass tthhee mmoottiioonn ccoommppoonneenntt
- ooff ootthheerr vvii ccoommmmaannddss,, iinn wwhhiicchh ccaassee aannyy tteexxtt ccooppiieedd
-
-
-
-
-
-
-
-
-
-
-UUSSDD::1133--2266 NNvvii//NNeexx RReeffeerreennccee ((VVii CCoommmmaannddss))
-
-
- iinnttoo aa bbuuffffeerr iiss cchhaarraacctteerr oorriieenntteedd..
-
- Line: Set to the line where the word is found.
- Column: Set to the first character of the word.
- Options: Affected by the iiggnnoorreeccaassee and wwrraappssccaann
- options.
-
-[[ccoouunntt]] <<ccoonnttrrooll--BB>>
- Page backward count ssccrreeeennss.. TTwwoo lliinneess ooff oovveerrllaapp aarree
- mmaaiinnttaaiinneedd,, iiff ppoossssiibbllee,, bbyy ddiissppllaayyiinngg tthhee wwiinnddooww
- ssttaarrttiinngg aatt lliinnee ((ttoopp__lliinnee -- ccoouunntt ** wwiinnddooww__ssiizzee)) ++ 22,
- where window_size iiss tthhee vvaalluuee ooff tthhee wwiinnddooww ooppttiioonn..
- ((IInn tthhee ccaassee ooff sspplliitt ssccrreeeennss,, tthhiiss ssiizzee iiss ccoorrrreecctteedd
- ttoo tthhee ccuurrrreenntt ssccrreeeenn ssiizzee..)) IItt iiss aann eerrrroorr iiff tthhee
- mmoovveemmeenntt iiss ppaasstt tthhee bbeeggiinnnniinngg ooff tthhee ffiillee..
-
- 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 wwiinnddooww option.
-
-[[ccoouunntt]] <<ccoonnttrrooll--DD>>
- Scroll forward count lliinneess.. IIff ccoouunntt is not specified,
- scroll forward the number of lines specified by the
- last <<ccoonnttrrooll--DD>> or <<ccoonnttrrooll--UU>> command. If this is
- the first <<ccoonnttrrooll--DD>> or <<ccoonnttrrooll--UU>> 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.
-
-[[ccoouunntt]] <<ccoonnttrrooll--EE>>
- Scroll forward count lliinneess,, lleeaavviinngg tthhee ccuurrssoorr oonn tthhee
- ccuurrrreenntt lliinnee aanndd ccoolluummnn,, iiff ppoossssiibbllee.. IItt iiss aann eerrrroorr
- iiff tthhee mmoovveemmeenntt iiss ppaasstt tthhee eenndd ooff tthhee ffiillee..
-
- 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.
-
-
-
-
-
-
-
-
-
-
-
-
-NNvvii//NNeexx RReeffeerreennccee ((VVii CCoommmmaannddss)) UUSSDD::1133--2277
-
-
-[[ccoouunntt]] <<ccoonnttrrooll--FF>>
- Page forward count ssccrreeeennss.. TTwwoo lliinneess ooff oovveerrllaapp aarree
- mmaaiinnttaaiinneedd,, iiff ppoossssiibbllee,, bbyy ddiissppllaayyiinngg tthhee wwiinnddooww
- ssttaarrttiinngg aatt lliinnee ttoopp__lliinnee ++ ccoouunntt ** wwiinnddooww__ssiizzee -- 22,
- where window_size iiss tthhee vvaalluuee ooff tthhee wwiinnddooww ooppttiioonn..
- ((IInn tthhee ccaassee ooff sspplliitt ssccrreeeennss,, tthhiiss ssiizzee iiss ccoorrrreecctteedd
- ttoo tthhee ccuurrrreenntt ssccrreeeenn ssiizzee..)) IItt iiss aann eerrrroorr iiff tthhee
- mmoovveemmeenntt iiss ppaasstt tthhee eenndd ooff tthhee ffiillee..
-
- Line: Set to the first line on the screen.
- Column: Set to the first nonblank character of the
- current line.
- Options: Affected by the wwiinnddooww option.
-
-<<ccoonnttrrooll--GG>>
- 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.
-
-[[ccoouunntt]] <<ccoonnttrrooll--HH>>
-[[ccoouunntt]] hh
- Move the cursor back count cchhaarraacctteerrss iinn tthhee ccuurrrreenntt
- lliinnee.. IItt iiss aann eerrrroorr iiff tthhee ccuurrssoorr iiss oonn tthhee ffiirrsstt
- cchhaarraacctteerr iinn tthhee lliinnee..
-
- TThhee <<ccoonnttrrooll--HH>> aanndd hh ccoommmmaannddss mmaayy bbee uusseedd aass tthhee
- mmoottiioonn ccoommppoonneenntt ooff ootthheerr vvii ccoommmmaannddss,, iinn wwhhiicchh ccaassee
- aannyy tteexxtt ccooppiieedd iinnttoo aa bbuuffffeerr iiss cchhaarraacctteerr oorriieenntteedd..
-
- 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.
-
-[[ccoouunntt]] <<ccoonnttrrooll--JJ>>
-[[ccoouunntt]] <<ccoonnttrrooll--NN>>
-[[ccoouunntt]] jj
- Move the cursor down count lliinneess wwiitthhoouutt cchhaannggiinngg tthhee
- ccuurrrreenntt ccoolluummnn.. IItt iiss aann eerrrroorr iiff tthhee mmoovveemmeenntt iiss ppaasstt
- tthhee eenndd ooff tthhee ffiillee..
-
- TThhee <<ccoonnttrrooll--JJ>>,, <<ccoonnttrrooll--NN>> aanndd jj ccoommmmaannddss mmaayy bbee uusseedd
- aass tthhee mmoottiioonn ccoommppoonneenntt ooff ootthheerr vvii ccoommmmaannddss,, iinn wwhhiicchh
-
-
-
-
-
-
-
-
-
-
-UUSSDD::1133--2288 NNvvii//NNeexx RReeffeerreennccee ((VVii CCoommmmaannddss))
-
-
- ccaassee aannyy tteexxtt ccooppiieedd iinnttoo aa bbuuffffeerr iiss lliinnee oorriieenntteedd..
-
- Line: Set to the current line plus count..
- Column: The most attractive cursor position.
- Options: None.
-
-<<ccoonnttrrooll--LL>>
-<<ccoonnttrrooll--RR>>
- Repaint the screen.
-
- Line: Unchanged.
- Column: Unchanged.
- Options: None.
-
-[[ccoouunntt]] <<ccoonnttrrooll--MM>>
-[[ccoouunntt]] ++
- Move the cursor down count lliinneess ttoo tthhee ffiirrsstt nnoonnbbllaannkk
- cchhaarraacctteerr ooff tthhaatt lliinnee.. IItt iiss aann eerrrroorr iiff tthhee mmoovveemmeenntt
- iiss ppaasstt tthhee eenndd ooff tthhee ffiillee..
-
- TThhee <<ccoonnttrrooll--MM>> aanndd ++ ccoommmmaannddss mmaayy bbee uusseedd aass tthhee
- mmoottiioonn ccoommppoonneenntt ooff ootthheerr vvii ccoommmmaannddss,, iinn wwhhiicchh ccaassee
- aannyy tteexxtt ccooppiieedd iinnttoo aa bbuuffffeerr iiss lliinnee oorriieenntteedd..
-
- Line: Set to the current line plus count..
- Column: Set to the first nonblank character in the
- line.
- Options: None.
-
-[[ccoouunntt]] <<ccoonnttrrooll--PP>>
-[[ccoouunntt]] kk
- Move the cursor up count lliinneess,, wwiitthhoouutt cchhaannggiinngg tthhee
- ccuurrrreenntt ccoolluummnn.. IItt iiss aann eerrrroorr iiff tthhee mmoovveemmeenntt iiss ppaasstt
- tthhee bbeeggiinnnniinngg ooff tthhee ffiillee..
-
- TThhee <<ccoonnttrrooll--PP>> aanndd kk ccoommmmaannddss mmaayy bbee uusseedd aass tthhee
- mmoottiioonn ccoommppoonneenntt ooff ootthheerr vvii ccoommmmaannddss,, iinn wwhhiicchh ccaassee
- aannyy tteexxtt ccooppiieedd iinnttoo aa bbuuffffeerr iiss lliinnee oorriieenntteedd..
-
- Line: Set to the current line minus count..
- Column: The most attractive cursor position.
- Options: None.
-
-<<ccoonnttrrooll--TT>>
- Return to the most recent tag context. The <<ccoonnttrrooll--TT>>
- 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.
-
-
-
-
-
-
-
-
-
-
-
-NNvvii//NNeexx RReeffeerreennccee ((VVii CCoommmmaannddss)) UUSSDD::1133--2299
-
-
-[[ccoouunntt]] <<ccoonnttrrooll--UU>>
- Scroll backward count lliinneess.. IIff ccoouunntt is not speci-
- fied, scroll backward the number of lines specified by
- the last <<ccoonnttrrooll--DD>> or <<ccoonnttrrooll--UU>> command. If this
- is the first <<ccoonnttrrooll--DD>> or <<ccoonnttrrooll--UU>> 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.
-
-<<ccoonnttrrooll--WW>>
- 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.
-
-[[ccoouunntt]] <<ccoonnttrrooll--YY>>
- Scroll backward count lliinneess,, lleeaavviinngg tthhee ccuurrrreenntt lliinnee
- aanndd ccoolluummnn aass iiss,, iiff ppoossssiibbllee.. IItt iiss aann eerrrroorr iiff tthhee
- mmoovveemmeenntt iiss ppaasstt tthhee bbeeggiinnnniinngg ooff tthhee ffiillee..
-
- 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.
-
-<<ccoonnttrrooll--ZZ>>
- Suspend the current editor session. If the file has
- been modified since it was last completely written, and
- the aauuttoowwrriittee 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 aauuttoowwrriittee option.
-
-
-
-
-
-
-
-
-
-
-
-
-UUSSDD::1133--3300 NNvvii//NNeexx RReeffeerreennccee ((VVii CCoommmmaannddss))
-
-
-<<eessccaappee>>
- Execute eexx commands or cancel partial commands. If an
- eexx command is being entered (e.g. //, ??, :: or !!), the
- command is executed. If a partial command has been
- entered, e.g. "[0-9]*"",, oorr ""[[00--99]]**[[!!<<>>ccddyy]]", the com-
- mand is cancelled. Otherwise, it is an error.
-
- Line: When an eexx command is being executed, the cur-
- rent line is set as described for that com-
- mand. Otherwise, unchanged.
- Column: When an eexx command is being executed, the cur-
- rent column is set as described for that com-
- mand. Otherwise, unchanged.
- Options: None.
-
-<<ccoonnttrrooll--]]>>
- Push a tag reference onto the tag stack. The tags
- files (see the ttaaggss 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 <<ccoonn--
- ttrrooll--]]>> 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 ttaaggss and ttaagglleennggtthh options.
-
-<<ccoonnttrrooll--^^>>
- Switch to the most recently edited file.
-
- If the file has been modified since it was last com-
- pletely written, and the aauuttoowwrriittee option is set, the
- file is written out. If this write fails, the command
- will fail. Otherwise, if the current file has been
- modified since it was last completely written, the com-
- mand will fail.
-
- Line: Set to the line the cursor was on when the
- file was last edited.
- Column: Set to the column the cursor was on when the
- file was last edited.
- Options: Affected by the aauuttoowwrriittee option.
-
-[[ccoouunntt]] <<ssppaaccee>>
-
-
-
-
-
-
-
-
-
-
-
-NNvvii//NNeexx RReeffeerreennccee ((VVii CCoommmmaannddss)) UUSSDD::1133--3311
-
-
-[[ccoouunntt]] ll
- Move the cursor forward count cchhaarraacctteerrss wwiitthhoouutt cchhaanngg--
- iinngg tthhee ccuurrrreenntt lliinnee.. IItt iiss aann eerrrroorr iiff tthhee ccuurrssoorr iiss
- oonn tthhee llaasstt cchhaarraacctteerr iinn tthhee lliinnee..
-
- TThhee <<ssppaaccee>> aanndd ll ccoommmmaannddss mmaayy bbee uusseedd aass tthhee mmoottiioonn
- ccoommppoonneenntt ooff ootthheerr vvii ccoommmmaannddss,, iinn wwhhiicchh ccaassee aannyy tteexxtt
- ccooppiieedd iinnttoo aa bbuuffffeerr iiss cchhaarraacctteerr oorriieenntteedd.. IInn aaddddii--
- ttiioonn,, tthheessee ccoommmmaannddss mmaayy bbee uusseedd aass tthhee mmoottiioonn ccoommppoo--
- nneennttss ooff ootthheerr ccoommmmaannddss wwhheenn tthhee ccuurrssoorr iiss oonn tthhee llaasstt
- cchhaarraacctteerr iinn tthhee lliinnee,, wwiitthhoouutt eerrrroorr..
-
- 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.
-
-[[ccoouunntt]] !! mmoottiioonn sshheellll--aarrgguummeenntt((ss))<<ccaarrrriiaaggee--rreettuurrnn>>
- Replace text with results from a shell command. Pass
- the lines specified by the count aanndd mmoottiioonn arguments
- as standard input to the program named by the sshheellll
- option, and replace those lines with the output (both
- standard error and standard output) of that command.
-
- After the motion is entered, vvii prompts for arguments
- to the shell command.
-
- Within those arguments, "%"" aanndd ""##" characters are
- expanded to the current and alternate pathnames,
- respectively. The "!"" cchhaarraacctteerr iiss eexxppaannddeedd wwiitthh tthhee
- ccoommmmaanndd tteexxtt ooff tthhee pprreevviioouuss !! oorr ::!! ccoommmmaannddss..
- ((TThheerreeffoorree,, tthhee ccoommmmaanndd !!<<mmoottiioonn>>!! rreeppeeaattss tthhee pprreevvii--
- oouuss !! ccoommmmaanndd..)) TThhee ssppeecciiaall mmeeaanniinnggss ooff ""%%"",, ""##"" aanndd
- ""!!"" ccaann bbee oovveerrrriiddddeenn bbyy eessccaappiinngg tthheemm wwiitthh aa bbaacckk--
- ssllaasshh.. IIff nnoo !! oorr ::!! ccoommmmaanndd hhaass yyeett bbeeeenn eexxeeccuutteedd,,
- iitt iiss aann eerrrroorr ttoo uussee aann uunneessccaappeedd ""!!"" cchhaarraacctteerr aass aa
- sshheellll aarrgguummeenntt.. TThhee !! ccoommmmaanndd ddooeess _n_o_t ddoo sshheellll
- eexxppaannssiioonn oonn tthhee ssttrriinnggss pprroovviiddeedd aass aarrgguummeennttss.. IIff aannyy
- ooff tthhee aabboovvee eexxppaannssiioonnss cchhaannggee tthhee aarrgguummeennttss tthhee uusseerr
- eenntteerreedd,, tthhee ccoommmmaanndd iiss rreeddiissppllaayyeedd aatt tthhee bboottttoomm ooff
- tthhee ssccrreeeenn..
-
- VVii tthheenn eexxeeccuutteess tthhee pprrooggrraamm nnaammeedd bbyy tthhee sshheellll ooppttiioonn,,
- wwiitthh aa --cc ffllaagg ffoolllloowweedd bbyy tthhee aarrgguummeennttss ((wwhhiicchh aarree
- bbuunnddlleedd iinnttoo aa ssiinnggllee aarrgguummeenntt))..
-
- TThhee !! ccoommmmaanndd iiss ppeerrmmiitttteedd iinn aann eemmppttyy ffiillee..
-
- IIff tthhee ffiillee hhaass bbeeeenn mmooddiiffiieedd ssiinnccee iitt wwaass llaasstt ccoomm--
- pplleetteellyy wwrriitttteenn,, tthhee !! ccoommmmaanndd wwiillll wwaarrnn yyoouu..
-
-
-
-
-
-
-
-
-
-
-UUSSDD::1133--3322 NNvvii//NNeexx RReeffeerreennccee ((VVii CCoommmmaannddss))
-
-
- Line: The first line of the replaced text.
- Column: The first column of the replaced text.
- Options: Affected by the sshheellll option.
-
-[[ccoouunntt]] ## ##||++||--
- Increment or decrement the number referenced by the
- cursor. If the trailing character is a + oorr ##, the
- number is incremented by count.. IIff tthhee ttrraaiilliinngg cchhaarr--
- aacctteerr iiss aa --, the number is decremented by count..
-
- AA lleeaaddiinngg ""00XX" or "0x"" ccaauusseess tthhee nnuummbbeerr ttoo bbee iinntteerr--
- pprreetteedd aass aa hheexxaaddeecciimmaall nnuummbbeerr.. OOtthheerrwwiissee,, aa lleeaaddiinngg
- ""00" 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 + oorr -- 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"".. SSiimmii--
- llaarrllyy,, ddeecciimmaall nnuummbbeerrss aanndd tthheeiirr rreessuulltt mmuusstt ffiitt iinnttoo aa
- ""ssiiggnneedd lloonngg". 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.
-
-[[ccoouunntt]] $$
- Move the cursor to the end of a line. If count iiss
- ssppeecciiffiieedd,, tthhee ccuurrssoorr mmoovveess ddoowwnn ccoouunntt -- 11 lines.
-
- It is not an error to use the $$ command when the cursor
- is on the last character in the line or when the line
- is empty.
-
- The $$ command may be used as the motion component of
- other vvii 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.
-
-
-
-
-
-
-
-
-
-
-
-NNvvii//NNeexx RReeffeerreennccee ((VVii CCoommmmaannddss)) UUSSDD::1133--3333
-
-
- 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 ssppeecciiffiieedd ttoo tthhee %% ccoommmmaanndd wwaass
- iiggnnoorreedd..
-
- TThhee %% ccoommmmaanndd iiss aann aabbssoolluuttee mmoovveemmeenntt.. TThhee %% ccoommmmaanndd
- mmaayy bbee uusseedd aass tthhee mmoottiioonn ccoommppoonneenntt ooff ootthheerr vvii ccoomm--
- mmaannddss,, iinn wwhhiicchh ccaassee aannyy tteexxtt ccooppiieedd iinnttoo aa bbuuffffeerr iiss
- cchhaarraacctteerr oorriieenntteedd,, uunnlleessss tthhee ssttaarrttiinngg ppooiinntt ooff tthhee
- rreeggiioonn iiss aatt oorr bbeeffoorree tthhee ffiirrsstt nnoonnbbllaannkk cchhaarraacctteerr oonn
- iittss lliinnee,, aanndd tthhee eennddiinngg ppooiinntt iiss aatt oorr aafftteerr tthhee llaasstt
- nnoonnbbllaannkk cchhaarraacctteerr oonn iittss lliinnee,, iinn wwhhiicchh ccaassee iitt iiss
- lliinnee oorriieenntteedd..
-
- 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 ssppeecciiffiieedd ttoo tthhee && ccoommmmaanndd wwaass
- iiggnnoorreedd..
-
- 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 eeddccoommppaattiibbllee, eexxtteennddeedd,
- iiggnnoorreeccaassee and mmaaggiicc options.
-
-''<<cchhaarraacctteerr>>
-``<<cchhaarraacctteerr>>
- Return to a context marked by the character <charac-
- ter>.. IIff <<cchhaarraacctteerr>> is the "'"" oorr ""``" character,
- return to the previous context. If <character> iiss aannyy
- ootthheerr cchhaarraacctteerr,, rreettuurrnn ttoo tthhee ccoonntteexxtt mmaarrkkeedd bbyy tthhaatt
- cchhaarraacctteerr ((sseeee tthhee mm ccoommmmaanndd ffoorr mmoorree iinnffoorrmmaattiioonn)).. IIff
- tthhee ccoommmmaanndd iiss tthhee '' ccoommmmaanndd,, oonnllyy tthhee lliinnee vvaalluuee iiss
- rreessttoorreedd,, aanndd tthhee ccuurrssoorr iiss ppllaacceedd oonn tthhee ffiirrsstt nnoonn--
- bbllaannkk cchhaarraacctteerr ooff tthhaatt lliinnee.. IIff tthhee ccoommmmaanndd iiss tthhee ``
- ccoommmmaanndd,, bbootthh tthhee lliinnee aanndd ccoolluummnn vvaalluueess aarree rreessttoorreedd..
-
-
-
-
-
-
-
-
-
-
-UUSSDD::1133--3344 NNvvii//NNeexx RReeffeerreennccee ((VVii CCoommmmaannddss))
-
-
- IItt iiss aann eerrrroorr iiff tthhee ccoonntteexxtt nnoo lloonnggeerr eexxiissttss bbeeccaauussee
- ooff lliinnee ddeelleettiioonn.. ((CCoonntteexxttss ffoollllooww lliinneess tthhaatt aarree
- mmoovveedd,, oorr wwhhiicchh aarree ddeelleetteedd aanndd tthheenn rreessttoorreedd..))
-
- TThhee '' aanndd `` ccoommmmaannddss aarree bbootthh aabbssoolluuttee mmoovveemmeennttss.. TThheeyy
- mmaayy bbee uusseedd aass aa mmoottiioonn ccoommppoonneenntt ffoorr ootthheerr vvii ccoomm--
- mmaannddss.. FFoorr tthhee '' ccoommmmaanndd,, aannyy tteexxtt ccooppiieedd iinnttoo aa
- bbuuffffeerr iiss lliinnee oorriieenntteedd.. FFoorr tthhee `` ccoommmmaanndd,, aannyy tteexxtt
- ccooppiieedd iinnttoo aa bbuuffffeerr iiss cchhaarraacctteerr oorriieenntteedd,, uunnlleessss iitt
- bbootthh ssttaarrttss aanndd ssttooppss aatt tthhee ffiirrsstt cchhaarraacctteerr iinn tthhee
- lliinnee,, iinn wwhhiicchh ccaassee iitt iiss lliinnee oorriieenntteedd.. IInn aaddddiittiioonn,,
- wwhheenn uussiinngg tthhee `` ccoommmmaanndd aass aa mmoottiioonn ccoommppoonneenntt,, ccoomm--
- mmaannddss wwhhiicchh mmoovvee bbaacckkwwaarrdd aanndd ssttaarrtteedd aatt tthhee ffiirrsstt
- cchhaarraacctteerr iinn tthhee lliinnee,, oorr mmoovvee ffoorrwwaarrdd aanndd eennddeedd aatt tthhee
- ffiirrsstt cchhaarraacctteerr iinn tthhee lliinnee,, aarree ccoorrrreecctteedd ttoo tthhee llaasstt
- cchhaarraacctteerr ooff tthhee lliinnee pprreecceeddiinngg tthhee ssttaarrttiinngg aanndd eennddiinngg
- lliinneess,, rreessppeeccttiivveellyy..
-
- 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.
-
-[[ccoouunntt]] ((
- Back up count sseenntteenncceess..
-
- TThhee (( ccoommmmaanndd iiss aann aabbssoolluuttee mmoovveemmeenntt.. TThhee (( ccoommmmaanndd
- mmaayy bbee uusseedd aass tthhee mmoottiioonn ccoommppoonneenntt ooff ootthheerr vvii ccoomm--
- mmaannddss,, iinn wwhhiicchh ccaassee aannyy tteexxtt ccooppiieedd iinnttoo aa bbuuffffeerr iiss
- cchhaarraacctteerr oorriieenntteedd,, uunnlleessss tthhee ssttaarrttiinngg aanndd ssttooppppiinngg
- ppooiinnttss ooff tthhee rreeggiioonn aarree tthhee ffiirrsstt cchhaarraacctteerr iinn tthhee
- lliinnee,, iinn wwhhiicchh ccaassee iitt iiss lliinnee oorriieenntteedd.. IIff iitt iiss lliinnee
- oorriieenntteedd,, tthhee ssttaarrttiinngg ppooiinntt ooff tthhee rreeggiioonn iiss aaddjjuusstteedd
- ttoo bbee tthhee eenndd ooff tthhee lliinnee iimmmmeeddiiaatteellyy bbeeffoorree tthhee ssttaarrtt--
- iinngg ccuurrssoorr ppoossiittiioonn..
-
- 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 lliisspp option.
-
-[[ccoouunntt]] ))
- Move forward count sseenntteenncceess..
-
- TThhee )) ccoommmmaanndd iiss aann aabbssoolluuttee mmoovveemmeenntt.. TThhee )) ccoommmmaanndd
- mmaayy bbee uusseedd aass tthhee mmoottiioonn ccoommppoonneenntt ooff ootthheerr vvii ccoomm--
- mmaannddss,, iinn wwhhiicchh ccaassee aannyy tteexxtt ccooppiieedd iinnttoo aa bbuuffffeerr iiss
- cchhaarraacctteerr oorriieenntteedd,, uunnlleessss tthhee ssttaarrttiinngg ppooiinntt ooff tthhee
- rreeggiioonn iiss tthhee ffiirrsstt cchhaarraacctteerr iinn tthhee lliinnee,, iinn wwhhiicchh
- ccaassee iitt iiss lliinnee oorriieenntteedd.. IInn tthhee llaatttteerr ccaassee,, iiff tthhee
- ssttooppppiinngg ppooiinntt ooff tthhee rreeggiioonn iiss aallssoo tthhee ffiirrsstt
-
-
-
-
-
-
-
-
-
-
-NNvvii//NNeexx RReeffeerreennccee ((VVii CCoommmmaannddss)) UUSSDD::1133--3355
-
-
- cchhaarraacctteerr iinn tthhee lliinnee,, iitt iiss aaddjjuusstteedd ttoo bbee tthhee eenndd ooff
- tthhee lliinnee iimmmmeeddiiaatteellyy bbeeffoorree iitt..
-
- 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 lliisspp option.
-
-[[ccoouunntt]] ,,
- Reverse find character count ttiimmeess.. RReevveerrssee tthhee llaasstt
- FF,, ff,, TT oorr tt ccoommmmaanndd,, sseeaarrcchhiinngg tthhee ootthheerr wwaayy iinn tthhee
- lliinnee,, ccoouunntt ttiimmeess.. IItt iiss aann eerrrroorr iiff aa FF,, ff,, TT oorr tt
- ccoommmmaanndd hhaass nnoott bbeeeenn ppeerrffoorrmmeedd yyeett..
-
- TThhee ,, ccoommmmaanndd mmaayy bbee uusseedd aass tthhee mmoottiioonn ccoommppoonneenntt ooff
- ootthheerr vvii ccoommmmaannddss,, iinn wwhhiicchh ccaassee aannyy tteexxtt ccooppiieedd iinnttoo aa
- bbuuffffeerr iiss cchhaarraacctteerr oorriieenntteedd..
-
- Line: Unchanged.
- Column: Set to the searched-for character for the FF
- and ff commands, before the character for the tt
- command and after the character for the TT com-
- mand.
- Options: None.
-
-[[ccoouunntt]] --
- Move to the first nonblank of the previous line, count
- ttiimmeess..
-
- IItt iiss aann eerrrroorr iiff tthhee mmoovveemmeenntt iiss ppaasstt tthhee bbeeggiinnnniinngg ooff
- tthhee ffiillee..
-
- TThhee -- ccoommmmaanndd mmaayy bbee uusseedd aass tthhee mmoottiioonn ccoommppoonneenntt ooff
- ootthheerr vvii ccoommmmaannddss,, iinn wwhhiicchh ccaassee aannyy tteexxtt ccooppiieedd iinnttoo aa
- bbuuffffeerr iiss lliinnee oorriieenntteedd..
-
- Line: Set to the current line minus count..
- Column: Set to the first nonblank character in the
- line.
- Options: None.
-
-[[ccoouunntt]] ..
- Repeat the last vvii command that modified text. The
- repeated command may be a command and motion component
- combination. If count iiss ssppeecciiffiieedd,, iitt rreeppllaacceess _b_o_t_h
- tthhee ccoouunntt ssppeecciiffiieedd ffoorr tthhee rreeppeeaatteedd ccoommmmaanndd,, aanndd,, iiff
- aapppplliiccaabbllee,, ffoorr tthhee rreeppeeaatteedd mmoottiioonn ccoommppoonneenntt.. IIff
- ccoouunntt _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 uu _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
-
-
-
-
-
-
-
-
-
-
-UUSSDD::1133--3366 NNvvii//NNeexx RReeffeerreennccee ((VVii CCoommmmaannddss))
-
-
- _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 uu
- _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.
-
-//RREE<<ccaarrrriiaaggee--rreettuurrnn>>
-//RREE// [[ooffffsseett]]<<ccaarrrriiaaggee--rreettuurrnn>>
-??RREE<<ccaarrrriiaaggee--rreettuurrnn>>
-??RREE?? [[ooffffsseett]]<<ccaarrrriiaaggee--rreettuurrnn>>
-NN
-nn
- Search forward or backward for a regular expression.
- The commands beginning with a slash ("/"")) cchhaarraacctteerr aarree
- ffoorrwwaarrdd sseeaarrcchheess,, tthhee ccoommmmaannddss bbeeggiinnnniinngg wwiitthh aa qquueess--
- ttiioonn mmaarrkk ((""??") are backward searches. VVii 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 vvii 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 wwrraappssccaann option is
- set.)
-
- If an offset from the matched line is specified (i.e. a
- trailing "/"" oorr ""??" character is followed by a signed
- offset), the buffer will always be line oriented (e.g.
- "/string/+0"" wwiillll aallwwaayyss gguuaarraanntteeee aa lliinnee oorriieennttaattiioonn))..
-
- TThhee NN ccoommmmaanndd rreeppeeaattss tthhee pprreevviioouuss sseeaarrcchh,, bbuutt iinn tthhee
- rreevveerrssee ddiirreeccttiioonn.. TThhee nn ccoommmmaanndd rreeppeeaattss tthhee pprreevviioouuss
- sseeaarrcchh.. IIff eeiitthheerr tthhee NN oorr nn ccoommmmaannddss aarree uusseedd aass
- mmoottiioonn ccoommppoonneennttss ffoorr tthhee !! ccoommmmaanndd,, yyoouu wwiillll nnoott bbee
- pprroommpptteedd ffoorr tthhee tteexxtt ooff tthhee bbaanngg ccoommmmaanndd,, iinnsstteeaadd tthhee
- pprreevviioouuss bbaanngg ccoommmmaanndd wwiillll bbee eexxeeccuutteedd..
-
- MMiissssiinngg RREE''ss ((ee..gg.. ""////<<ccaarrrriiaaggee--rreettuurrnn>>"",, ""//<<ccaarrrriiaaggee--
- rreettuurrnn>>"",, ""????<<ccaarrrriiaaggee--rreettuurrnn>>"",, oorr ""??<<ccaarrrriiaaggee--
- rreettuurrnn>>"" sseeaarrcchh ffoorr tthhee llaasstt sseeaarrcchh RREE,, iinn tthhee iinnddii--
- ccaatteedd ddiirreeccttiioonn..
-
- SSeeaarrcchheess mmaayy bbee iinntteerrrruupptteedd uussiinngg tthhee <<iinntteerrrruupptt>>
-
-
-
-
-
-
-
-
-
-
-NNvvii//NNeexx RReeffeerreennccee ((VVii CCoommmmaannddss)) UUSSDD::1133--3377
-
-
- cchhaarraacctteerr..
-
- MMuullttiippllee sseeaarrcchh ppaatttteerrnnss mmaayy bbee ggrroouuppeedd ttooggeetthheerr bbyy
- ddeelliimmiittiinngg tthheemm wwiitthh sseemmiiccoolloonnss aanndd zzeerroo oorr mmoorree
- wwhhiitteessppaaccee cchhaarraacctteerrss,, ee..gg.. //ffoooo// ;; ??bbaarr?? sseeaarrcchheess
- ffoorrwwaarrdd ffoorr ffoooo aanndd tthheenn,, ffrroomm tthhaatt llooccaattiioonn,, bbaacckkwwaarrddss
- ffoorr bbaarr.. WWhheenn sseeaarrcchh ppaatttteerrnnss aarree ggrroouuppeedd ttooggeetthheerr iinn
- tthhiiss mmaannnneerr,, tthhee sseeaarrcchh ppaatttteerrnnss aarree eevvaalluuaatteedd lleefftt ttoo
- rriigghhtt wwiitthh tthhee ffiinnaall ccuurrssoorr ppoossiittiioonn ddeetteerrmmiinneedd bbyy tthhee
- llaasstt sseeaarrcchh ppaatttteerrnn..
-
- IItt iiss aallssoo ppeerrmmiissssiibbllee ttoo aappppeenndd aa zz ccoommmmaanndd ttoo tthhee
- sseeaarrcchh ssttrriinnggss,, ee..gg.. //ffoooo// zz.. sseeaarrcchheess ffoorrwwaarrdd ffoorr
- tthhee nneexxtt ooccccuurrrreennccee ooff ffoooo,, aanndd tthheenn ppoossiittiioonnss tthhaatt
- lliinnee iinn tthhee mmiiddddllee ooff ssccrreeeenn..
-
- Line: Set to the line in which the match occurred.
- Column: Set to the first character of the matched
- string.
- Options: Affected by the eeddccoommppaattiibbllee, eexxtteennddeedd,
- iiggnnoorreeccaassee, mmaaggiicc, and wwrraappssccaann options.
-
-00
- Move to the first character in the current line. It is
- not an error to use the 00 command when the cursor is on
- the first character in the line,
-
- The 00 command may be used as the motion component of
- other vvii 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 eexx command. VVii prompts for an eexx command on
- the last line of the screen, using a colon (":"")) cchhaarr--
- aacctteerr.. TThhee ccoommmmaanndd iiss tteerrmmiinnaatteedd bbyy aa <<ccaarrrriiaaggee--
- rreettuurrnn>>, <newline> oorr <<eessccaappee>> character; all of these
- characters may be escaped by using a <literal-next>
- cchhaarraacctteerr.. TThhee ccoommmmaanndd iiss tthheenn eexxeeccuutteedd..
-
- IIff tthhee eexx ccoommmmaanndd wwrriitteess ttoo tthhee ssccrreeeenn,, vvii wwiillll pprroommpptt
- tthhee uusseerr ffoorr aa <<ccaarrrriiaaggee--rreettuurrnn>> bbeeffoorree ccoonnttiinnuuiinngg wwhheenn
- tthhee eexx ccoommmmaanndd ffiinniisshheess.. LLaarrggee aammoouunnttss ooff oouuttppuutt ffrroomm
- tthhee eexx ccoommmmaanndd wwiillll bbee ppaaggeedd ffoorr tthhee uusseerr,, aanndd tthhee uusseerr
- pprroommpptteedd ffoorr aa <<ccaarrrriiaaggee--rreettuurrnn>> oorr <<ssppaaccee>> kkeeyy ttoo ccoonn--
- ttiinnuuee.. IInn ssoommee ccaasseess,, aa qquuiitt ((nnoorrmmaallllyy aa ""qq"" cchhaarraacc--
- tteerr)) oorr <<iinntteerrrruupptt>> mmaayy bbee eenntteerreedd ttoo iinntteerrrruupptt tthhee eexx
- ccoommmmaanndd..
-
-
-
-
-
-
-
-
-
-
-
-UUSSDD::1133--3388 NNvvii//NNeexx RReeffeerreennccee ((VVii CCoommmmaannddss))
-
-
- WWhheenn tthhee eexx ccoommmmaanndd ffiinniisshheess,, aanndd tthhee uusseerr iiss pprroommpptteedd
- ttoo rreessuummee vviissuuaall mmooddee,, iitt iiss aallssoo ppoossssiibbllee ttoo eenntteerr
- aannootthheerr ""::"" cchhaarraacctteerr ffoolllloowweedd bbyy aannootthheerr eexx ccoommmmaanndd..
-
- Line: The current line is set as described for the
- eexx command.
- Column: The current column is set as described for the
- eexx command.
- Options: Affected as described for the eexx command.
-
-[[ccoouunntt]] ;;
- Repeat the last character find count ttiimmeess.. TThhee llaasstt
- cchhaarraacctteerr ffiinndd iiss oonnee ooff tthhee FF,, ff,, TT oorr tt ccoommmmaannddss.. IItt
- iiss aann eerrrroorr iiff aa FF,, ff,, TT oorr tt ccoommmmaanndd hhaass nnoott bbeeeenn ppeerr--
- ffoorrmmeedd yyeett..
-
- TThhee ;; ccoommmmaanndd mmaayy bbee uusseedd aass tthhee mmoottiioonn ccoommppoonneenntt ooff
- ootthheerr vvii ccoommmmaannddss,, iinn wwhhiicchh ccaassee aannyy tteexxtt ccooppiieedd iinnttoo aa
- bbuuffffeerr iiss cchhaarraacctteerr oorriieenntteedd..
-
- Line: Unchanged.
- Column: Set to the searched-for character for the FF
- and ff commands, before the character for the tt
- command and after the character for the TT com-
- mand.
- Options: None.
-
-[[ccoouunntt]] << mmoottiioonn
-[[ccoouunntt]] >> mmoottiioonn
- Shift lines left or right. Shift the number of lines
- in the region specified by the count aanndd mmoottiioonn left
- (for the << command) or right (for the >> command) by the
- number of columns specified by the sshhiiffttwwiiddtthh 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.
- Options: Affected by the sshhiiffttwwiiddtthh option.
-
-@@ bbuuffffeerr
- Execute a named buffer. Execute the named buffer as vvii
- commands. The buffer may include eexx commands, too, but
- they must be expressed as a :: command. If the buffer
- is line oriented, <newline> cchhaarraacctteerrss aarree llooggiiccaallllyy
- aappppeennddeedd ttoo eeaacchh lliinnee ooff tthhee bbuuffffeerr.. IIff tthhee bbuuffffeerr iiss
- cchhaarraacctteerr oorriieenntteedd,, <<nneewwlliinnee>> characters are logically
- appended to all but the last line in the buffer.
-
- If the buffer name is "@"",, oorr ""**", then the last buffer
-
-
-
-
-
-
-
-
-
-
-NNvvii//NNeexx RReeffeerreennccee ((VVii CCoommmmaannddss)) UUSSDD::1133--3399
-
-
- executed shall be used. It is an error to specify "@@""
- oorr ""@@**" 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> cchhaarraacctteerr mmaayy bbee uusseedd ttoo iinntteerrrruupptt tthhee
- lloooopp..))
-
- 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.
-
-[[ccoouunntt]] AA
- Enter input mode, appending the text after the end of
- the line. If count iiss ssppeecciiffiieedd,, tthhee tteexxtt iiss rreeppeeaatt--
- eeddllyy iinnppuutt ccoouunntt -- 11 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 aallttwweerraassee, aauuttooiinnddeenntt, bbeeaauu--
- ttiiffyy, sshhoowwmmaattcchh, ttttyywweerraassee and wwrraappmmaarrggiinn
- options.
-
-[[ccoouunntt]] BB
- Move backward count bbiiggwwoorrddss.. MMoovvee tthhee ccuurrssoorr bbaacckkwwaarrdd
- ttoo tthhee bbeeggiinnnniinngg ooff aa bbiiggwwoorrdd bbyy rreeppeeaattiinngg tthhee ffoollllooww--
- iinngg aallggoorriitthhmm:: iiff tthhee ccuurrrreenntt ppoossiittiioonn iiss aatt tthhee bbeeggiinn--
- nniinngg ooff aa bbiiggwwoorrdd oorr tthhee cchhaarraacctteerr aatt tthhee ccuurrrreenntt ppoossii--
- ttiioonn ccaannnnoott bbee ppaarrtt ooff aa bbiiggwwoorrdd,, mmoovvee ttoo tthhee ffiirrsstt
- cchhaarraacctteerr ooff tthhee pprreecceeddiinngg bbiiggwwoorrdd.. OOtthheerrwwiissee,, mmoovvee ttoo
- tthhee ffiirrsstt cchhaarraacctteerr ooff tthhee bbiiggwwoorrdd aatt tthhee ccuurrrreenntt ppoossii--
- ttiioonn.. IIff nnoo pprreecceeddiinngg bbiiggwwoorrdd eexxiissttss oonn tthhee ccuurrrreenntt
- lliinnee,, mmoovvee ttoo tthhee ffiirrsstt cchhaarraacctteerr ooff tthhee llaasstt bbiiggwwoorrdd
- oonn tthhee ffiirrsstt pprreecceeddiinngg lliinnee tthhaatt ccoonnttaaiinnss aa bbiiggwwoorrdd..
-
- TThhee BB ccoommmmaanndd mmaayy bbee uusseedd aass tthhee mmoottiioonn ccoommppoonneenntt ooff
- ootthheerr vvii ccoommmmaannddss,, iinn wwhhiicchh ccaassee aannyy tteexxtt ccooppiieedd iinnttoo aa
- bbuuffffeerr iiss cchhaarraacctteerr oorriieenntteedd..
-
- Line: Set to the line containing the word selected.
- Column: Set to the first character of the word
- selected.
- Options: None.
-
-[[bbuuffffeerr]] [[ccoouunntt]] CC
- Change text from the current position to the end-of-
- line. If count iiss ssppeecciiffiieedd,, tthhee iinnppuutt tteexxtt rreeppllaacceess
- ffrroomm tthhee ccuurrrreenntt ppoossiittiioonn ttoo tthhee eenndd--ooff--lliinnee,, pplluuss
- ccoouunntt -- 11 subsequent lines.
-
-
-
-
-
-
-
-
-
-
-
-UUSSDD::1133--4400 NNvvii//NNeexx RReeffeerreennccee ((VVii CCoommmmaannddss))
-
-
- Line: Set to the last line upon which characters
- were entered.
- Column: Set to the last character entered.
- Options: Affected by the aallttwweerraassee, aauuttooiinnddeenntt, bbeeaauu--
- ttiiffyy, sshhoowwmmaattcchh, ttttyywweerraassee and wwrraappmmaarrggiinn
- options.
-
-[[bbuuffffeerr]] DD
- Delete text from the current position to the end-of-
- line.
-
- It is not an error to execute the DD 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.
-
-[[ccoouunntt]] EE
- Move forward count eenndd--ooff--bbiiggwwoorrddss.. MMoovvee tthhee ccuurrssoorr
- ffoorrwwaarrdd ttoo tthhee eenndd ooff aa bbiiggwwoorrdd bbyy rreeppeeaattiinngg tthhee ffooll--
- lloowwiinngg aallggoorriitthhmm:: iiff tthhee ccuurrrreenntt ppoossiittiioonn iiss tthhee eenndd ooff
- aa bbiiggwwoorrdd oorr tthhee cchhaarraacctteerr aatt tthhaatt ppoossiittiioonn ccaannnnoott bbee
- ppaarrtt ooff aa bbiiggwwoorrdd,, mmoovvee ttoo tthhee llaasstt cchhaarraacctteerr ooff tthhee
- ffoolllloowwiinngg bbiiggwwoorrdd.. OOtthheerrwwiissee,, mmoovvee ttoo tthhee llaasstt cchhaarraacc--
- tteerr ooff tthhee bbiiggwwoorrdd aatt tthhee ccuurrrreenntt ppoossiittiioonn.. IIff nnoo ssuucc--
- cceeeeddiinngg bbiiggwwoorrdd eexxiissttss oonn tthhee ccuurrrreenntt lliinnee,, mmoovvee ttoo tthhee
- llaasstt cchhaarraacctteerr ooff tthhee ffiirrsstt bbiiggwwoorrdd oonn tthhee nneexxtt ffoollllooww--
- iinngg lliinnee tthhaatt ccoonnttaaiinnss aa bbiiggwwoorrdd..
-
- TThhee EE ccoommmmaanndd mmaayy bbee uusseedd aass tthhee mmoottiioonn ccoommppoonneenntt ooff
- ootthheerr vvii ccoommmmaannddss,, iinn wwhhiicchh ccaassee aannyy tteexxtt ccooppiieedd iinnttoo aa
- bbuuffffeerr iiss cchhaarraacctteerr oorriieenntteedd..
-
- Line: Set to the line containing the word selected.
- Column: Set to the last character of the word
- selected.
- Options: None.
-
-[[ccoouunntt]] FF <<cchhaarraacctteerr>>
- Search count ttiimmeess bbaacckkwwaarrdd tthhrroouugghh tthhee ccuurrrreenntt lliinnee
- ffoorr <<cchhaarraacctteerr>>.
-
- The FF command may be used as the motion component of
- other vvii commands, in which case any text copied into a
- buffer is character oriented.
-
- Line: Unchanged.
- Column: Set to the searched-for character.
- Options: None.
-
-
-
-
-
-
-
-
-
-
-
-NNvvii//NNeexx RReeffeerreennccee ((VVii CCoommmmaannddss)) UUSSDD::1133--4411
-
-
-[[ccoouunntt]] GG
- Move to line count,, oorr tthhee llaasstt lliinnee ooff tthhee ffiillee iiff
- ccoouunntt not specified.
-
- The GG command is an absolute movement. The GG command
- may be used as the motion component of other vvii 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.
-
-[[ccoouunntt]] HH
- Move to the screen line count - 1 lliinneess bbeellooww tthhee ttoopp
- ooff tthhee ssccrreeeenn..
-
- TThhee HH ccoommmmaanndd iiss aann aabbssoolluuttee mmoovveemmeenntt.. TThhee HH ccoommmmaanndd
- mmaayy bbee uusseedd aass tthhee mmoottiioonn ccoommppoonneenntt ooff ootthheerr vvii ccoomm--
- mmaannddss,, iinn wwhhiicchh ccaassee aannyy tteexxtt ccooppiieedd iinnttoo aa bbuuffffeerr iiss
- lliinnee oorriieenntteedd..
-
- Line: Set to the line count - 1 lliinneess bbeellooww tthhee ttoopp
- ooff tthhee ssccrreeeenn..
- Column: Set to the first nonblank character of the
- _s_c_r_e_e_n line.
- Options: None.
-
-[[ccoouunntt]] II
- Enter input mode, inserting the text at the beginning
- of the line. If count iiss ssppeecciiffiieedd,, tthhee tteexxtt iinnppuutt iiss
- rreeppeeaatteeddllyy iinnppuutt ccoouunntt -- 11 more times.
-
- Line: Set to the last line upon which characters
- were entered.
- Column: Set to the last character entered.
- Options: None.
-
-[[ccoouunntt]] JJ
- Join lines. If count iiss ssppeecciiffiieedd,, ccoouunntt lines are
- joined; a minimum of two lines are always joined,
- regardless of the value of count..
-
- IIff tthhee ccuurrrreenntt lliinnee eennddss wwiitthh aa wwhhiitteessppaaccee cchhaarraacctteerr,,
- aallll wwhhiitteessppaaccee iiss ssttrriippppeedd ffrroomm tthhee nneexxtt lliinnee.. OOtthheerr--
- wwiissee,, iiff tthhee nneexxtt lliinnee ssttaarrttss wwiitthh aa ooppeenn ppaarreenntthheessiiss
- ((""((") do nothing. Otherwise, if the current line ends
- with a question mark ("?"")),, ppeerriioodd ((""..") or exclama-
- tion point ("!"")),, iinnsseerrtt ttwwoo ssppaacceess.. OOtthheerrwwiissee,, iinnsseerrtt
- aa ssiinnggllee ssppaaccee..
-
-
-
-
-
-
-
-
-
-
-
-UUSSDD::1133--4422 NNvvii//NNeexx RReeffeerreennccee ((VVii CCoommmmaannddss))
-
-
- IItt iiss nnoott aann eerrrroorr ttoo jjooiinn lliinneess ppaasstt tthhee eenndd ooff tthhee
- ffiillee,, ii..ee.. lliinneess tthhaatt ddoo nnoott eexxiisstt..
-
- Line: Unchanged.
- Column: Set to the character after the last character
- of the next-to-last joined line.
- Options: None.
-
-[[ccoouunntt]] LL
- Move to the screen line count - 1 lliinneess aabboovvee tthhee bboott--
- ttoomm ooff tthhee ssccrreeeenn..
-
- TThhee LL ccoommmmaanndd iiss aann aabbssoolluuttee mmoovveemmeenntt.. TThhee LL ccoommmmaanndd
- mmaayy bbee uusseedd aass tthhee mmoottiioonn ccoommppoonneenntt ooff ootthheerr vvii ccoomm--
- mmaannddss,, iinn wwhhiicchh ccaassee aannyy tteexxtt ccooppiieedd iinnttoo aa bbuuffffeerr iiss
- lliinnee oorriieenntteedd..
-
- Line: Set to the line count - 1 lliinneess aabboovvee tthhee bboott--
- ttoomm ooff tthhee ssccrreeeenn..
- Column: Set to the first nonblank character of the
- _s_c_r_e_e_n line.
- Options: None.
-
- MM
- Move to the screen line in the middle of the screen.
-
- The MM command is an absolute movement. The MM command
- may be used as the motion component of other vvii com-
- mands, in which case any text copied into a buffer is
- line oriented.
-
- Historically, any count ssppeecciiffiieedd ttoo tthhee MM ccoommmmaanndd wwaass
- iiggnnoorreedd..
-
- 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.
-
-[[ccoouunntt]] OO
- Enter input mode, appending text in a new line above
- the current line. If count iiss ssppeecciiffiieedd,, tthhee tteexxtt
- iinnppuutt iiss rreeppeeaatteeddllyy iinnppuutt ccoouunntt -- 11 more times.
-
- Historically, any count ssppeecciiffiieedd ttoo tthhee OO ccoommmmaanndd wwaass
- iiggnnoorreedd..
-
- Line: Set to the last line upon which characters
- were entered.
- Column: Set to the last character entered.
- Options: Affected by the aallttwweerraassee, aauuttooiinnddeenntt, bbeeaauu--
- ttiiffyy, sshhoowwmmaattcchh, ttttyywweerraassee and wwrraappmmaarrggiinn
- options.
-
-
-
-
-
-
-
-
-
-
-NNvvii//NNeexx RReeffeerreennccee ((VVii CCoommmmaannddss)) UUSSDD::1133--4433
-
-
-[[bbuuffffeerr]] PP
- 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.
-
-QQ
- Exit vvii (or visual) mode and switch to eexx mode.
-
- Line: Unchanged.
- Column: No longer relevant.
- Options: None.
-
-[[ccoouunntt]] RR
- Enter input mode, replacing the characters in the cur-
- rent line. If count iiss ssppeecciiffiieedd,, tthhee tteexxtt iinnppuutt iiss
- rreeppeeaatteeddllyy iinnppuutt ccoouunntt -- 11 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 aallttwweerraassee, aauuttooiinnddeenntt, bbeeaauu--
- ttiiffyy, sshhoowwmmaattcchh, ttttyywweerraassee and wwrraappmmaarrggiinn
- options.
-
-[[bbuuffffeerr]] [[ccoouunntt]] SS
- Substitute count lliinneess..
-
- Line: Set to the last line upon which characters
- were entered.
- Column: Set to the last character entered.
- Options: Affected by the aallttwweerraassee, aauuttooiinnddeenntt, bbeeaauu--
- ttiiffyy, sshhoowwmmaattcchh, ttttyywweerraassee and wwrraappmmaarrggiinn
- options.
-
-[[ccoouunntt]] TT <<cchhaarraacctteerr>>
- Search backward, count ttiimmeess,, tthhrroouugghh tthhee ccuurrrreenntt lliinnee
- ffoorr tthhee cchhaarraacctteerr _a_f_t_e_r tthhee ssppeecciiffiieedd <<cchhaarraacctteerr>>_.
-
- _T_h_e TT _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 vvii _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
-
-
-
-
-
-
-
-
-
-
-UUSSDD::1133--4444 NNvvii//NNeexx RReeffeerreennccee ((VVii CCoommmmaannddss))
-
-
- _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.
-
-UU
- 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.
-
-[[ccoouunntt]] WW
- Move forward count bbiiggwwoorrddss.. MMoovvee tthhee ccuurrssoorr ffoorrwwaarrdd
- ttoo tthhee bbeeggiinnnniinngg ooff aa bbiiggwwoorrdd bbyy rreeppeeaattiinngg tthhee ffoollllooww--
- iinngg aallggoorriitthhmm:: iiff tthhee ccuurrrreenntt ppoossiittiioonn iiss wwiitthhiinn aa bbiigg--
- wwoorrdd oorr tthhee cchhaarraacctteerr aatt tthhaatt ppoossiittiioonn ccaannnnoott bbee ppaarrtt
- ooff aa bbiiggwwoorrdd,, mmoovvee ttoo tthhee ffiirrsstt cchhaarraacctteerr ooff tthhee nneexxtt
- bbiiggwwoorrdd.. IIff nnoo ssuubbsseeqquueenntt bbiiggwwoorrdd eexxiissttss oonn tthhee ccuurr--
- rreenntt lliinnee,, mmoovvee ttoo tthhee ffiirrsstt cchhaarraacctteerr ooff tthhee ffiirrsstt
- bbiiggwwoorrdd oonn tthhee ffiirrsstt ffoolllloowwiinngg lliinnee tthhaatt ccoonnttaaiinnss aa
- bbiiggwwoorrdd..
-
- TThhee WW ccoommmmaanndd mmaayy bbee uusseedd aass tthhee mmoottiioonn ccoommppoonneenntt ooff
- ootthheerr vvii ccoommmmaannddss,, iinn wwhhiicchh ccaassee aannyy tteexxtt ccooppiieedd iinnttoo aa
- bbuuffffeerr iiss cchhaarraacctteerr oorriieenntteedd..
-
- Line: The line containing the word selected.
- Column: The first character of the word selected.
- Options: None.
-
-[[bbuuffffeerr]] [[ccoouunntt]] XX
- Delete count cchhaarraacctteerrss bbeeffoorree tthhee ccuurrssoorr.. IIff tthhee nnuumm--
- bbeerr ooff cchhaarraacctteerrss ttoo bbee ddeelleetteedd iiss ggrreeaatteerr tthhaann oorr
- eeqquuaall ttoo tthhee nnuummbbeerr ooff cchhaarraacctteerrss ttoo tthhee bbeeggiinnnniinngg ooff
- tthhee lliinnee,, aallll ooff tthhee cchhaarraacctteerrss bbeeffoorree tthhee ccuurrrreenntt ccuurr--
- ssoorr ppoossiittiioonn,, ttoo tthhee bbeeggiinnnniinngg ooff tthhee lliinnee,, aarree
- ddeelleetteedd..
-
- 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.
-
-[[bbuuffffeerr]] [[ccoouunntt]] YY
- Copy (or "yank") count lliinneess iinnttoo tthhee ssppeecciiffiieedd bbuuffffeerr..
-
-
-
-
-
-
-
-
-
-
-
-
-NNvvii//NNeexx RReeffeerreennccee ((VVii CCoommmmaannddss)) UUSSDD::1133--4455
-
-
- Line: Unchanged.
- Column: Unchanged.
- Options: None.
-
-ZZZZ
- Write the file and exit vvii. The file is only written
- if it has been modified since the last complete write
- of the file to any file.
-
- The ZZZZ command will exit the editor after writing the
- file, if there are no further files to edit. Entering
- two "quit" commands (i.e. wwqq, qquuiitt, xxiitt or ZZZZ) 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.
-
-[[ccoouunntt]] [[[[
- Back up count sseeccttiioonn bboouunnddaarriieess..
-
- TThhee [[[[ ccoommmmaanndd iiss aann aabbssoolluuttee mmoovveemmeenntt.. TThhee [[[[ ccoommmmaanndd
- mmaayy bbee uusseedd aass tthhee mmoottiioonn ccoommppoonneenntt ooff ootthheerr vvii ccoomm--
- mmaannddss,, iinn wwhhiicchh ccaassee aannyy tteexxtt ccooppiieedd iinnttoo aa bbuuffffeerr iiss
- cchhaarraacctteerr oorriieenntteedd,, uunnlleessss tthhee ssttaarrttiinngg ppoossiittiioonn iiss
- ccoolluummnn 00,, iinn wwhhiicchh ccaassee iitt iiss lliinnee oorriieenntteedd..
-
- IItt iiss aann eerrrroorr iiff tthhee mmoovveemmeenntt iiss ppaasstt tthhee bbeeggiinnnniinngg ooff
- tthhee ffiillee..
-
- Line: Set to the previous line that is count sseeccttiioonn
- bboouunnddaarriieess bbaacckk,, oorr tthhee ffiirrsstt lliinnee ooff tthhee ffiillee
- iiff nnoo mmoorree sseeccttiioonn bboouunnddaarriieess eexxiisstt pprreecceeddiinngg
- tthhee ccuurrrreenntt lliinnee..
- Column: Set to the first nonblank character in the
- line.
- Options: Affected by the sseeccttiioonnss option.
-
-[[ccoouunntt]] ]]]]
- Move forward count sseeccttiioonn bboouunnddaarriieess..
-
- TThhee ]]]] ccoommmmaanndd iiss aann aabbssoolluuttee mmoovveemmeenntt.. TThhee ]]]] ccoommmmaanndd
- mmaayy bbee uusseedd aass tthhee mmoottiioonn ccoommppoonneenntt ooff ootthheerr vvii ccoomm--
- mmaannddss,, iinn wwhhiicchh ccaassee aannyy tteexxtt ccooppiieedd iinnttoo aa bbuuffffeerr iiss
- cchhaarraacctteerr oorriieenntteedd,, uunnlleessss tthhee ssttaarrttiinngg ppoossiittiioonn iiss
- ccoolluummnn 00,, iinn wwhhiicchh ccaassee iitt iiss lliinnee oorriieenntteedd..
-
- IItt iiss aann eerrrroorr iiff tthhee mmoovveemmeenntt iiss ppaasstt tthhee eenndd ooff tthhee
- ffiillee..
-
- Line: Set to the line that is count sseeccttiioonn bboouunndd--
- aarriieess ffoorrwwaarrdd,, oorr ttoo tthhee llaasstt lliinnee ooff tthhee ffiillee
-
-
-
-
-
-
-
-
-
-
-UUSSDD::1133--4466 NNvvii//NNeexx RReeffeerreennccee ((VVii CCoommmmaannddss))
-
-
- iiff nnoo mmoorree sseeccttiioonn bboouunnddaarriieess eexxiisstt ffoolllloowwiinngg
- tthhee ccuurrrreenntt lliinnee..
- Column: Set to the first nonblank character in the
- line.
- Options: Affected by the sseeccttiioonnss option.
-
-^^
- Move to first nonblank character on the current line.
-
- The ^^ command may be used as the motion component of
- other vvii 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.
-
-[[ccoouunntt]] __
- Move down count - 1 lliinneess,, ttoo tthhee ffiirrsstt nnoonnbbllaannkk cchhaarr--
- aacctteerr.. TThhee __ ccoommmmaanndd mmaayy bbee uusseedd aass tthhee mmoottiioonn ccoommppoo--
- nneenntt ooff ootthheerr vvii ccoommmmaannddss,, iinn wwhhiicchh ccaassee aannyy tteexxtt
- ccooppiieedd iinnttoo aa bbuuffffeerr iiss lliinnee oorriieenntteedd..
-
- IItt iiss nnoott aann eerrrroorr ttoo eexxeeccuuttee tthhee __ ccoommmmaanndd wwhheenn tthhee
- ccuurrssoorr iiss oonn tthhee ffiirrsstt cchhaarraacctteerr iinn tthhee lliinnee..
-
- Line: The current line plus count - 1..
- Column: The first nonblank character in the line.
- Options: None.
-
-[[ccoouunntt]] aa
- Enter input mode, appending the text after the cursor.
- If count iiss ssppeecciiffiieedd,, tthhee tteexxtt iinnppuutt iiss rreeppeeaatteeddllyy
- iinnppuutt ccoouunntt -- 11 more times.
-
- Line: Set to the last line upon which characters
- were entered.
- Column: Set to the last character entered.
- Options: Affected by the aallttwweerraassee, aauuttooiinnddeenntt, bbeeaauu--
- ttiiffyy, sshhoowwmmaattcchh, ttttyywweerraassee and wwrraappmmaarrggiinn
- options.
-
-[[ccoouunntt]] bb
- Move backward count wwoorrddss.. MMoovvee tthhee ccuurrssoorr bbaacckkwwaarrdd ttoo
- tthhee bbeeggiinnnniinngg ooff aa wwoorrdd bbyy rreeppeeaattiinngg tthhee ffoolllloowwiinngg
- aallggoorriitthhmm:: iiff tthhee ccuurrrreenntt ppoossiittiioonn iiss aatt tthhee bbeeggiinnnniinngg
- ooff aa wwoorrdd,, mmoovvee ttoo tthhee ffiirrsstt cchhaarraacctteerr ooff tthhee pprreecceeddiinngg
- wwoorrdd.. OOtthheerrwwiissee,, tthhee ccuurrrreenntt ppoossiittiioonn mmoovveess ttoo tthhee
- ffiirrsstt cchhaarraacctteerr ooff tthhee wwoorrdd aatt tthhee ccuurrrreenntt ppoossiittiioonn..
- IIff nnoo pprreecceeddiinngg wwoorrdd eexxiissttss oonn tthhee ccuurrrreenntt lliinnee,, mmoovvee
- ttoo tthhee ffiirrsstt cchhaarraacctteerr ooff tthhee llaasstt wwoorrdd oonn tthhee ffiirrsstt
- pprreecceeddiinngg lliinnee tthhaatt ccoonnttaaiinnss aa wwoorrdd..
-
-
-
-
-
-
-
-
-
-
-NNvvii//NNeexx RReeffeerreennccee ((VVii CCoommmmaannddss)) UUSSDD::1133--4477
-
-
- TThhee bb ccoommmmaanndd mmaayy bbee uusseedd aass tthhee mmoottiioonn ccoommppoonneenntt ooff
- ootthheerr vvii ccoommmmaannddss,, iinn wwhhiicchh ccaassee aannyy tteexxtt ccooppiieedd iinnttoo aa
- bbuuffffeerr iiss cchhaarraacctteerr oorriieenntteedd..
-
- Line: Set to the line containing the word selected.
- Column: Set to the first character of the word
- selected.
- Options: None.
-
-[[bbuuffffeerr]] [[ccoouunntt]] cc mmoottiioonn
- Change the region of text specified by the count aanndd
- mmoottiioonn. If only part of a single line is affected,
- then the last character being changed is marked with a
- "$"".. OOtthheerrwwiissee,, tthhee rreeggiioonn ooff tteexxtt iiss ddeelleetteedd,, aanndd
- iinnppuutt mmooddee iiss eenntteerreedd..
-
- Line: Set to the last line upon which characters
- were entered.
- Column: Set to the last character entered.
- Options: Affected by the aallttwweerraassee, aauuttooiinnddeenntt, bbeeaauu--
- ttiiffyy, sshhoowwmmaattcchh, ttttyywweerraassee and wwrraappmmaarrggiinn
- options.
-
-[[bbuuffffeerr]] [[ccoouunntt]] dd mmoottiioonn
- Delete the region of text specified by the count aanndd
- mmoottiioonn.
-
- 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.
-
-[[ccoouunntt]] ee
- Move forward count eenndd--ooff--wwoorrddss.. MMoovvee tthhee ccuurrssoorr ffoorr--
- wwaarrdd ttoo tthhee eenndd ooff aa wwoorrdd bbyy rreeppeeaattiinngg tthhee ffoolllloowwiinngg
- aallggoorriitthhmm:: iiff tthhee ccuurrrreenntt ppoossiittiioonn iiss tthhee eenndd ooff aa
- wwoorrdd,, mmoovvee ttoo tthhee llaasstt cchhaarraacctteerr ooff tthhee ffoolllloowwiinngg wwoorrdd..
- OOtthheerrwwiissee,, mmoovvee ttoo tthhee llaasstt cchhaarraacctteerr ooff tthhee wwoorrdd aatt
- tthhee ccuurrrreenntt ppoossiittiioonn.. IIff nnoo ssuucccceeeeddiinngg wwoorrdd eexxiissttss oonn
- tthhee ccuurrrreenntt lliinnee,, mmoovvee ttoo tthhee llaasstt cchhaarraacctteerr ooff tthhee
- ffiirrsstt wwoorrdd oonn tthhee nneexxtt ffoolllloowwiinngg lliinnee tthhaatt ccoonnttaaiinnss aa
- wwoorrdd..
-
- TThhee ee ccoommmmaanndd mmaayy bbee uusseedd aass tthhee mmoottiioonn ccoommppoonneenntt ooff
- ootthheerr vvii ccoommmmaannddss,, iinn wwhhiicchh ccaassee aannyy tteexxtt ccooppiieedd iinnttoo aa
- bbuuffffeerr iiss cchhaarraacctteerr oorriieenntteedd..
-
- Line: Set to the line containing the word selected.
- Column: Set to the last character of the word
- selected.
-
-
-
-
-
-
-
-
-
-
-
-UUSSDD::1133--4488 NNvvii//NNeexx RReeffeerreennccee ((VVii CCoommmmaannddss))
-
-
- Options: None.
-
-[[ccoouunntt]] ff <<cchhaarraacctteerr>>
- Search forward, count ttiimmeess,, tthhrroouugghh tthhee rreesstt ooff tthhee
- ccuurrrreenntt lliinnee ffoorr <<cchhaarraacctteerr>>.
-
- The ff command may be used as the motion component of
- other vvii commands, in which case any text copied into a
- buffer is character oriented.
-
- Line: Unchanged.
- Column: Set to the searched-for character.
- Options: None.
-
-[[ccoouunntt]] ii
- Enter input mode, inserting the text before the cursor.
- If count iiss ssppeecciiffiieedd,, tthhee tteexxtt iinnppuutt iiss rreeppeeaatteeddllyy
- iinnppuutt ccoouunntt -- 11 more times.
-
- Line: Set to the last line upon which characters
- were entered.
- Column: Set to the last character entered.
- Options: Affected by the aallttwweerraassee, aauuttooiinnddeenntt, bbeeaauu--
- ttiiffyy, sshhoowwmmaattcchh, ttttyywweerraassee and wwrraappmmaarrggiinn
- options.
-
-mm <<cchhaarraacctteerr>>
- Save the current context (line and column) as <charac-
- ter>.. TThhee eexxaacctt ppoossiittiioonn iiss rreeffeerrrreedd ttoo bbyy ""``<<cchhaarraacc--
- tteerr>>". The line is referred to by "'<character>""..
-
- HHiissttoorriiccaallllyy,, <<cchhaarraacctteerr>> was restricted to lower-case
- letters. NNvvii permits the use of any character.
-
- Line: Unchanged.
- Column: Unchanged.
- Options: None.
-
-[[ccoouunntt]] oo
- Enter input mode, appending text in a new line under
- the current line. If count iiss ssppeecciiffiieedd,, tthhee tteexxtt
- iinnppuutt iiss rreeppeeaatteeddllyy iinnppuutt ccoouunntt -- 11 more times.
-
- Historically, any count ssppeecciiffiieedd ttoo tthhee oo ccoommmmaanndd wwaass
- iiggnnoorreedd..
-
- Line: Set to the last line upon which characters
- were entered.
- Column: Set to the last character entered.
- Options: Affected by the aallttwweerraassee, aauuttooiinnddeenntt, bbeeaauu--
- ttiiffyy, sshhoowwmmaattcchh, ttttyywweerraassee and wwrraappmmaarrggiinn
- options.
-
-
-
-
-
-
-
-
-
-
-
-NNvvii//NNeexx RReeffeerreennccee ((VVii CCoommmmaannddss)) UUSSDD::1133--4499
-
-
-[[bbuuffffeerr]] pp
- 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.
-
-[[ccoouunntt]] rr <<cchhaarraacctteerr>>
- Replace characters. The next count cchhaarraacctteerrss iinn tthhee
- lliinnee aarree rreeppllaacceedd wwiitthh <<cchhaarraacctteerr>>. Replacing charac-
- ters with <newline> cchhaarraacctteerrss rreessuullttss iinn ccrreeaattiinngg nneeww,,
- eemmppttyy lliinneess iinnttoo tthhee ffiillee..
-
- IIff <<cchhaarraacctteerr>> is <escape>,, tthhee ccoommmmaanndd iiss ccaanncceelllleedd..
-
- Line: Unchanged unless the replacement character is
- a <newline>,, iinn wwhhiicchh ccaassee iitt iiss sseett ttoo tthhee
- ccuurrrreenntt lliinnee pplluuss ccoouunntt -- 11.
- 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.
-
-[[bbuuffffeerr]] [[ccoouunntt]] ss
- Substitute count cchhaarraacctteerrss iinn tthhee ccuurrrreenntt lliinnee ssttaarrtt--
- iinngg wwiitthh tthhee ccuurrrreenntt cchhaarraacctteerr..
-
- Line: Set to the last line upon which characters
- were entered.
- Column: Set to the last character entered.
- Options: Affected by the aallttwweerraassee, aauuttooiinnddeenntt, bbeeaauu--
- ttiiffyy, sshhoowwmmaattcchh, ttttyywweerraassee and wwrraappmmaarrggiinn
- options.
-
-[[ccoouunntt]] tt <<cchhaarraacctteerr>>
- Search forward, count ttiimmeess,, tthhrroouugghh tthhee ccuurrrreenntt lliinnee
- ffoorr tthhee cchhaarraacctteerr iimmmmeeddiiaatteellyy _b_e_f_o_r_e <<cchhaarraacctteerr>>_.
-
- _T_h_e tt _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 vvii _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.
-
-
-
-
-
-
-
-
-
-
-UUSSDD::1133--5500 NNvvii//NNeexx RReeffeerreennccee ((VVii CCoommmmaannddss))
-
-
- Options: None.
-
-uu
- Undo the last change made to the file. If repeated,
- the uu 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 uu com-
- mand, causes the change log to be rolled forward or
- backward, depending on the action of the uu 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.
-
-[[ccoouunntt]] ww
- Move forward count wwoorrddss.. MMoovvee tthhee ccuurrssoorr ffoorrwwaarrdd ttoo
- tthhee bbeeggiinnnniinngg ooff aa wwoorrdd bbyy rreeppeeaattiinngg tthhee ffoolllloowwiinngg
- aallggoorriitthhmm:: iiff tthhee ccuurrrreenntt ppoossiittiioonn iiss aatt tthhee bbeeggiinnnniinngg
- ooff aa wwoorrdd,, mmoovvee ttoo tthhee ffiirrsstt cchhaarraacctteerr ooff tthhee nneexxtt
- wwoorrdd.. IIff nnoo ssuubbsseeqquueenntt wwoorrdd eexxiissttss oonn tthhee ccuurrrreenntt
- lliinnee,, mmoovvee ttoo tthhee ffiirrsstt cchhaarraacctteerr ooff tthhee ffiirrsstt wwoorrdd oonn
- tthhee ffiirrsstt ffoolllloowwiinngg lliinnee tthhaatt ccoonnttaaiinnss aa wwoorrdd..
-
- TThhee ww ccoommmmaanndd mmaayy bbee uusseedd aass tthhee mmoottiioonn ccoommppoonneenntt ooff
- ootthheerr vvii ccoommmmaannddss,, iinn wwhhiicchh ccaassee aannyy tteexxtt ccooppiieedd iinnttoo aa
- bbuuffffeerr iiss cchhaarraacctteerr oorriieenntteedd..
-
- Line: Set to the line containing the word selected.
- Column: Set to the first character of the word
- selected.
- Options: None.
-
-[[bbuuffffeerr]] [[ccoouunntt]] xx
- Delete count cchhaarraacctteerrss.. TThhee ddeelleettiioonn iiss aatt tthhee ccuurr--
- rreenntt cchhaarraacctteerr ppoossiittiioonn.. IIff tthhee nnuummbbeerr ooff cchhaarraacctteerrss
- ttoo bbee ddeelleetteedd iiss ggrreeaatteerr tthhaann oorr eeqquuaall ttoo tthhee nnuummbbeerr ooff
- cchhaarraacctteerrss ttoo tthhee eenndd ooff tthhee lliinnee,, aallll ooff tthhee cchhaarraacc--
- tteerrss ffrroomm tthhee ccuurrrreenntt ccuurrssoorr ppoossiittiioonn ttoo tthhee eenndd ooff tthhee
- lliinnee aarree ddeelleetteedd..
-
- 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.
-
-
-
-
-
-
-
-
-
-
-
-NNvvii//NNeexx RReeffeerreennccee ((VVii CCoommmmaannddss)) UUSSDD::1133--5511
-
-
- Options: None.
-
-[[bbuuffffeerr]] [[ccoouunntt]] yy mmoottiioonn
- Copy (or "yank") the text region specified by the count
- aanndd mmoottiioonn, 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.
-
-[[ccoouunntt11]] zz [[ccoouunntt22]] ttyyppee
- Redraw the screen with a window count2 lliinneess lloonngg,, wwiitthh
- lliinnee ccoouunntt11 placed as specified by the type cchhaarraacctteerr..
- IIff ccoouunntt11 is not specified, it defaults to the current
- line. If count2 iiss nnoott ssppeecciiffiieedd,, iitt ddeeffaauullttss ttoo tthhee
- ccuurrrreenntt wwiinnddooww ssiizzee..
-
- TThhee ffoolllloowwiinngg ttyyppee 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 <<ccoonnttrrooll--FF>> 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.
- ^ 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 <<ccoonnttrrooll--BB>> 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.
-
-
-
-
-
-
-
-
-
-
-
-
-UUSSDD::1133--5522 NNvvii//NNeexx RReeffeerreennccee ((VVii CCoommmmaannddss))
-
-
-[[ccoouunntt]] {{
- Move backward count ppaarraaggrraapphhss..
-
- TThhee {{ ccoommmmaanndd iiss aann aabbssoolluuttee mmoovveemmeenntt.. TThhee {{ ccoommmmaanndd
- mmaayy bbee uusseedd aass tthhee mmoottiioonn ccoommppoonneenntt ooff ootthheerr vvii ccoomm--
- mmaannddss,, iinn wwhhiicchh ccaassee aannyy tteexxtt ccooppiieedd iinnttoo aa bbuuffffeerr iiss
- cchhaarraacctteerr oorriieenntteedd,, uunnlleessss tthhee ssttaarrttiinngg cchhaarraacctteerr iiss
- tthhee ffiirrsstt cchhaarraacctteerr oonn iittss lliinnee,, iinn wwhhiicchh ccaassee iitt iiss
- lliinnee oorriieenntteedd..
-
- 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 ppaarraaggrraapphh option.
-
-[[ccoouunntt]] ||
- 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 vvii 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.
-
-[[ccoouunntt]] }}
- Move forward count ppaarraaggrraapphhss..
-
- TThhee }} ccoommmmaanndd iiss aann aabbssoolluuttee mmoovveemmeenntt.. TThhee }} ccoommmmaanndd
- mmaayy bbee uusseedd aass tthhee mmoottiioonn ccoommppoonneenntt ooff ootthheerr vvii ccoomm--
- mmaannddss,, iinn wwhhiicchh ccaassee aannyy tteexxtt ccooppiieedd iinnttoo aa bbuuffffeerr iiss
- cchhaarraacctteerr oorriieenntteedd,, uunnlleessss tthhee ssttaarrttiinngg cchhaarraacctteerr iiss aatt
- oorr bbeeffoorree aannyy nnoonnbbllaannkk cchhaarraacctteerrss iinn iittss lliinnee,, iinn wwhhiicchh
- ccaassee iitt iiss lliinnee oorriieenntteedd..
-
- 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 ppaarraaggrraapphh option.
-
-[[ccoouunntt]] ~~
- Reverse the case of the next count cchhaarraacctteerr((ss)).. TThhiiss
- iiss tthhee hhiissttoorriicc sseemmaannttiicc ffoorr tthhee ~~ ccoommmmaanndd aanndd iitt iiss
-
-
-
-
-
-
-
-
-
-
-NNvvii//NNeexx RReeffeerreennccee ((VVii CCoommmmaannddss)) UUSSDD::1133--5533
-
-
- oonnllyy iinn eeffffeecctt iiff tthhee ttiillddeeoopp ooppttiioonn iiss nnoott sseett..
-
- LLoowweerrccaassee aallpphhaabbeettiicc cchhaarraacctteerrss aarree cchhaannggeedd ttoo uuppppeerr--
- ccaassee,, aanndd uuppppeerrccaassee cchhaarraacctteerrss aarree cchhaannggeedd ttoo lloowweerr--
- ccaassee.. NNoo ootthheerr cchhaarraacctteerrss aarree aaffffeecctteedd..
-
- HHiissttoorriiccaallllyy,, tthhee ~~ ccoommmmaanndd ddiidd nnoott ttaakkee aann aassssoocciiaatteedd
- ccoouunntt,, nnoorr ddiidd iitt mmoovvee ppaasstt tthhee eenndd ooff tthhee ccuurrrreenntt
- lliinnee.. AAss iitt hhaadd nnoo aassssoocciiaatteedd mmoottiioonn iitt wwaass ddiiffffiiccuulltt
- ttoo cchhaannggee tthhee ccaassee ooff llaarrggee bblloocckkss ooff tteexxtt.. IInn nnvvii,, iiff
- tthhee ccuurrssoorr iiss oonn tthhee llaasstt cchhaarraacctteerr ooff aa lliinnee,, aanndd
- tthheerree aarree mmoorree lliinneess iinn tthhee ffiillee,, tthhee ccuurrssoorr mmoovveess ttoo
- tthhee nneexxtt lliinnee..
-
- IItt iiss nnoott aann eerrrroorr ttoo ssppeecciiffyy aa ccoouunntt llaarrggeerr tthhaann tthhee
- nnuummbbeerr ooff cchhaarraacctteerrss bbeettwweeeenn tthhee ccuurrssoorr aanndd tthhee eenndd ooff
- tthhee ffiillee..
-
- Line: Set to the line of the character after count
- cchhaarraacctteerrss,, oorr,, eenndd ooff ffiillee..
- Column: Set to the character after count cchhaarraacctteerrss,,
- oorr,, eenndd--ooff--ffiillee..
- Options: Affected by the ttiillddeeoopp option.
-
-[[ccoouunntt]] ~~ mmoottiioonn
- Reverse the case of the characters in a text region
- specified by the count aanndd mmoottiioonn. Only in effect if
- the ttiillddeeoopp option is set.
-
- Lowercase characters are changed to uppercase, and
- uppercase characters are changed to lowercase. No
- other characters are affected.
-
- Line: Set to the line of the character after the
- last character in the region.
- Column: Set to the character after the last character
- in the region.
- Options: Affected by the ttiillddeeoopp option.
-
-<<iinntteerrrruupptt>>
- Interrupt the current operation. Many of the poten-
- tially long-running vvii 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 vvii.
-
- If the <interrupt> cchhaarraacctteerr iiss uusseedd ttoo iinntteerrrruupptt wwhhiillee
- eenntteerriinngg aann eexx ccoommmmaanndd,, tthhee ccoommmmaanndd iiss aabboorrtteedd,, tthhee
- ccuurrssoorr rreettuurrnnss ttoo iittss pprreevviioouuss ppoossiittiioonn,, aanndd vvii rreemmaaiinnss
- iinn ccoommmmaanndd mmooddee..
-
- GGeenneerraallllyy,, iiff tthhee <<iinntteerrrruupptt>> cchhaarraacctteerr iiss uusseedd ttoo
-
-
-
-
-
-
-
-
-
-
-UUSSDD::1133--5544 NNvvii//NNeexx RReeffeerreennccee ((VVii CCoommmmaannddss))
-
-
- iinntteerrrruupptt aannyy ooppeerraattiioonn,, aannyy cchhaannggeess mmaaddee bbeeffoorree tthhee
- iinntteerrrruupptt aarree lleefftt iinn ppllaaccee..
-
- Line: Dependent on the operation being interrupted.
- Column: Dependent on the operation being interrupted.
- Options: None.
-
- 1144.. VVii TTeexxtt IInnppuutt CCoommmmaannddss
-
- The following section describes the commands
- available in the text input mode of the vvii editor.
-
- Historically, vvii implementations only permitted
- the characters inserted on the current line to be
- erased. In addition, only the <control-D> eerraassee cchhaarr--
- aacctteerr aanndd tthhee ""00<<ccoonnttrrooll--DD>>" and "^<control-D>"" eerraassee
- ssttrriinnggss ccoouulldd eerraassee aauuttooiinnddeenntt cchhaarraacctteerrss.. ((AAuuttooiinnddeenntt
- cchhaarraacctteerrss iinncclluuddee bbootthh tthhee cchhaarraacctteerrss iinnsseerrtteedd aauuttoo--
- mmaattiiccaallllyy aatt tthhee bbeeggiinnnniinngg ooff aann iinnppuutt lliinnee aass wweellll aass
- cchhaarraacctteerrss iinnsseerrtteedd uussiinngg tthhee <<ccoonnttrrooll--TT>> 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, vvii always used <control-H> aanndd <<ccoonn--
- ttrrooll--WW>> as character and word erase characters, respec-
- tively, regardless of the current terminal settings.
- This implementation accepts, in addition to these two
- characters, the current terminal characters for those
- operations.
-
- <<nnuull>>
- If the first character of the input is a <nul>,,
- tthhee pprreevviioouuss iinnppuutt iiss rreeppllaayyeedd,, aass iiff jjuusstt
- eenntteerreedd..
-
- <<ccoonnttrrooll--DD>>
- 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 sshhiiffttwwiiddtthh edit option. This may result in
- any number of <tab> aanndd <<ssppaaccee>> characters preced-
- ing the cursor being changed.
-
- Otherwise, if the aauuttooiinnddeenntt option is set and the
- user is entering the first character in the line,
-
-
-
-
-
-
-
-
-
-
-NNvvii//NNeexx RReeffeerreennccee ((VVii CCoommmmaannddss)) UUSSDD::1133--5555
-
-
- <control-D> iiss iiggnnoorreedd.. OOtthheerrwwiissee,, aa lliitteerraall
- <<ccoonnttrrooll--DD>> character is entered.
-
- ^^<<ccoonnttrrooll--DD>>
- 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.
-
- 00<<ccoonnttrrooll--DD>>
- 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.
-
- <<ccoonnttrrooll--TT>>
- Insert sufficient <tab> aanndd <<ssppaaccee>> characters to
- move the cursor forward to the column immediately
- after the next (1-based) column which is a multi-
- ple of the sshhiiffttwwiiddtthh edit option. This may
- result in any number of <tab> aanndd <<ssppaaccee>> charac-
- ters preceding the cursor being changed.
-
- Historically, vvii did not permit the <control-T>
- ccoommmmaanndd ttoo bbee uusseedd uunnlleessss tthhee ccuurrssoorr wwaass aatt tthhee
- ffiirrsstt ccoolluummnn ooff aa nneeww lliinnee oorr iitt wwaass pprreecceeddeedd oonnllyy
- bbyy aauuttooiinnddeenntt cchhaarraacctteerrss.. NNvvii ppeerrmmiittss iitt ttoo bbee
- uusseedd aatt aannyy ttiimmee dduurriinngg iinnsseerrtt mmooddee..
-
- <<eerraassee>>
- <<ccoonnttrrooll--HH>>
- Erase the last character.
-
- <<lliitteerraall--nneexxtt>>
- Quote the next character. The next character will
- not be mapped (see the mmaapp command for more infor-
- mation) or interpreted specially. A carat ("^""))
- cchhaarraacctteerr wwiillll bbee ddiissppllaayyeedd iimmmmeeddiiaatteellyy aass aa
- ppllaacceehhoollddeerr,, bbuutt wwiillll bbee rreeppllaacceedd bbyy tthhee nneexxtt
- cchhaarraacctteerr..
-
- <<eessccaappee>>
- If on the colon command line, and the ffiilleecc 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.
-
- <<lliinnee eerraassee>>
- Erase the current line.
-
-
-
-
-
-
-
-
-
-
-
-
-UUSSDD::1133--5566 NNvvii//NNeexx RReeffeerreennccee ((VVii CCoommmmaannddss))
-
-
- <<ccoonnttrrooll--WW>>
- <<wwoorrdd eerraassee>>
- Erase the last word. The definition of word is
- dependent on the aallttwweerraassee and ttttyywweerraassee options.
-
- <<ccoonnttrrooll--XX>>[[00--99AA--FFaa--ff]]++
- 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.
-
- <<iinntteerrrruupptt>>
- Interrupt text input mode, returning to command
- mode. If the <interrupt> cchhaarraacctteerr iiss uusseedd ttoo
- iinntteerrrruupptt iinnsseerrttiinngg tteexxtt iinnttoo tthhee ffiillee,, iitt iiss aass
- iiff tthhee <<eessccaappee>> character was used; all text input
- up to the interruption is resolved into the file.
-
- 1155.. EExx AAddddrreessssiinngg
-
- Addressing in eexx (and when eexx commands are exe-
- cuted from vvii) relates to the current line. In gen-
- eral, the current line is the last line affected by a
- command. The exact effect on the current line is dis-
- cussed under the description of each command. When the
- file contains no lines, the current line is zero.
-
- Addresses are constructed by one or more of the
- following methods:
-
- (1) The address "." refers to the current line.
-
- (2) The address "$" refers to the last line of the
- file.
-
- (3) The address "N", 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 kk or mm 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 "//_"_,
-
-
-
-
-
-
-
-
-
-
-NNvvii//NNeexx RReeffeerreennccee UUSSDD::1133--5577
-
-
- _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 eexxtteennddeedd _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 wwrraapp--
- ssccaann _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 _"_\_/"" iiss aacccceepptteedd ffoorr hhiissttoorriicc rreeaassoonnss,,
- aanndd iiss iiddeennttiiccaall ttoo ""////_"_.
-
- (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 eexxtteennddeedd _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 wwrraapp--
- ssccaann _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 _"_\_?"" iiss aacccceepptteedd ffoorr hhiissttoorriicc rreeaassoonnss,,
- aanndd iiss iiddeennttiiccaall ttoo ""????_"_.
-
- (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
-
-
-
-
-
-
-
-
-
-
-UUSSDD::1133--5588 NNvvii//NNeexx RReeffeerreennccee
-
-
- plus 3.
-
- (10) A percent sign ("%") is equivalent to the
- address range "1,$".
-
- EExx 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 eexx command, the first addresses
- specified are discarded. For example, "1,2,3,5""pprriinntt
- pprriinnttss lliinneess 33 tthhrroouugghh 55,, bbeeccaauussee tthhee pprriinntt ccoommmmaanndd
- oonnllyy ttaakkeess ttwwoo aaddddrreesssseess..
-
- The addresses in a range are separated from each
- other by a comma (","")) oorr aa sseemmiiccoolloonn (("";;"). In the
- latter case, the current line ("."")) iiss sseett ttoo tthhee
- ffiirrsstt aaddddrreessss,, aanndd oonnllyy tthheenn iiss tthhee sseeccoonndd aaddddrreessss ccaall--
- ccuullaatteedd.. TThhiiss ffeeaattuurree ccaann bbee uusseedd ttoo ddeetteerrmmiinnee tthhee
- ssttaarrttiinngg lliinnee ffoorr ffoorrwwaarrdd aanndd bbaacckkwwaarrdd sseeaarrcchheess ((sseeee
- rruulleess ((55)) aanndd ((66)) aabboovvee)).. TThhee sseeccoonndd aaddddrreessss ooff aannyy
- ttwwoo--aaddddrreessss sseeqquueennccee ccoorrrreessppoonnddss ttoo aa lliinnee tthhaatt ffooll--
- lloowwss,, iinn tthhee ffiillee,, tthhee lliinnee ccoorrrreessppoonnddiinngg ttoo tthhee ffiirrsstt
- aaddddrreessss.. TThhee ffiirrsstt aaddddrreessss mmuusstt bbee lleessss tthhaann oorr eeqquuaall
- ttoo tthhee sseeccoonndd aaddddrreessss.. TThhee ffiirrsstt aaddddrreessss mmuusstt bbee
- ggrreeaatteerr tthhaann oorr eeqquuaall ttoo tthhee ffiirrsstt lliinnee ooff tthhee ffiillee,,
- aanndd tthhee llaasstt aaddddrreessss mmuusstt bbee lleessss tthhaann oorr eeqquuaall ttoo tthhee
- llaasstt lliinnee ooff tthhee ffiillee..
-
- 1166.. EExx DDeessccrriippttiioonn
-
- The following words have special meanings for eexx
- commands.
-
- <<eenndd--ooff--ffiillee>>
- The end-of-file character is used to scroll the
- screen in the eexx editor. This character is nor-
- mally <control-D>.. HHoowweevveerr,, wwhhaatteevveerr cchhaarraacctteerr iiss
- sseett ffoorr tthhee ccuurrrreenntt tteerrmmiinnaall iiss ssuuppppoorrtteedd aass wweellll
- aass <<ccoonnttrrooll--DD>>.
-
- lliinnee
- A single-line address, given in any of the forms
- described in the section entitled "EExx AAddddrreessssiinngg".
- The default for line iiss tthhee ccuurrrreenntt lliinnee..
-
- rraannggee
- A line, or a pair of line addresses, separated by
- a comma or semicolon. (See the section entitled
- "EExx AAddddrreessssiinngg" 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
-
-
-
-
-
-
-
-
-
-
-NNvvii//NNeexx RReeffeerreennccee ((EExx CCoommmmaannddss)) UUSSDD::1133--5599
-
-
- "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_.
-
- ccoouunntt
- 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"" iinn aa 1100 lliinnee
- ffiillee iiss aacccceeppttaabbllee,, aanndd wwiillll pprriinntt ffrroomm tthhee ccuurr--
- rreenntt lliinnee tthhrroouugghh tthhee llaasstt lliinnee iinn tthhee ffiillee..
-
- ffllaaggss
- 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 ##, ll or pp commands. In addition,
- any number of "+"" oorr ""--" 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 iiss nnoonnee..
-
- ffiillee
- 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
- 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 lliisstt, nnuummbbeerr
- or pprriinntt 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 pprriinntt 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.
-
-
-
-
-
-
-
-
-
-
-UUSSDD::1133--6600 NNvvii//NNeexx RReeffeerreennccee ((EExx CCoommmmaannddss))
-
-
- 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.
-
- 1177.. EExx CCoommmmaannddss
-
- The following section describes the commands
- available in the eexx 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 eexx command described below notes the new cur-
- rent line after it is executed, as well as any options
- that affect the command.
-
- ""
- A comment. Command lines beginning with the dou-
- ble-quote character ("""")) aarree iiggnnoorreedd.. TThhiiss ppeerr--
- mmiittss ccoommmmeennttss iinn eeddiittoorr ssccrriippttss aanndd ssttaarrttuupp ffiilleess..
-
- <<ccoonnttrrooll--DD>>
-
- <<eenndd--ooff--ffiillee>>
- Scroll the screen. Write the next N lines, where
- N is the value of the ssccrroollll option. The command
- is the end-of-file terminal character, which may
- be different on different terminals. Tradition-
- ally, it is the <control-D> kkeeyy..
-
- HHiissttoorriiccaallllyy,, tthhee eeooff ccoommmmaanndd iiggnnoorreedd aannyy pprreecceedd--
- iinngg ccoouunntt,, aanndd tthhee <<eenndd--ooff--ffiillee>> cchhaarraacctteerr wwaass
- iiggnnoorreedd uunnlleessss iitt wwaass eenntteerreedd aass tthhee ffiirrsstt cchhaarraacc--
- tteerr ooff tthhee ccoommmmaanndd.. TThhiiss iimmpplleemmeennttaattiioonn ttrreeaattss iitt
- aass aa ccoommmmaanndd _o_n_l_y iiff eenntteerreedd aass tthhee ffiirrsstt cchhaarraacc--
- tteerr ooff tthhee ccoommmmaanndd lliinnee,, aanndd ootthheerrwwiissee ttrreeaattss iitt
- aass aannyy ootthheerr cchhaarraacctteerr..
-
- Line: Set to the last line written.
- Options: Affected by the ssccrroollll option.
-
-
-
-
-
-
-
-
-
-
-
-NNvvii//NNeexx RReeffeerreennccee ((EExx CCoommmmaannddss)) UUSSDD::1133--6611
-
-
- !! aarrgguummeenntt((ss))
- [[rraannggee]]!! aarrgguummeenntt((ss))
- Execute a shell command, or filter lines through a
- shell command. In the first synopsis, the remain-
- der of the line after the "!"" cchhaarraacctteerr iiss ppaasssseedd
- ttoo tthhee pprrooggrraamm nnaammeedd bbyy tthhee sshheellll ooppttiioonn,, aass aa
- ssiinnggllee aarrgguummeenntt..
-
- WWiitthhiinn tthhee rreesstt ooff tthhee lliinnee,, ""%%"" aanndd ""##"" aarree
- eexxppaannddeedd iinnttoo tthhee ccuurrrreenntt aanndd aalltteerrnnaattee ppaatthhnnaammeess,,
- rreessppeeccttiivveellyy.. TThhee cchhaarraacctteerr ""!!"" iiss eexxppaannddeedd wwiitthh
- tthhee ccoommmmaanndd tteexxtt ooff tthhee pprreevviioouuss !! ccoommmmaanndd..
- ((TThheerreeffoorree,, tthhee ccoommmmaanndd !!!! rreeppeeaattss tthhee pprreevviioouuss !!
- ccoommmmaanndd..)) TThhee ssppeecciiaall mmeeaanniinnggss ooff ""%%"",, ""##"",, aanndd
- ""!!"" ccaann bbee oovveerrrriiddddeenn bbyy eessccaappiinngg tthheemm wwiitthh aa
- bbaacckkssllaasshh.. IIff nnoo !! oorr ::!! ccoommmmaanndd hhaass yyeett bbeeeenn
- eexxeeccuutteedd,, iitt iiss aann eerrrroorr ttoo uussee aann uunneessccaappeedd ""!!""
- cchhaarraacctteerr.. TThhee !! ccoommmmaanndd ddooeess _n_o_t ddoo sshheellll
- eexxppaannssiioonn oonn tthhee ssttrriinnggss pprroovviiddeedd aass aarrgguummeennttss..
- IIff aannyy ooff tthhee aabboovvee eexxppaannssiioonnss cchhaannggee tthhee ccoommmmaanndd
- tthhee uusseerr eenntteerreedd,, tthhee ccoommmmaanndd iiss rreeddiissppllaayyeedd aatt
- tthhee bboottttoomm ooff tthhee ssccrreeeenn..
-
- EExx tthheenn eexxeeccuutteess tthhee pprrooggrraamm nnaammeedd bbyy tthhee sshheellll
- ooppttiioonn,, wwiitthh aa --cc ffllaagg ffoolllloowweedd bbyy tthhee aarrgguummeennttss
- ((wwhhiicchh aarree bbuunnddlleedd iinnttoo aa ssiinnggllee aarrgguummeenntt))..
-
- TThhee !! ccoommmmaanndd iiss ppeerrmmiitttteedd iinn aann eemmppttyy ffiillee..
-
- IIff tthhee ffiillee hhaass bbeeeenn mmooddiiffiieedd ssiinnccee iitt wwaass llaasstt
- ccoommpplleetteellyy wwrriitttteenn,, tthhee ccoommmmaanndd wwiillll wwaarrnn yyoouu..
-
- AA ssiinnggllee ""!!"" cchhaarraacctteerr iiss ddiissppllaayyeedd wwhheenn tthhee ccoomm--
- mmaanndd ccoommpplleetteess..
-
- IInn tthhee sseeccoonndd ffoorrmm ooff tthhee !! ccoommmmaanndd,, tthhee rreemmaaiinn--
- ddeerr ooff tthhee lliinnee aafftteerr tthhee ""!!"" iiss ppaasssseedd ttoo tthhee
- pprrooggrraamm nnaammeedd bbyy tthhee sshheellll ooppttiioonn,, aass ddeessccrriibbeedd
- aabboovvee.. TThhee ssppeecciiffiieedd lliinneess aarree ppaasssseedd ttoo tthhee pprroo--
- ggrraamm aass ssttaannddaarrdd iinnppuutt,, aanndd tthhee ssttaannddaarrdd aanndd ssttaann--
- ddaarrdd eerrrroorr oouuttppuutt ooff tthhee pprrooggrraamm rreeppllaaccee tthhee oorriigg--
- iinnaall lliinneess..
-
- Line: Unchanged if no range was specified, oth-
- erwise set to the first line of the
- range.
- Options: Affected by the sshheellll and wwaarrnn options.
-
- [[rraannggee]] ## [[ccoouunntt]] [[ffllaaggss]]
- [[rraannggee]] nnuu[[mmbbeerr]] [[ccoouunntt]] [[ffllaaggss]]
- Display the selected lines, each preceded with its
- line number.
-
-
-
-
-
-
-
-
-
-
-
-UUSSDD::1133--6622 NNvvii//NNeexx RReeffeerreennccee ((EExx CCoommmmaannddss))
-
-
- The line number format is "%6d", followed by two
- spaces.
-
- Line: Set to the last line displayed.
- Options: Affected by the lliisstt option.
-
- @@ bbuuffffeerr
- ** bbuuffffeerr
- Execute a buffer. Each line in the named buffer
- is executed as an eexx command. If no buffer is
- specified, or if the specified buffer is "@"" oorr
- ""**", the last buffer executed is used.
-
- [[rraannggee]] <<[[<< ......]] [[ccoouunntt]] [[ffllaaggss]]
- 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 sshhiiffttwwiiddtthh option. Only
- leading whitespace characters are deleted when
- shifting left; once the first column of the line
- contains a nonblank character, the sshhiifftt command
- will succeed, but the line will not be modified.
-
- If the command character << or >> is repeated more
- than once, the command is repeated once for each
- additional command character.
-
- Line: If the current line is set to one of the
- lines that are affected by the command,
- it is unchanged. Otherwise, it is set to
- the first nonblank character of the low-
- est numbered line shifted.
- Options: Affected by the sshhiiffttwwiiddtthh option.
-
- [[lliinnee]] == [[ffllaaggss]]
- Display the line number of line ((wwhhiicchh ddeeffaauullttss ttoo
- tthhee llaasstt lliinnee iinn tthhee ffiillee))..
-
- Line: Unchanged.
- Options: None.
-
- [[rraannggee]] >>[[>> ......]] [[ccoouunntt]] [[ffllaaggss]]
- Shift right. The specified lines are shifted to
- the right by the number of columns specified by
- the sshhiiffttwwiiddtthh option, by inserting tab and space
- characters. Empty lines are not changed.
-
- If the command character ">"" iiss rreeppeeaatteedd mmoorree tthhaann
- oonnccee,, tthhee ccoommmmaanndd iiss rreeppeeaatteedd oonnccee ffoorr eeaacchh aaddddii--
- ttiioonnaall ccoommmmaanndd cchhaarraacctteerr..
-
- Line: Set to the last line modified by the com-
- mand.
-
-
-
-
-
-
-
-
-
-
-NNvvii//NNeexx RReeffeerreennccee ((EExx CCoommmmaannddss)) UUSSDD::1133--6633
-
-
- Options: Affected by the sshhiiffttwwiiddtthh option.
-
- aabb[[bbrreevv]] llhhss rrhhss
- Add an abbreviation to the current abbreviation
- list. When inserting text in vvii, 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.. IIff aa mmaattcchh iiss
- ffoouunndd,, tthheeyy aarree rreeppllaacceedd wwiitthh rrhhss. 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> cchhaarraacctteerr tthhaatt wwaass
- eenntteerreedd,, tthheenn tthhee oonnee oorr tthhee bbootthh cchhaarraacctteerrss aarree
- cchheecckkeedd ffoorr aa mmaattcchh.. OOtthheerrwwiissee,, tthhee sseett iinncclluuddeess
- bbootthh cchhaarraacctteerrss,, aass wweellll aass tthhee cchhaarraacctteerrss tthhaatt
- pprreecceeddee tthheemm tthhaatt aarree tthhee ssaammee wwoorrdd ccllaassss ((ii..ee..
- wwoorrdd oorr nnoonn--wwoorrdd)) aass tthhee sseeccoonndd ttoo llaasstt cchhaarraacctteerr
- eenntteerreedd bbeeffoorree tthhee nnoonn--wwoorrdd cchhaarraacctteerr tthhaatt ttrriigg--
- ggeerreedd tthhee cchheecckk,, bbaacckk ttoo tthhee ffiirrsstt <<bbllaannkk>>cchhaarraacc--
- tteerr,, tthhee bbeeggiinnnniinngg ooff tthhee iinnsseerrttiioonn,, oorr tthhee bbeeggiinn--
- nniinngg ooff tthhee lliinnee oorr tthhee ffiillee..
-
- FFoorr eexxaammppllee,, tthhee aabbbbrreevviiaattiioonnss::
-
-
- ::aabbbbrreevviiaattee aabbcc AABBCC
- ::aabbbbrreevviiaattee ##ii ##iinncclluuddee
- ::aabbbbrreevviiaattee //**##ii //**##iinncclluuddee
-
- will all work, while the abbreviations:
-
-
- :abbreviate a#i A#include
- :abbreviate /* /********************
-
- will not work, and are not permitted by nnvvii.
-
- To keep the abbreviation expansion from happening,
- the character immediately following the lhs cchhaarr--
- aacctteerrss sshhoouulldd bbee qquuootteedd wwiitthh aa <<lliitteerraall--nneexxtt>>
- character.
-
- The replacement rhs iiss iittsseellff ssuubbjjeecctt ttoo bbootthh ffuurr--
- tthheerr aabbbbrreevviiaattiioonn eexxppaannssiioonn aanndd ffuurrtthheerr mmaapp eexxppaann--
- ssiioonn..
-
- Line: Unchanged.
-
-
-
-
-
-
-
-
-
-
-
-
-UUSSDD::1133--6644 NNvvii//NNeexx RReeffeerreennccee ((EExx CCoommmmaannddss))
-
-
- Options: None.
-
- [[lliinnee]] aa[[ppppeenndd]][[!!]]
- 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,,
- oorr ttoo tthhee ffiirrsstt lliinnee ooff tthhee ffiillee iiff aa lliinnee of 0
- was specified. Following the command name with a
- "!"" cchhaarraacctteerr ccaauusseess tthhee aauuttooiinnddeenntt ooppttiioonn ttoo bbee
- ttoogggglleedd ffoorr tthhee dduurraattiioonn ooff tthhee ccoommmmaanndd..
-
- Line: Unchanged.
- Options: Affected by the aauuttooiinnddeenntt and nnuummbbeerr
- options.
-
- aarr[[ggss]]
- Display the argument list. The current argument
- is displayed inside of "["" aanndd ""]]" characters.
- The argument list is the list of operands speci-
- fied on startup, which can be replaced using the
- nneexxtt command.
-
- Line: Unchanged.
- Options: None.
-
- bbgg
- VVii mode only. Background the current screen.
-
- Line: Set to the current line when the screen
- was last edited.
- Options: None.
-
- [[rraannggee]] cc[[hhaannggee]][[!!]] [[ccoouunntt]]
- Replace the lines with input text. Following the
- command name with a "!"" cchhaarraacctteerr ccaauusseess tthhee
- aauuttooiinnddeenntt ooppttiioonn ttoo bbee ttoogggglleedd ffoorr tthhee dduurraattiioonn
- ooff tthhee ccoommmmaanndd..
-
- 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 aauuttooiinnddeenntt and nnuummbbeerr
- options.
-
- cchhdd[[iirr]][[!!]] [[ddiirreeccttoorryy]]
- ccdd[[!!]] [[ddiirreeccttoorryy]]
- Change the current working directory. The direc-
- tory aarrgguummeenntt iiss ssuubbjjeecctteedd ttoo _s_h((11)) wwoorrdd eexxppaann--
- ssiioonnss.. WWhheenn iinnvvookkeedd wwiitthh nnoo ddiirreeccttoorryy aarrgguummeenntt
- aanndd tthhee HHOOMMEE _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
-
-
-
-
-
-
-
-
-
-
-NNvvii//NNeexx RReeffeerreennccee ((EExx CCoommmmaannddss)) UUSSDD::1133--6655
-
-
- _d_i_r_e_c_t_o_r_y _n_a_m_e_d _b_y _t_h_e _H_O_M_E eennvviirroonnmmeenntt vvaarriiaabbllee
- bbeeccoommeess tthhee nneeww ccuurrrreenntt ddiirreeccttoorryy.. OOtthheerrwwiissee,, tthhee
- nneeww ccuurrrreenntt ddiirreeccttoorryy bbeeccoommeess tthhee ddiirreeccttoorryy
- rreettuurrnneedd bbyy tthhee _g_e_t_p_w_e_n_t((33)) rroouuttiinnee..
-
- TThhee cchhddiirr ccoommmmaanndd wwiillll ffaaiill iiff tthhee ffiillee hhaass bbeeeenn
- mmooddiiffiieedd ssiinnccee tthhee llaasstt ccoommpplleettee wwrriittee ooff tthhee
- ffiillee.. YYoouu ccaann oovveerrrriiddee tthhiiss cchheecckk bbyy aappppeennddiinngg aa
- ""!!"" cchhaarraacctteerr ttoo tthhee ccoommmmaanndd..
-
- Line: Unchanged.
- Options: Affected by the ccddppaatthh option.
-
- [[rraannggee]] ccoo[[ppyy]] lliinnee [[ffllaaggss]]
- [[rraannggee]] tt lliinnee [[ffllaaggss]]
- 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.
-
- [[rraannggee]] dd[[eelleettee]] [[bbuuffffeerr]] [[ccoouunntt]] [[ffllaaggss]]
- Delete the lines from the file. The deleted text
- is saved in the specified buffer, or, if no buffer
- is specified, in the unnamed buffer. If the com-
- mand name is followed by a letter that could be
- interpreted as either a buffer name or a flag
- value (because neither a count oorr ffllaaggss values
- were given), eexx treats the letter as a flags vvaalluuee
- iiff tthhee lleetttteerr iimmmmeeddiiaatteellyy ffoolllloowwss tthhee ccoommmmaanndd
- nnaammee,, wwiitthhoouutt aannyy wwhhiitteessppaaccee sseeppaarraattiioonn.. IIff tthhee
- lleetttteerr iiss pprreecceeddeedd bbyy wwhhiitteessppaaccee cchhaarraacctteerrss,, iitt
- ttrreeaattss iitt aass aa bbuuffffeerr nnaammee..
-
- Line: Set to the line following the deleted
- lines, or to the last line if the deleted
- lines were at the end.
- Options: None.
-
- ddii[[ssppllaayy]] bb[[uuffffeerrss]] || cc[[oonnnneeccttiioonnss]] || ss[[ccrreeeennss]] ||
- tt[[aaggss]]
- Display buffers, ccssccooppee connections, screens or
- tags. The ddiissppllaayy 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 ccssccooppee databases.
-
-
-
-
-
-
-
-
-
-
-
-UUSSDD::1133--6666 NNvvii//NNeexx RReeffeerreennccee ((EExx CCoommmmaannddss))
-
-
- s[creens]
- Display the file names of all background
- screens.
- t[ags] Display the tags stack.
-
- Line: Unchanged.
- Options: None.
-
- ee[[ddiitt]][[!!]] [[++ccmmdd]] [[ffiillee]]
- eexx[[!!]] [[++ccmmdd]] [[ffiillee]]
- 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 "!"" cchhaarraacctteerr ttoo tthhee ccoommmmaanndd nnaammee..
-
- IIff tthhee ""++ccmmdd" option is specified, that eexx command
- will be executed in the new file. Any eexx 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.
- EEddiitt or EExx, while in vvii mode, will edit the file
- in a new screen. In this case, any modifications
- to the current file are ignored.
-
- 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 vvii mode, and the last line
- of the file if you are in eexx.
- Options: None.
-
- eexxuu[[ssaaggee]] [[ccoommmmaanndd]]
- Display usage for an eexx command. If command iiss
- ssppeecciiffiieedd,, aa uussaaggee ssttaatteemmeenntt ffoorr tthhaatt ccoommmmaanndd iiss
- ddiissppllaayyeedd.. OOtthheerrwwiissee,, uussaaggee ssttaatteemmeennttss ffoorr aallll eexx
- ccoommmmaannddss aarree ddiissppllaayyeedd..
-
- Line: Unchanged.
- Options: None.
-
- ff[[iillee]] [[ffiillee]]
- 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.
-
-
-
-
-
-
-
-
-
-
-
-
-NNvvii//NNeexx RReeffeerreennccee ((EExx CCoommmmaannddss)) UUSSDD::1133--6677
-
-
- Line: Unchanged.
- Options: None.
-
- ffgg [[nnaammee]]
- VVii mode only. Foreground the specified screen.
- Swap the current screen with the specified back-
- grounded screen. If no screen is specified, the
- first background screen is foregrounded.
-
- Line: Set to the current line when the screen
- was last edited.
- Options: None.
-
- [[rraannggee]] gg[[lloobbaall]] //ppaatttteerrnn// [[ccoommmmaannddss]]
- [[rraannggee]] vv //ppaatttteerrnn// [[ccoommmmaannddss]]
- Apply commands to lines matching (or not matching)
- a pattern. The lines within the given range that
- match ("g[lobal]"")),, oorr ddoo nnoott mmaattcchh ((""vv") the
- given pattern are selected. Then, the specified
- eexx command(s) are executed with the current line
- ("."")) sseett ttoo eeaacchh sseelleecctteedd lliinnee.. IIff nnoo rraannggee iiss
- ssppeecciiffiieedd,, tthhee eennttiirree ffiillee iiss sseeaarrcchheedd ffoorr mmaattcchh--
- iinngg,, oorr nnoott mmaattcchhiinngg,, lliinneess..
-
- MMuullttiippllee ccoommmmaannddss ccaann bbee ssppeecciiffiieedd,, oonnee ppeerr lliinnee,,
- bbyy eessccaappiinngg eeaacchh <<nneewwlliinnee>> character with a back-
- slash, or by separating commands with a "|"" cchhaarr--
- aacctteerr.. IIff nnoo ccoommmmaannddss aarree ssppeecciiffiieedd,, tthhee ccoommmmaanndd
- ddeeffaauullttss ttoo tthhee pprriinntt ccoommmmaanndd..
-
- FFoorr tthhee aappppeenndd,, cchhaannggee aanndd iinnsseerrtt ccoommmmaannddss,, tthhee
- iinnppuutt tteexxtt mmuusstt bbee ppaarrtt ooff tthhee gglloobbaall ccoommmmaanndd
- lliinnee.. IInn tthhiiss ccaassee,, tthhee tteerrmmiinnaattiinngg ppeerriioodd ccaann bbee
- oommiitttteedd iiff iitt eennddss tthhee ccoommmmaannddss..
-
- TThhee vviissuuaall ccoommmmaanndd mmaayy aallssoo bbee ssppeecciiffiieedd aass oonnee ooff
- tthhee eexx ccoommmmaannddss.. IInn tthhiiss mmooddee,, iinnppuutt iiss ttaakkeenn
- ffrroomm tthhee tteerrmmiinnaall.. EEnntteerriinngg aa QQ ccoommmmaanndd iinn vvii
- mmooddee ccaauusseess tthhee nneexxtt lliinnee mmaattcchhiinngg tthhee ppaatttteerrnn ttoo
- bbee sseelleecctteedd aanndd vvii ttoo bbee rreeeenntteerreedd,, uunnttiill tthhee lliisstt
- iiss eexxhhaauusstteedd..
-
- TThhee gglloobbaall,, vv aanndd uunnddoo ccoommmmaannddss ccaannnnoott bbee uusseedd aass
- ppaarrtt ooff tthheessee ccoommmmaannddss..
-
- TThhee eeddiittoorr ooppttiioonnss aauuttooiinnddeenntt,, aauuttoopprriinntt aanndd
- rreeppoorrtt aarree ttuurrnneedd ooffff ffoorr tthhee dduurraattiioonn ooff tthhee
- gglloobbaall aanndd vv ccoommmmaannddss..
-
- Line: The last line modified.
- Options: Affected by the iiggnnoorreeccaassee and mmaaggiicc
- options. Turns off the aauuttooiinnddeenntt, aauuttoo--
- pprriinntt and rreeppoorrtt options.
-
-
-
-
-
-
-
-
-
-
-UUSSDD::1133--6688 NNvvii//NNeexx RReeffeerreennccee ((EExx CCoommmmaannddss))
-
-
- hhee[[llpp]]
- Display a help message.
-
- Line: Unchanged.
- Options: None.
-
- [[lliinnee]] ii[[nnsseerrtt]][[!!]]
- The input text is inserted before the specified
- line. Following the command name with a "!""
- cchhaarraacctteerr ccaauusseess tthhee aauuttooiinnddeenntt ooppttiioonn sseettttiinngg ttoo
- bbee ttoogggglleedd ffoorr tthhee dduurraattiioonn ooff tthhiiss ccoommmmaanndd..
-
- 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
- target line. Affected by the aauuttooiinnddeenntt
- and nnuummbbeerr options.
-
- [[rraannggee]] jj[[ooiinn]][[!!]] [[ccoouunntt]] [[ffllaaggss]]
- Join lines of text together.
-
- A count ssppeecciiffiieedd ttoo tthhee ccoommmmaanndd ssppeecciiffiieess tthhaatt
- tthhee llaasstt lliinnee ooff tthhee rraannggee plus count ssuubbsseeqquueenntt
- lliinneess wwiillll bbee jjooiinneedd.. ((NNoottee,, tthhiiss ddiiffffeerrss bbyy oonnee
- ffrroomm tthhee ggeenneerraall rruullee wwhheerree oonnllyy ccoouunntt- 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 ("("")),, ddoo nnootthhiinngg.. OOtthheerrwwiissee,, iiff
- tthhee ccuurrrreenntt lliinnee eennddss wwiitthh aa qquueessttiioonn mmaarrkk ((""??"),
- period ("."")) oorr eexxccllaammaattiioonn ppooiinntt ((""!!"), insert
- two spaces. Otherwise, insert a single space.
-
- Appending a "!"" cchhaarraacctteerr ttoo tthhee ccoommmmaanndd nnaammee
- ccaauusseess aa ssiimmpplleerr jjooiinn wwiitthh nnoo wwhhiittee--ssppaaccee pprroocceessss--
- iinngg..
-
- Line: Unchanged.
- Options: None.
-
- [[rraannggee]] ll[[iisstt]] [[ccoouunntt]] [[ffllaaggss]]
- Display the lines unambiguously. Tabs are dis-
- played as "^I"",, aanndd tthhee eenndd ooff tthhee lliinnee iiss mmaarrkkeedd
- wwiitthh aa ""$$" character.
-
- Line: Set to the last line displayed.
- Options: Affected by the nnuummbbeerr option.
-
- mmaapp[[!!]] [[llhhss rrhhss]]
- Define or display maps (for vvii only).
-
-
-
-
-
-
-
-
-
-
-NNvvii//NNeexx RReeffeerreennccee ((EExx CCoommmmaannddss)) UUSSDD::1133--6699
-
-
- If "lhs"" aanndd ""rrhhss" are not specified, the current
- set of command mode maps are displayed. If a "!""
- cchhaarraacctteerr iiss aappppeennddeedd ttoo ttoo tthhee ccoommmmaanndd,, tthhee tteexxtt
- iinnppuutt mmooddee mmaappss aarree ddiissppllaayyeedd..
-
- OOtthheerrwwiissee,, wwhheenn tthhee ""llhhss" character sequence is
- entered in vvii, the action is as if the correspond-
- ing "rhs"" hhaadd bbeeeenn eenntteerreedd.. IIff aa ""!!" 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""
- ttoo hhaavvee ttwwoo ddiiffffeerreenntt mmaaccrroo ddeeffiinniittiioonnss aatt tthhee
- ssaammee ttiimmee:: oonnee ffoorr ccoommmmaanndd mmooddee aanndd oonnee ffoorr iinnppuutt
- mmooddee..
-
- WWhhiitteessppaaccee cchhaarraacctteerrss rreeqquuiirree eessccaappiinngg wwiitthh aa
- <<lliitteerraall--nneexxtt>> character to be entered in the lhs
- ssttrriinngg iinn vviissuuaall mmooddee..
-
- NNoorrmmaallllyy,, kkeeyyss iinn tthhee rrhhss string are remapped (see
- the rreemmaapp 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 rreemmaapp option. For example, the
- command ":map n nz."" mmaappss tthhee ""nn" key to the nn
- and zz commands.
-
- To exit an infinitely looping map, use the termi-
- nal <interrupt> cchhaarraacctteerr..
-
- Line: Unchanged.
- Options: Affected by the rreemmaapp option.
-
- [[lliinnee]] mmaa[[rrkk]] <<cchhaarraacctteerr>>
- [[lliinnee]] kk <<cchhaarraacctteerr>>
- Mark the line with the mark <character>.. TThhee
- eexxpprreessssiioonnss ""''<<cchhaarraacctteerr>>" and "`<character>"" ccaann
- tthheenn bbee uusseedd aass aann aaddddrreessss iinn aannyy ccoommmmaanndd tthhaatt
- uusseess oonnee..
-
- Line: Unchanged.
- Options: None.
-
- [[rraannggee]] mm[[oovvee]] lliinnee
- 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.
-
- mmkk[[eexxrrcc]][[!!]] ffiillee
- Write the abbreviations, editor options and maps
-
-
-
-
-
-
-
-
-
-
-UUSSDD::1133--7700 NNvvii//NNeexx RReeffeerreennccee ((EExx CCoommmmaannddss))
-
-
- to the specified file. Information is written in
- a form which can later be read back in using the
- eexx ssoouurrccee command. If file aallrreeaaddyy eexxiissttss,, tthhee
- mmkkeexxrrcc ccoommmmaanndd wwiillll ffaaiill.. TThhiiss cchheecckk ccaann bbee oovveerr--
- rriiddddeenn bbyy aappppeennddiinngg aa ""!!"" cchhaarraacctteerr ttoo tthhee ccoomm--
- mmaanndd..
-
- Line: Unchanged.
- Options: None.
-
- nn[[eexxtt]][[!!]] [[ffiillee ......]]
- Edit the next file from the argument list. The
- nneexxtt command will fail if the file has been modi-
- fied since the last complete write. This check
- can be overridden by appending the "!"" cchhaarraacctteerr
- ttoo tthhee ccoommmmaanndd nnaammee.. TThhee aarrgguummeenntt lliisstt ccaann
- ooppttiioonnaallllyy bbee rreeppllaacceedd bbyy ssppeecciiffyyiinngg aa nneeww oonnee aass
- aarrgguummeennttss ttoo tthhiiss ccoommmmaanndd.. IInn tthhiiss ccaassee,, eeddiittiinngg
- ssttaarrttss wwiitthh tthhee ffiirrsstt ffiillee oonn tthhee nneeww lliisstt..
-
- CCaappiittaalliizziinngg tthhee ffiirrsstt lleetttteerr ooff tthhee ccoommmmaanndd,, ii..ee..
- NNeexxtt,, wwhhiillee iinn vvii mmooddee,, wwiillll sseett tthhee aarrgguummeenntt lliisstt
- aanndd eeddiitt tthhee ffiillee iinn aa nneeww ssccrreeeenn.. IInn tthhiiss ccaassee,,
- aannyy mmooddiiffiiccaattiioonnss ttoo tthhee ccuurrrreenntt ffiillee aarree iiggnnoorreedd..
-
- Line: Set as described for the eeddiitt command.
- Options: Affected by the options aauuttoowwrriittee and
- wwrriitteeaannyy.
-
- [[lliinnee]] oo[[ppeenn]] //ppaatttteerrnn// [[ffllaaggss]]
- Enter open mode. Open mode is the same as being
- in vvii, but with a one-line window. All the stan-
- dard vvii 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 ooppeenn option.
-
- pprree[[sseerrvvee]]
- Save the file in a form that can later be recov-
- ered using the eexx --rr option. When the file is
- preserved, an email message is sent to the user.
-
- Line: Unchanged.
- Options: None.
-
- pprreevv[[iioouuss]][[!!]]
- Edit the previous file from the argument list.
-
-
-
-
-
-
-
-
-
-
-NNvvii//NNeexx RReeffeerreennccee ((EExx CCoommmmaannddss)) UUSSDD::1133--7711
-
-
- The pprreevviioouuss command will fail if the file has
- been modified since the last complete write. This
- check can be overridden by appending the "!""
- cchhaarraacctteerr ttoo tthhee ccoommmmaanndd nnaammee..
-
- CCaappiittaalliizziinngg tthhee ffiirrsstt lleetttteerr ooff tthhee ccoommmmaanndd,, ii..ee..
- PPrreevviioouuss,, wwhhiillee iinn vvii mmooddee,, wwiillll eeddiitt tthhee ffiillee iinn
- aa nneeww ssccrreeeenn.. IInn tthhiiss ccaassee,, aannyy mmooddiiffiiccaattiioonnss ttoo
- tthhee ccuurrrreenntt ffiillee aarree iiggnnoorreedd..
-
- Line: Set as described for the eeddiitt command.
- Options: Affected by the options aauuttoowwrriittee and
- wwrriitteeaannyy. None.
-
- [[rraannggee]] pp[[rriinntt]] [[ccoouunntt]] [[ffllaaggss]]
- Display the specified lines.
-
- Line: Set to the last line displayed.
- Options: Affected by the lliisstt and nnuummbbeerr option.
-
- [[lliinnee]] ppuu[[tt]] [[bbuuffffeerr]]
- 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.
-
- qq[[uuiitt]][[!!]]
- End the editing session. If the file has been
- modified since the last complete write, the qquuiitt
- command will fail. This check may be overridden
- by appending a "!"" cchhaarraacctteerr ttoo tthhee ccoommmmaanndd..
-
- IIff tthheerree aarree mmoorree ffiilleess ttoo eeddiitt,, tthhee qquuiitt ccoommmmaanndd
- wwiillll ffaaiill.. AAppppeennddiinngg aa ""!!"" cchhaarraacctteerr ttoo tthhee ccoomm--
- mmaanndd nnaammee oorr eenntteerriinngg ttwwoo qquuiitt ccoommmmaannddss ((ii..ee.. wwqq,,
- qquuiitt,, xxiitt oorr ZZZZ)) iinn aa rrooww)) wwiillll oovveerrrriiddee tthhiiss
- cchheecckk aanndd tthhee eeddiittoorr wwiillll eexxiitt..
-
- Line: Unchanged.
- Options: None.
-
- [[lliinnee]] rr[[eeaadd]][[!!]] [[ffiillee]]
- Read a file. A copy of the specified file is
- appended to the line. If line iiss 00,, tthhee ccooppyy iiss
- iinnsseerrtteedd aatt tthhee bbeeggiinnnniinngg ooff tthhee ffiillee.. IIff nnoo ffiillee
- iiss ssppeecciiffiieedd,, tthhee ccuurrrreenntt ffiillee iiss rreeaadd;; iiff tthheerree
- iiss nnoo ccuurrrreenntt ffiillee,, tthheenn ffiillee becomes the current
- file. If there is no current file and no file iiss
- ssppeecciiffiieedd,, tthheenn tthhee rreeaadd ccoommmmaanndd wwiillll ffaaiill..
-
-
-
-
-
-
-
-
-
-
-
-UUSSDD::1133--7722 NNvvii//NNeexx RReeffeerreennccee ((EExx CCoommmmaannddss))
-
-
- IIff ffiillee iiss pprreecceeddeedd bbyy aa ""!!"" cchhaarraacctteerr,, ffiillee iiss
- ttrreeaatteedd aass iiff iitt wweerree aa sshheellll ccoommmmaanndd,, aanndd ppaasssseedd
- ttoo tthhee pprrooggrraamm nnaammeedd bbyy tthhee sshheellll eeddiitt ooppttiioonn..
- TThhee ssttaannddaarrdd aanndd ssttaannddaarrdd eerrrroorr oouuttppuuttss ooff tthhaatt
- ccoommmmaanndd aarree rreeaadd iinnttoo tthhee ffiillee aafftteerr tthhee ssppeecciiffiieedd
- lliinnee.. TThhee ssppeecciiaall mmeeaanniinngg ooff tthhee ""!!"" cchhaarraacctteerr
- ccaann bbee oovveerrrriiddddeenn bbyy eessccaappiinngg iitt wwiitthh aa bbaacckkssllaasshh
- ((""\\"")) cchhaarraacctteerr..
-
- Line: When executed from eexx, the current line
- is set to the last line read. When exe-
- cuted from vvii, the current line is set to
- the first line read.
- Options: None.
-
- rreecc[[oovveerr]] ffiillee
- Recover file iiff iitt wwaass pprreevviioouussllyy ssaavveedd.. IIff nnoo
- ssaavveedd ffiillee bbyy tthhaatt nnaammee eexxiissttss,, tthhee rreeccoovveerr ccoomm--
- mmaanndd bbeehhaavveess eeqquuiivvaalleennttllyy ttoo tthhee eeddiitt ccoommmmaanndd..
-
- Line: Set as described for the eeddiitt command.
- Options: None.
-
- rreess[[iizzee]] [[++||--]]ssiizzee
- VVii mode only. Grow or shrink the current screen.
- If size iiss aa ppoossiittiivvee,, ssiiggnneedd nnuummbbeerr,, tthhee ccuurrrreenntt
- ssccrreeeenn iiss ggrroowwnn bbyy tthhaatt mmaannyy lliinneess.. IIff ssiizzee is a
- negative, signed number, the current screen is
- shrunk by that many lines. If size iiss nnoott ssiiggnneedd,,
- tthhee ccuurrrreenntt ssccrreeeenn iiss sseett ttoo tthhee ssppeecciiffiieedd ssiizzee.
- Applicable only to split screens.
-
- Line: Unchanged.
- Options: None.
-
- rreeww[[iinndd]][[!!]]
- Rewind the argument list. If the current file has
- been modified since the last complete write, the
- rreewwiinndd command will fail. This check may be over-
- ridden by appending the "!"" cchhaarraacctteerr ttoo tthhee ccoomm--
- mmaanndd..
-
- OOtthheerrwwiissee,, tthhee ccuurrrreenntt ffiillee iiss sseett ttoo tthhee ffiirrsstt
- ffiillee iinn tthhee aarrgguummeenntt lliisstt..
-
- Line: Set as described for the eeddiitt command.
- Options: Affected by the aauuttoowwrriittee and wwrriitteeaannyy
- options.
-
- [[aallll]]
- ssee[[tt]] [[ooppttiioonn[[==[[vvaalluuee]]]] ......]] [[nnooooppttiioonn ......]] [[ooppttiioonn??
- ......]]
- Display or set editor options. When no arguments
-
-
-
-
-
-
-
-
-
-
-NNvvii//NNeexx RReeffeerreennccee ((EExx CCoommmmaannddss)) UUSSDD::1133--7733
-
-
- are specified, the editor option tteerrmm, and any
- editor options whose values have been changed from
- the default settings are displayed. If the argu-
- ment all iiss ssppeecciiffiieedd,, tthhee vvaalluueess ooff aallll ooff eeddiittoorr
- ooppttiioonnss aarree ddiissppllaayyeedd..
-
- SSppeecciiffyyiinngg aann ooppttiioonn nnaammee ffoolllloowweedd bbyy tthhee cchhaarraacc--
- tteerr ""??" causes the current value of that option
- to be displayed. The "?"" ccaann bbee sseeppaarraatteedd ffrroomm
- tthhee ooppttiioonn nnaammee bbyy wwhhiitteessppaaccee cchhaarraacctteerrss.. TThhee ""??"
- is necessary only for Boolean valued options.
- Boolean options can be given values by the form
- "set option"" ttoo ttuurrnn tthheemm oonn,, oorr ""sseett nnooooppttiioonn" to
- turn them off. String and numeric options can be
- assigned by the form "set option=value"".. AAnnyy
- wwhhiitteessppaaccee cchhaarraacctteerrss iinn ssttrriinnggss ccaann bbee iinncclluuddeedd
- lliitteerraallllyy bbyy pprreecceeddiinngg eeaacchh wwiitthh aa bbaacckkssllaasshh..
- MMoorree tthhaann oonnee ooppttiioonn ccaann bbee sseett oorr lliisstteedd bbyy aa
- ssiinnggllee sseett ccoommmmaanndd,, bbyy ssppeecciiffyyiinngg mmuullttiippllee aarrgguu--
- mmeennttss,, eeaacchh sseeppaarraatteedd ffrroomm tthhee nneexxtt bbyy wwhhiitteessppaaccee
- cchhaarraacctteerrss..
-
- Line: Unchanged.
- Options: None.
-
- sshh[[eellll]]
- Run the shell program. The program named by the
- sshheellll option is run with a --ii (for interactive)
- flag. Editing is resumed when that program exits.
-
- Line: Unchanged.
- Options: Affected by the sshheellll option.
-
- ssoo[[uurrccee]] ffiillee
- Read and execute eexx commands from a file. SSoouurrccee
- commands may be nested.
-
- Line: Unchanged.
- Options: None.
-
- [[ffllaaggss]]
- [[rraannggee]] ss[[uubbssttiittuuttee]] [[//ppaatttteerrnn//rreeppllaaccee//]] [[ooppttiioonnss]]
- [[ccoouunntt]]
- [[rraannggee]] && [[ooppttiioonnss]] [[ccoouunntt]] [[ffllaaggss]]
- [[rraannggee]] ~~ [[ooppttiioonnss]] [[ccoouunntt]] [[ffllaaggss]]
- Make substitutions. Replace the first instance of
- pattern wwiitthh tthhee ssttrriinngg rreeppllaaccee on the specified
- line(s). If the "/pattern/repl/"" aarrgguummeenntt iiss nnoott
- ssppeecciiffiieedd,, tthhee ""//ppaatttteerrnn//rreeppll//" from the previous
- ssuubbssttiittuuttee command is used. Any character other
- than an alphabetic, numeric, <blank> or backslash
- character may be used as the delimiter.
-
-
-
-
-
-
-
-
-
-
-
-UUSSDD::1133--7744 NNvvii//NNeexx RReeffeerreennccee ((EExx CCoommmmaannddss))
-
-
- If options iinncclluuddeess tthhee lleetttteerr ""cc" (confirm), you
- will be prompted for confirmation before each
- replacement is done. An affirmative response (in
- English, a "y"" cchhaarraacctteerr)) ccaauusseess tthhee rreeppllaacceemmeenntt
- ttoo bbee mmaaddee.. AA qquuiitt rreessppoonnssee ((iinn EEnngglliisshh,, aa ""qq"
- character) causes the ssuubbssttiittuuttee command to be
- terminated. Any other response causes the
- replacement not to be made, and the ssuubbssttiittuuttee
- command continues. If options iinncclluuddeess tthhee lleetttteerr
- ""gg" (global), all nonoverlapping instances of pat-
- tern iinn tthhee lliinnee aarree rreeppllaacceedd..
-
- TThhee && vveerrssiioonn ooff tthhee ccoommmmaanndd iiss tthhee ssaammee aass nnoott
- ssppeecciiffyyiinngg aa ppaatttteerrnn oorr rreeppllaacceemmeenntt ssttrriinngg ttoo tthhee
- ssuubbssttiittuuttee ccoommmmaanndd,, aanndd tthhee ""&&"" iiss rreeppllaacceedd bbyy tthhee
- ppaatttteerrnn aanndd rreeppllaacceemmeenntt iinnffoorrmmaattiioonn ffrroomm tthhee pprree--
- vviioouuss ssuubbssttiittuuttee ccoommmmaanndd..
-
- TThhee ~~ vveerrssiioonn ooff tthhee ccoommmmaanndd iiss tthhee ssaammee aass && aanndd
- ss,, eexxcceepptt tthhaatt tthhee sseeaarrcchh ppaatttteerrnn uusseedd iiss tthhee llaasstt
- RREE uusseedd iinn _a_n_y ccoommmmaanndd,, nnoott nneecceessssaarriillyy tthhee oonnee
- uusseedd iinn tthhee llaasstt ssuubbssttiittuuttee ccoommmmaanndd..
-
- FFoorr eexxaammppllee,, iinn tthhee sseeqquueennccee
-
- ss//rreedd//bblluuee//
- //ggrreeeenn
- ~~
-
- the "~"" iiss eeqquuiivvaalleenntt ttoo ""ss//ggrreeeenn//bblluuee//".
-
- The ssuubbssttiittuuttee 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 iiggnnoorreeccaassee and mmaaggiicc
- option.
-
- ssuu[[ssppeenndd]][[!!]]
- sstt[[oopp]][[!!]]
- <<ccoonnttrrooll--ZZ>>
- Suspend the edit session. Appending a "!"" cchhaarr--
- aacctteerr ttoo tthheessee ccoommmmaannddss ttuurrnnss ooffff tthhee aauuttoowwrriittee
- ooppttiioonn ffoorr tthhee ccoommmmaanndd..
-
- Line: Unchanged.
- Options: Affected by the aauuttoowwrriittee and wwrriitteeaannyy
- options.
-
- ttaa[[gg]][[!!]] ttaaggssttrriinngg
- Edit the file containing the specified tag. If
-
-
-
-
-
-
-
-
-
-
-NNvvii//NNeexx RReeffeerreennccee ((EExx CCoommmmaannddss)) UUSSDD::1133--7755
-
-
- 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 ttaagg command
- will fail. This check can be overridden by
- appending the "!"" cchhaarraacctteerr ttoo tthhee ccoommmmaanndd nnaammee..
-
- TThhee ttaagg ccoommmmaanndd sseeaarrcchheess ffoorr ttaaggssttrriinngg iinn tthhee ttaaggss
- ffiillee((ss)) ssppeecciiffiieedd bbyy tthhee ooppttiioonn.. ((SSeeee _c_t_a_g_s((11))
- ffoorr mmoorree iinnffoorrmmaattiioonn oonn ttaaggss ffiilleess..))
-
- CCaappiittaalliizziinngg tthhee ffiirrsstt lleetttteerr ooff tthhee ccoommmmaanndd,, ii..ee..
- TTaagg,, wwhhiillee iinn vvii mmooddee,, wwiillll eeddiitt tthhee ffiillee iinn aa nneeww
- ssccrreeeenn.. IInn tthhiiss ccaassee,, aannyy mmooddiiffiiccaattiioonnss ttoo tthhee
- ccuurrrreenntt ffiillee aarree iiggnnoorreedd..
-
- Line: Set to the line indicated by the tag.
- Options: Affected by the aauuttoowwrriittee, ttaagglleennggtthh,
- ttaaggss and wwrriitteeaannyy options.
-
- ttaaggnn[[eexxtt]][[!!]]
- 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 ttaaggnneexxtt command will fail. This check
- can be overridden by appending the "!"" cchhaarraacctteerr
- ttoo tthhee ccoommmmaanndd nnaammee..
-
- CCaappiittaalliizziinngg tthhee ffiirrsstt lleetttteerr ooff tthhee ccoommmmaanndd,, ii..ee..
- TTaaggnneexxtt,, wwhhiillee iinn vvii mmooddee,, wwiillll eeddiitt tthhee ffiillee iinn aa
- nneeww ssccrreeeenn.. IInn tthhiiss ccaassee,, aannyy mmooddiiffiiccaattiioonnss ttoo
- tthhee ccuurrrreenntt ffiillee aarree iiggnnoorreedd..
-
- Line: Set to the line indicated by the tag.
- Options: Affected by the aauuttoowwrriittee and wwrriitteeaannyy
- options.
-
- ttaaggpp[[oopp]][[!!]] [[ffiillee || nnuummbbeerr]]
- Pop to the specified tag in the tags stack. If
- neither file oorr nnuummbbeerr is specified, the ttaaggppoopp
- command pops to the most recent entry on the tags
- stack. If file oorr nnuummbbeerr is specified, the ttaaggppoopp
- command pops to the most recent entry in the tags
- stack for that file, or numbered entry in the tags
- stack, respectively. (See the ddiissppllaayy command for
- information on displaying the tags stack.)
-
- If the file has been modified since the last com-
- plete write, the ttaaggppoopp command will fail. This
- check may be overridden by appending a "!"" cchhaarr--
- aacctteerr ttoo tthhee ccoommmmaanndd nnaammee..
-
-
-
-
-
-
-
-
-
-
-
-
-UUSSDD::1133--7766 NNvvii//NNeexx RReeffeerreennccee ((EExx CCoommmmaannddss))
-
-
- Line: Set to the line indicated by the tag.
- Options: Affected by the aauuttoowwrriittee and wwrriitteeaannyy
- options.
-
- ttaaggpp[[rreevv]][[!!]]
- 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 ttaaggpprreevv command will fail. This check
- can be overridden by appending the "!"" cchhaarraacctteerr
- ttoo tthhee ccoommmmaanndd nnaammee..
-
- CCaappiittaalliizziinngg tthhee ffiirrsstt lleetttteerr ooff tthhee ccoommmmaanndd,, ii..ee..
- TTaaggpprreevv,, wwhhiillee iinn vvii mmooddee,, wwiillll eeddiitt tthhee ffiillee iinn aa
- nneeww ssccrreeeenn.. IInn tthhiiss ccaassee,, aannyy mmooddiiffiiccaattiioonnss ttoo
- tthhee ccuurrrreenntt ffiillee aarree iiggnnoorreedd..
-
- Line: Set to the line indicated by the tag.
- Options: Affected by the aauuttoowwrriittee and wwrriitteeaannyy
- options.
-
- ttaaggtt[[oopp]][[!!]]
- 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 ttaaggttoopp command will fail. This
- check may be overridden by appending a "!"" cchhaarr--
- aacctteerr ttoo tthhee ccoommmmaanndd nnaammee..
-
- Line: Set to the line indicated by the tag.
- Options: Affected by the aauuttoowwrriittee and wwrriitteeaannyy
- options.
-
- uunnaa[[bbbbrreevv]] llhhss
- Delete an abbreviation. Delete lhs ffrroomm tthhee ccuurr--
- rreenntt lliisstt ooff aabbbbrreevviiaattiioonnss..
-
- Line: Unchanged.
- Options: None.
-
- uu[[nnddoo]]
- Undo the last change made to the file. Changes
- made by gglloobbaall, vv, vviissuuaall and map sequences are
- considered a single command. If repeated, the uu
- command alternates between these two states, and
- is its own inverse.
-
- Line: Set to the last line modified by the com-
- mand.
- Options: None.
-
-
-
-
-
-
-
-
-
-
-
-NNvvii//NNeexx RReeffeerreennccee ((EExx CCoommmmaannddss)) UUSSDD::1133--7777
-
-
- uunnmm[[aapp]][[!!]] llhhss
- Unmap a mapped string. Delete the command mode
- map definition for lhs.. IIff aa ""!!" character is
- appended to the command name, delete the text
- input mode map definition instead.
-
- Line: Unchanged.
- Options: None.
-
- vvee[[rrssiioonn]]
- Display the version of the eexx//vvii editor.
-
- [[lliinnee]] vvii[[ssuuaall]] [[ttyyppee]] [[ccoouunntt]] [[ffllaaggss]]
- EExx mode only. Enter vvii. The type iiss ooppttiioonnaall,,
- aanndd ccaann bbee ""--", "+"" oorr ""^^", as in the eexx zz 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 ssppeecciiffiieess tthhee nnuummbbeerr ooff lliinneess tthhaatt wwiillll
- iinniittiiaallllyy bbee ddiissppllaayyeedd.. ((TThhee ddeeffaauulltt iiss tthhee vvaalluuee
- ooff tthhee wwiinnddooww eeddiittoorr ooppttiioonn..))
-
- Line: Unchanged unless line iiss ssppeecciiffiieedd,, iinn
- wwhhiicchh ccaassee iitt iiss sseett ttoo tthhaatt lliinnee..
- Options: None.
-
- vvii[[ssuuaall]][[!!]] [[++ccmmdd]] [[ffiillee]]
- VVii mode only. Edit a new file. Identical to the
- "edit[!] [+cmd] [file]"" ccoommmmaanndd..
-
- CCaappiittaalliizziinngg tthhee ffiirrsstt lleetttteerr ooff tthhee ccoommmmaanndd,, ii..ee..
- VViissuuaall,, wwiillll eeddiitt tthhee ffiillee iinn aa nneeww ssccrreeeenn.. IInn
- tthhiiss ccaassee,, aannyy mmooddiiffiiccaattiioonnss ttoo tthhee ccuurrrreenntt ffiillee
- aarree iiggnnoorreedd..
-
- vviiuu[[ssaaggee]] [[ccoommmmaanndd]]
- Display usage for a vvii command. If command iiss
- ssppeecciiffiieedd,, aa uussaaggee ssttaatteemmeenntt ffoorr tthhaatt ccoommmmaanndd iiss
- ddiissppllaayyeedd.. OOtthheerrwwiissee,, uussaaggee ssttaatteemmeennttss ffoorr aallll vvii
- ccoommmmaannddss aarree ddiissppllaayyeedd..
-
- Line: Unchanged.
- Options: None.
-
- [[rraannggee]] ww[[rriittee]][[!!]] [[>>>>]] [[ffiillee]]
- [[rraannggee]] ww[[rriittee]] [[!!]] [[ffiillee]]
- [[rraannggee]] wwnn[[!!]] [[>>>>]] [[ffiillee]]
- [[rraannggee]] wwqq[[!!]] [[>>>>]] [[ffiillee]]
- Write the file. The specified lines (the entire
- file, if no range is given) is written to file..
- IIff ffiillee is not specified, the current pathname is
- used. If file iiss ssppeecciiffiieedd,, aanndd iitt eexxiissttss,, oorr iiff
- tthhee ccuurrrreenntt ppaatthhnnaammee wwaass sseett uussiinngg tthhee ffiillee
-
-
-
-
-
-
-
-
-
-
-UUSSDD::1133--7788 NNvvii//NNeexx RReeffeerreennccee ((EExx CCoommmmaannddss))
-
-
- ccoommmmaanndd,, aanndd tthhee ffiillee aallrreeaaddyy eexxiissttss,, tthheessee ccoomm--
- mmaannddss wwiillll ffaaiill.. AAppppeennddiinngg aa ""!!"" cchhaarraacctteerr ttoo
- tthhee ccoommmmaanndd nnaammee wwiillll oovveerrrriiddee tthhiiss cchheecckk aanndd tthhee
- wwrriittee wwiillll bbee aatttteemmpptteedd,, rreeggaarrddlleessss..
-
- SSppeecciiffyyiinngg tthhee ooppttiioonnaall "">>>>"" ssttrriinngg wwiillll ccaauussee tthhee
- wwrriittee ttoo bbee aappppeennddeedd ttoo tthhee ffiillee,, iinn wwhhiicchh ccaassee nnoo
- tteessttss aarree mmaaddee ffoorr tthhee ffiillee aallrreeaaddyy eexxiissttiinngg..
-
- IIff tthhee ffiillee iiss pprreecceeddeedd bbyy aa ""!!"" cchhaarraacctteerr,, tthhee
- pprrooggrraamm nnaammeedd bbyy tthhee sshheellll eeddiitt ooppttiioonn iiss iinnvvookkeedd
- wwiitthh ffiillee aass iittss sseeccoonndd aarrgguummeenntt,, aanndd tthhee ssppeeccii--
- ffiieedd lliinneess aarree ppaasssseedd aass ssttaannddaarrdd iinnppuutt ttoo tthhaatt
- ccoommmmaanndd.. TThhee ""!!"" iinn tthhiiss uussaaggee mmuusstt bbee sseeppaarraatteedd
- ffrroomm ccoommmmaanndd nnaammee bbyy aatt lleeaasstt oonnee wwhhiitteessppaaccee cchhaarr--
- aacctteerr.. TThhee ssppeecciiaall mmeeaanniinngg ooff tthhee ""!!"" mmaayy bbee
- oovveerrrriiddddeenn bbyy eessccaappiinngg iitt wwiitthh aa bbaacckkssllaasshh ((""\\""))
- cchhaarraacctteerr..
-
- TThhee wwqq vveerrssiioonn ooff tthhee wwrriittee ccoommmmaanndd wwiillll eexxiitt tthhee
- eeddiittoorr aafftteerr wwrriittiinngg tthhee ffiillee,, iiff tthheerree aarree nnoo
- ffuurrtthheerr ffiilleess ttoo eeddiitt.. AAppppeennddiinngg aa ""!!"" cchhaarraacctteerr
- ttoo tthhee ccoommmmaanndd nnaammee oorr eenntteerriinngg ttwwoo ""qquuiitt"" ccoomm--
- mmaannddss ((ii..ee.. wwqq,, qquuiitt,, xxiitt oorr ZZZZ)) iinn aa rrooww)) wwiillll
- oovveerrrriiddee tthhiiss cchheecckk aanndd tthhee eeddiittoorr wwiillll eexxiitt,,
- iiggnnoorriinngg aannyy ffiilleess tthhaatt hhaavvee nnoott yyeett bbeeeenn eeddiitteedd..
-
- TThhee wwnn vveerrssiioonn ooff tthhee wwrriittee ccoommmmaanndd wwiillll mmoovvee ttoo
- tthhee nneexxtt ffiillee aafftteerr wwrriittiinngg tthhee ffiillee,, uunnlleessss tthhee
- wwrriittee ffaaiillss..
-
- Line: Unchanged.
- Options: Affected by the rreeaaddoonnllyy and wwrriitteeaannyy
- options.
-
- [[rraannggee]] xx[[iitt]][[!!]] [[ffiillee]]
- Write the file if it has been modified. The spec-
- ified lines are written to file,, iiff tthhee ffiillee hhaass
- bbeeeenn mmooddiiffiieedd ssiinnccee tthhee llaasstt ccoommpplleettee wwrriittee ttoo aannyy
- ffiillee.. IIff nnoo rraannggee is specified, the entire file
- is written.
-
- The xxiitt command will exit the editor after writing
- the file, if there are no further files to edit.
- Appending a "!"" cchhaarraacctteerr ttoo tthhee ccoommmmaanndd nnaammee oorr
- eenntteerriinngg ttwwoo ""qquuiitt"" ccoommmmaannddss ((ii..ee.. wwqq,, qquuiitt,, xxiitt
- oorr ZZZZ)) iinn aa rrooww)) wwiillll oovveerrrriiddee tthhiiss cchheecckk aanndd tthhee
- eeddiittoorr wwiillll eexxiitt,, iiggnnoorriinngg aannyy ffiilleess tthhaatt hhaavvee nnoott
- yyeett bbeeeenn eeddiitteedd..
-
- Line: Unchanged.
- Options: Affected by the rreeaaddoonnllyy and wwrriitteeaannyy
- options.
-
-
-
-
-
-
-
-
-
-
-NNvvii//NNeexx RReeffeerreennccee ((EExx CCoommmmaannddss)) UUSSDD::1133--7799
-
-
- [[rraannggee]] yyaa[[nnkk]] [[bbuuffffeerr]] [[ccoouunntt]]
- Copy the specified lines to a buffer. If no
- buffer is specified, the unnamed buffer is used.
-
- Line: Unchanged.
- Options: None.
-
- [[lliinnee]] zz [[ttyyppee]] [[ccoouunntt]] [[ffllaaggss]]
- Adjust the window. If no type iiss ssppeecciiffiieedd,, tthheenn
- ccoouunntt lines following the specified line are dis-
- played. The default count iiss tthhee vvaalluuee ooff tthhee
- wwiinnddooww ooppttiioonn.. TThhee ttyyppee aarrgguummeenntt cchhaannggeess tthhee
- ppoossiittiioonn aatt wwhhiicchh lliinnee iiss ddiissppllaayyeedd oonn tthhee ssccrreeeenn
- bbyy cchhaannggiinngg tthhee nnuummbbeerr ooff lliinneess ddiissppllaayyeedd bbeeffoorree
- aanndd aafftteerr lliinnee.. TThhee ffoolllloowwiinngg ttyyppee cchhaarraacctteerrss mmaayy
- bbee uusseedd::
-
- - 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 zz 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 ssccrroollll option.
-
- 1188.. SSeett OOppttiioonnss
-
- 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
- nneexx/nnvvii. Historically, only the full name and the
- official abbreviations were accepted by eexx/vvii. Using
-
-
-
-
-
-
-
-
-
-
-UUSSDD::1133--8800 NNvvii//NNeexx RReeffeerreennccee ((OOppttiioonnss))
-
-
- 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 eexx and vvii modes, unless oth-
- erwise specified.
-
- With a few exceptions, all options are settable
- per screen, i.e. the ttaaggss option can be set differently
- in each screen. The exceptions are the ccoolluummnnss, lliinneess,
- sseeccuurree and tteerrmm options. Changing these options modi-
- fies 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 "EExx CCoommmmaannddss".
-
- aallttwweerraassee [[ooffff]]
- VVii only. Change how vvii 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).
-
- aauuttooiinnddeenntt,, aaii [[ooffff]]
- If this option is set, whenever you create a new
- line (using the vvii AA, aa, CC, cc, II, ii, OO, oo, RR, rr,
- SS, and ss commands, or the eexx aappppeenndd, cchhaannggee, and
- iinnsseerrtt 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
- ttaabbssttoopp 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>,, tthhee iinnddeenntt cchhaarraacctteerr wwiillll bbee ddeelleetteedd
- aanndd tthhee lliinnee wwiillll bbee eemmppttyy.. FFoorr eexxaammppllee,, iiff yyoouu
- eenntteerr <<ccaarrrriiaaggee--rreettuurrnn>> twice in succession, the
- line created by the first <carriage-return> wwiillll
-
-
-
-
-
-
-
-
-
-
-NNvvii//NNeexx RReeffeerreennccee ((OOppttiioonnss)) UUSSDD::1133--8811
-
-
- nnoott hhaavvee aannyy cchhaarraacctteerrss iinn iitt,, rreeggaarrddlleessss ooff tthhee
- iinnddeennttaattiioonn ooff tthhee pprreevviioouuss oorr ssuubbsseeqquueenntt lliinnee..
-
- IInnddeenntt cchhaarraacctteerrss aallssoo rreeqquuiirree tthhaatt yyoouu eenntteerr
- aaddddiittiioonnaall eerraassee cchhaarraacctteerrss ttoo ddeelleettee tthheemm.. FFoorr
- eexxaammppllee,, iiff yyoouu hhaavvee aann iinnddeenntteedd lliinnee,, ccoonnttaaiinniinngg
- oonnllyy bbllaannkkss,, tthhee ffiirrsstt <<wwoorrdd--eerraassee>> 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> kkeeyy wwoouulldd eerraassee tthhee iinnddeenntt cchhaarraacctteerrss..
- BBootthh tthhee <<ccoonnttrrooll--DD>> key and the usual erase keys
- work in nnvvii.) In addition, if the cursor is posi-
- tioned at the end of the indent characters, the
- keys "0<control-D>"" wwiillll eerraassee aallll ooff tthhee iinnddeenntt
- cchhaarraacctteerrss ffoorr tthhee ccuurrrreenntt lliinnee,, rreesseettttiinngg tthhee
- iinnddeennttaattiioonn lleevveell ttoo 00.. SSiimmiillaarrllyy,, tthhee kkeeyyss
- ""^^<<ccoonnttrrooll--DD>>" 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 aauuttooiinnddeenntt option is set, the SS
- and cccc 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.
-
- aauuttoopprriinntt,, aapp [[ooffff]]
- EExx only. Cause the current line to be automati-
- cally displayed after the eexx commands <<, >>, ccooppyy,
- ddeelleettee, jjooiinn, mmoovvee, ppuutt, tt, UUnnddoo, and uunnddoo. This
- automatic display is suppressed during gglloobbaall and
- vv commands, and for any command where optional
- flags are used to explicitly display the line.
-
- aauuttoowwrriittee,, aaww [[ooffff]]
- If this option is set, the vvii !!, ^^^^, ^^]] and <<ccoonn--
- ttrrooll--ZZ>> commands, and the eexx eeddiitt, nneexxtt, rreewwiinndd,
- ssttoopp, ssuussppeenndd, ttaagg, ttaaggppoopp, and ttaaggttoopp 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 "!""
- ttoo tthhee eexx ccoommmmaannddss nneexxtt,, rreewwiinndd,, ssttoopp,, ssuussppeenndd,,
- ttaagg,, ttaaggppoopp,, aanndd ttaaggttoopp ssttooppss tthhee aauuttoommaattiicc wwrriittee
- ffrroomm bbeeiinngg aatttteemmpptteedd..
-
- ((HHiissttoorriiccaallllyy,, tthhee nneexxtt ccoommmmaanndd iiggnnoorreedd tthhee
- ooppttiioonnaall ffoorrccee ffllaagg..)) NNoottee,, tthhee eexx ccoommmmaannddss eeddiitt,,
- qquuiitt,, sshheellll,, aanndd xxiitt aarree _n_o_t aaffffeecctteedd bbyy tthhee
- aauuttoowwrriittee ooppttiioonn..
-
-
-
-
-
-
-
-
-
-
-
-UUSSDD::1133--8822 NNvvii//NNeexx RReeffeerreennccee ((OOppttiioonnss))
-
-
- TThhee aauuttoowwrriittee ooppttiioonn iiss iiggnnoorreedd iiff tthhee ffiillee iiss
- ccoonnssiiddeerreedd rreeaadd--oonnllyy ffoorr aannyy rreeaassoonn..
-
- bbaacckkuupp [[""""]]
- 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 "!"" eexxppaannddeedd..
-
- IIff tthhee ffiirrsstt cchhaarraacctteerr ooff tthhee ppaatthhnnaammee iiss ""NN", a
- version number is appended to the pathname (and
- the "N"" cchhaarraacctteerr iiss tthheenn ddiissccaarrddeedd)).. VVeerrssiioonn
- nnuummbbeerrss aarree aallwwaayyss iinnccrreemmeenntteedd,, aanndd eeaacchh bbaacckkuupp
- ffiillee wwiillll hhaavvee aa vveerrssiioonn nnuummbbeerr oonnee ggrreeaatteerr tthhaann
- tthhee hhiigghheesstt vveerrssiioonn nnuummbbeerr ccuurrrreennttllyy ffoouunndd iinn tthhee
- ddiirreeccttoorryy..
-
- BBaacckkuupp ffiilleess mmuusstt bbee rreegguullaarr ffiilleess,, oowwnneedd bbyy tthhee
- rreeaall uusseerr IIDD ooff tthhee uusseerr rruunnnniinngg tthhee eeddiittoorr,, aanndd
- nnoott aacccceessssiibbllee bbyy aannyy ootthheerr uusseerr..
-
- bbeeaauuttiiffyy,, bbff [[ooffff]]
- If this option is set, all control characters that
- are not currently being specially interpreted,
- other than <tab>,, <<nneewwlliinnee>>, and <form-feed>,, aarree
- ddiissccaarrddeedd ffrroomm ccoommmmaannddss rreeaadd iinn bbyy eexx ffrroomm ccoommmmaanndd
- ffiilleess,, aanndd ffrroomm iinnppuutt tteexxtt eenntteerreedd ttoo vvii ((eeiitthheerr
- iinnttoo tthhee ffiillee oorr ttoo tthhee ccoolloonn ccoommmmaanndd lliinnee)).. TTeexxtt
- ffiilleess rreeaadd bbyy eexx//vvii aarree _n_o_t aaffffeecctteedd bbyy tthhee bbeeaauu--
- ttiiffyy ooppttiioonn..
-
- ccddppaatthh [[eennvviirroonnmmeenntt vvaarriiaabbllee CCDDPPAATTHH,, oorr ccuurrrreenntt ddiirreecc--
- ttoorryy]]
- 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 ccdd command. The value of this
- option defaults to the value of the environmental
- variable CDPATH iiff iitt iiss sseett,, ootthheerrwwiissee ttoo tthhee
- ccuurrrreenntt ddiirreeccttoorryy.. FFoorr ccoommppaattiibbiilliittyy wwiitthh tthhee
- PPOOSSIIXX 11000033..22 sshheellll,, tthhee ccdd ccoommmmaanndd ddooeess _n_o_t cchheecckk
- tthhee ccuurrrreenntt ddiirreeccttoorryy aass aa ppaatthh pprreeffiixx ffoorr rreellaa--
- ttiivvee ppaatthh nnaammeess uunnlleessss iitt iiss eexxpplliicciittllyy ssppeecciiffiieedd..
- IItt mmaayy bbee ssoo ssppeecciiffiieedd bbyy eenntteerriinngg aann eemmppttyy ssttrriinngg
- oorr aa "".._" _c_h_a_r_a_c_t_e_r _i_n_t_o _t_h_e _C_D_P_A_T_H vvaarriiaabbllee oorr
- tthhee ooppttiioonn vvaalluuee..
-
- cceeddiitt [[nnoo ddeeffaauulltt]]
- 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
-
-
-
-
-
-
-
-
-
-
-NNvvii//NNeexx RReeffeerreennccee ((OOppttiioonnss)) UUSSDD::1133--8833
-
-
- collected commands that you've entered on the vvii
- colon command-line. You may then modify and/or
- execute the commands. All normal text editing is
- available, except that you cannot use <<ccoonnttrrooll--WW>>
- to switch to an alternate screen. Entering a
- <<ccaarrrriiaaggee--rreettuurrnn>> 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 vvii's parsing rules, it can be difficult
- to set the colon command-line edit character to
- the <escape> cchhaarraacctteerr.. TToo sseett iitt ttoo <<eessccaappee>>,
- use "set cedit=<literal-next><escape>""..
-
- IIff tthhee cceeddiitt eeddiitt ooppttiioonn iiss sseett ttoo tthhee ssaammee cchhaarr--
- aacctteerr aass tthhee ffiilleecc eeddiitt ooppttiioonn,, vvii wwiillll ppeerrffoorrmm
- ccoolloonn ccoommmmaanndd--lliinnee eeddiittiinngg iiff tthhee cchhaarraacctteerr iiss
- eenntteerreedd aass tthhee ffiirrsstt cchhaarraacctteerr ooff tthhee lliinnee,, ootthheerr--
- wwiissee,, vvii wwiillll ppeerrffoorrmm ffiillee nnaammee eexxppaannssiioonn..
-
- ccoolluummnnss,, ccoo [[8800]]
- The number of columns in the screen. Setting this
- option causes eexx/vvii to set (or reset) the environ-
- mental variable COLUMNS.. SSeeee tthhee sseeccttiioonn eennttiittlleedd
- ""SSiizziinngg tthhee SSccrreeeenn"" mmoorree iinnffoorrmmaattiioonn..
-
- ccoommmmeenntt [[ooffff]]
- VVii only. If the first non-empty line of the file
- begins with the string "/*"",, tthhiiss ooppttiioonn ccaauusseess vvii
- ttoo sskkiipp ttoo tthhee eenndd ooff tthhaatt CC--llaanngguuaaggee ccoommmmeenntt
- ((pprroobbaabbllyy aa tteerrrriibbllyy bboorriinngg lleeggaall nnoottiiccee)) bbeeffoorree
- ddiissppllaayyiinngg tthhee ffiillee..
-
- ddiirreeccttoorryy,, ddiirr [[eennvviirroonnmmeenntt vvaarriiaabbllee TTMMPPDDIIRR,, oorr //ttmmpp]]
- The directory where temporary files are created.
- The environmental variable TMPDIR iiss uusseedd aass tthhee
- ddeeffaauulltt vvaalluuee iiff iitt eexxiissttss,, ootthheerrwwiissee //ttmmpp is
- used.
-
- eeddccoommppaattiibbllee,, eedd [[ooffff]]
- Remember the values of the "c" and "g" suffixes to
- the ssuubbssttiittuuttee commands, instead of initializing
- them as unset for each new command. Specifying
- pattern and replacement strings to the ssuubbssttiittuuttee
- command unsets the "c" and "g" suffixes as well.
-
- eessccaappeettiimmee [[11]]
- The 10th's of a second eexx/vvii waits for a subse-
- quent key to complete an <escape> kkeeyy mmaappppiinngg..
-
-
-
-
-
-
-
-
-
-
-
-
-UUSSDD::1133--8844 NNvvii//NNeexx RReeffeerreennccee ((OOppttiioonnss))
-
-
- eerrrroorrbbeellllss,, eebb [[ooffff]]
- EExx only. EExx 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.
-
- eexxrrcc,, eexx [[ooffff]]
- 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 "SSttaarrttuupp IInnffoorr--
- mmaattiioonn" for more information.
-
- eexxtteennddeedd [[ooffff]]
- 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).
-
- ffiilleecc [[nnoo ddeeffaauulltt]]
- 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 * cchhaarraacctteerr,, aanndd ffiillee nnaammee
- eexxppaannssiioonn ffoorr tthhee eexx eeddiitt ccoommmmaanndd wwaass ddoonnee.. IIff nnoo
- mmaattcchh iiss ffoouunndd,, tthhee ssccrreeeenn iiss ffllaasshheedd aanndd tteexxtt
- iinnppuutt rreessuummeedd.. IIff aa ssiinnggllee mmaattcchh rreessuullttss,, tthhaatt
- mmaattcchh rreeppllaacceess tthhee eexxppaannddeedd tteexxtt.. IInn aaddddiittiioonn,, iiff
- tthhee ssiinnggllee mmaattcchh iiss ffoorr aa ddiirreeccttoorryy,, aa // cchhaarraacctteerr
- iiss aappppeennddeedd aanndd ffiillee ccoommpplleettiioonn iiss rreeppeeaatteedd.. IIff
- mmoorree tthhaann aa ssiinnggllee mmaattcchh rreessuullttss,, aannyy uunniiqquuee pprree--
- ffiixx sshhaarreedd bbyy tthhee mmaattcchheess rreeppllaacceess tthhee eexxppaannddeedd
- tteexxtt,, tthhee mmaattcchheess aarree ddiissppllaayyeedd,, aanndd tteexxtt iinnppuutt
- rreessuummeedd..
-
- BBeeccaauussee ooff vvii''ss ppaarrssiinngg rruulleess,, iitt ccaann bbee ddiiffffiiccuulltt
- ttoo sseett tthhee ppaatthh ccoommpplleettiioonn cchhaarraacctteerr ttoo ttwwoo ccoomm--
- mmaanndd vvaalluueess,, <<eessccaappee>> aanndd <<ttaabb>>.. TToo sseett iitt ttoo
- <<eessccaappee>>,, uussee ""sseett ffiilleecc==<<lliitteerraall--nneexxtt>><<eessccaappee>>""..
- TToo sseett iitt ttoo <<ttaabb>>,, uussee ""sseett ffiilleecc==\\<<ttaabb>>""..
-
- IIff tthhee cceeddiitt eeddiitt ooppttiioonn iiss sseett ttoo tthhee ssaammee cchhaarr--
- aacctteerr aass tthhee ffiilleecc eeddiitt ooppttiioonn,, vvii wwiillll ppeerrffoorrmm
- ccoolloonn ccoommmmaanndd--lliinnee eeddiittiinngg iiff tthhee cchhaarraacctteerr iiss
- eenntteerreedd aass tthhee ffiirrsstt cchhaarraacctteerr ooff tthhee lliinnee,, ootthheerr--
- wwiissee,, vvii wwiillll ppeerrffoorrmm ffiillee nnaammee eexxppaannssiioonn..
-
-
-
-
-
-
-
-
-
-
-
-NNvvii//NNeexx RReeffeerreennccee ((OOppttiioonnss)) UUSSDD::1133--8855
-
-
- ffllaasshh [[oonn]]
- This option causes the screen to flash instead of
- beeping the keyboard, on error, if the terminal
- has the capability.
-
- hhaarrddttaabbss,, hhtt [[88]]
- 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
- nneexx/nnvvii never writes <tab> cchhaarraacctteerrss ttoo tthhee tteerr--
- mmiinnaall,, uunnlliikkee hhiissttoorriicc vveerrssiioonnss ooff eexx//vvii,, tthhiiss
- ooppttiioonn ddooeess nnoott ccuurrrreennttllyy hhaavvee aannyy aaffffeecctt..
-
- iicclloowweerr [[ooffff]]
- The iicclloowweerr edit option makes all Regular Expres-
- sions case-insensitive, as long as an upper-case
- letter does not appear in the search string.
-
- iiggnnoorreeccaassee,, iicc [[ooffff]]
- This option causes regular expressions, both in eexx
- commands and in searches, to be evaluated in a
- case-insensitive manner.
-
- kkeeyyttiimmee [[66]]
- The 10th's of a second eexx/vvii waits for a subse-
- quent key to complete a key mapping.
-
- lleeffttrriigghhtt [[ooffff]]
- VVii only. This option causes the screen to be
- scrolled left-right to view lines longer than the
- screen, instead of the traditional vvii screen
- interface which folds long lines at the right-hand
- margin of the terminal.
-
- lliinneess,, llii [[2244]]
- VVii only. The number of lines in the screen. Set-
- ting this option causes eexx/vvii to set (or reset)
- the environmental variable LINES.. SSeeee tthhee sseeccttiioonn
- eennttiittlleedd ""SSiizziinngg tthhee SSccrreeeenn"" ffoorr mmoorree iinnffoorrmmaattiioonn..
-
- lliisspp [[ooffff]]
- VVii only. This option changes the behavior of the
- vvii ((, )), {{, }}, [[[[ and ]]]] commands to match the
- Lisp language. Also, the aauuttooiinnddeenntt 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_.
-
- lliisstt [[ooffff]]
- This option causes lines to be displayed in an
- unambiguous fashion. Specifically, tabs are dis-
- played as control characters, i.e. "^I"",, aanndd tthhee
- eennddss ooff lliinneess aarree mmaarrkkeedd wwiitthh aa ""$$" character.
-
-
-
-
-
-
-
-
-
-
-UUSSDD::1133--8866 NNvvii//NNeexx RReeffeerreennccee ((OOppttiioonnss))
-
-
- lloocckk [[oonn]]
- 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
- rreeaaddoonnllyy edit option were set.
-
- mmaaggiicc [[oonn]]
- This option is on by default. Turning the mmaaggiicc
- option off causes all regular expression charac-
- ters except for "^"" aanndd ""$$", to be treated as
- ordinary characters. To re-enable characters
- individually, when the mmaaggiicc option is off, pre-
- cede them with a backslash "\"" cchhaarraacctteerr.. SSeeee tthhee
- sseeccttiioonn eennttiittlleedd ""RReegguullaarr EExxpprreessssiioonnss aanndd RReeppllaaccee--
- mmeenntt SSttrriinnggss"" ffoorr mmoorree iinnffoorrmmaattiioonn..
-
- mmaattcchhttiimmee [[77]]
- VVii only. The 10th's of a second vvii pauses on the
- matching character when the sshhoowwmmaattcchh option is
- set.
-
- mmeessgg [[oonn]]
- 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. EExx/vvii 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.
-
- mmssggccaatt [[..//]]
- 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"",, wwhheerree ""XXXXXXXX" is the value of the LANG
- eennvviirroonnmmeennttaall vvaarriiaabbllee,, iiff iitt''ss sseett,, oorr tthhee vvaalluuee
- ooff tthhee LLCC__MMEESSSSAAGGEESS 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 ffoorr aaddddii--
- ttiioonnaall iinnffoorrmmaattiioonn oonn bbuuiillddiinngg aanndd iinnssttaalllliinngg
-
-
-
-
-
-
-
-
-
-
-NNvvii//NNeexx RReeffeerreennccee ((OOppttiioonnss)) UUSSDD::1133--8877
-
-
- mmeessssaaggee ccaattaallooggss..
-
- mmooddeelliinneess,, mmooddeelliinnee [[ooffff]]
- If the mmooddeelliinneess option is set, eexx/vvii has histori-
- cally scanned the first and last five lines of
- each file as it is read for editing, looking for
- any eexx commands that have been placed in those
- lines. After the startup information has been
- processed, and before the user starts editing the
- file, any commands embedded in the file are exe-
- cuted.
-
- Commands were recognized by the letters "e" or "v"
- followed by "x" or "i", at the beginning of a line
- or following a tab or space character, and fol-
- lowed by a ":", an eexx 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_.
-
- nnoopprriinntt [[""""]]
- 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.
-
- nnuummbbeerr,, nnuu [[ooffff]]
- Precede each line displayed with its current line
- number.
-
- ooccttaall [[ooffff]]
- Display unknown characters as octal numbers
- ("\###"")),, iinnsstteeaadd ooff tthhee ddeeffaauulltt hheexxaaddeecciimmaall
- ((""\\xx####").
-
- ooppeenn [[oonn]]
- EExx only. If this option is not set, the ooppeenn and
- vviissuuaall commands are disallowed.
-
- ooppttiimmiizzee,, oopptt [[oonn]]
- VVii 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_.
-
-
-
-
-
-
-
-
-
-
-
-UUSSDD::1133--8888 NNvvii//NNeexx RReeffeerreennccee ((OOppttiioonnss))
-
-
- ppaarraaggrraapphhss,, ppaarraa [[IIPPLLPPPPPPQQPPPP LLIIppppllppiippbbpp]]
- VVii 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>,, ((wwhheerree <<cchhaarr--ppaaiirr>> 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>##,, tthheenn aallll ooff tthhee
- ffoolllloowwiinngg aaddddiittiioonnaall ppaarraaggrraapphh bboouunnddaarriieess wwoouulldd bbee
- rreeccooggnniizzeedd::
-
-
- <<nneewwlliinnee>>..LLaa
- <<nneewwlliinnee>>..AA<<ssppaaccee>>
- <<nneewwlliinnee>>..####
-
-
- pprriinntt [[""""]]
- 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.
-
- pprroommpptt [[oonn]]
- EExx only. This option causes eexx to prompt for com-
- mand input with a ":"" cchhaarraacctteerr;; wwhheenn iitt iiss nnoott
- sseett,, nnoo pprroommpptt iiss ddiissppllaayyeedd..
-
- rreeaaddoonnllyy,, rroo [[ooffff]]
- This option causes a force flag to be required to
- attempt to write the file. Setting this option is
- equivalent to using the --RR command line option, or
- executing the vvii program using the name vviieeww.
-
- The rreeaaddoonnllyy edit option is not usually persis-
- tent, like other edit options. If the --RR command
- line option is set, vvii is executed as vviieeww, or the
- rreeaaddoonnllyy 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 rreeaaddoonnllyy edit option is explicitly unset, then
- the rreeaaddoonnllyy 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 rreeaaddoonnllyy 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.
-
-
-
-
-
-
-
-
-
-
-NNvvii//NNeexx RReeffeerreennccee ((OOppttiioonnss)) UUSSDD::1133--8899
-
-
- rreeccddiirr [[//vvaarr//ttmmpp//vvii..rreeccoovveerr]]
- The directory where recovery files are stored.
-
- If you change the value of rreeccddiirr, be careful to
- choose a directory whose contents are not regu-
- larly deleted. Bad choices include directories in
- memory based filesystems, or /tmp,, oonn mmoosstt ssyyss--
- tteemmss,, aass tthheeiirr ccoonntteennttss aarree rreemmoovveedd wwhheenn tthhee
- mmaacchhiinnee iiss rreebbooootteedd..
-
- PPuubblliicc ddiirreeccttoorriieess lliikkee //uussrr//ttmmpp and /var/tmp aarree
- uussuuaallllyy ssaaffee,, aalltthhoouugghh ssoommee ssiitteess ppeerriiooddiiccaallllyy
- pprruunnee oolldd ffiilleess ffrroomm tthheemm.. TThheerree iiss nnoo rreeqquuiirree--
- mmeenntt tthhaatt yyoouu uussee aa ppuubblliicc ddiirreeccttoorryy,, ee..gg.. aa ssuubb--
- ddiirreeccttoorryy ooff yyoouurr hhoommee ddiirreeccttoorryy wwiillll wwoorrkk ffiinnee..
-
- FFiinnaallllyy,, iiff yyoouu cchhaannggee tthhee vvaalluuee ooff rreeccddiirr,, yyoouu
- mmuusstt mmooddiiffyy tthhee rreeccoovveerryy ssccrriipptt ttoo ooppeerraattee iinn yyoouurr
- cchhoosseenn rreeccoovveerryy aarreeaa..
-
- SSeeee tthhee sseeccttiioonn eennttiittlleedd ""RReeccoovveerryy"" ffoorr ffuurrtthheerr
- iinnffoorrmmaattiioonn..
-
- rreeddrraaww,, rree [[ooffff]]
- VVii only. The editor simulates (using great
- amounts of output), an intelligent terminal on a
- dumb terminal (e.g. during insertions in vvii 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_.
-
- rreemmaapp [[oonn]]
- 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"" iiss mmaappppeedd ttoo ""BB", and "B"" iiss mmaappppeedd ttoo ""CC",
- The keystroke "A"" wwiillll bbee mmaappppeedd ttoo ""CC" if the
- rreemmaapp option is set, and to "B"" iiff iitt iiss nnoott sseett..
-
- rreeppoorrtt [[55]]
- 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.
-
- rruulleerr [[ooffff]]
- VVii only. Display a row/column ruler on the colon
-
-
-
-
-
-
-
-
-
-
-UUSSDD::1133--9900 NNvvii//NNeexx RReeffeerreennccee ((OOppttiioonnss))
-
-
- command line.
-
- ssccrroollll,, ssccrr [[((eennvviirroonnmmeenntt vvaarriiaabbllee LLIINNEESS -- 11)) // 22]]
- Set the number of lines scrolled by the eexx <<ccoonn--
- ttrrooll--DD>> and <<eenndd--ooff--ffiillee>> commands.
-
- Historically, the eexx zz 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.
-
- sseeaarrcchhiinnccrr [[ooffff]]
- The sseeaarrcchhiinnccrr 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.
-
- sseeccttiioonnss,, sseecctt [[NNHHSSHHHH HHUUnnhhsshh]]
- VVii only. Define additional section boundaries for
- the [[[[ and ]]]] commands. The sseeccttiioonnss 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>,, ((wwhheerree <<cchhaarr--ppaaiirr>> is one of the character
- pairs in the option's value), defines a section
- boundary in the same manner that ppaarraaggrraapphh option
- boundaries are defined.
-
- sseeccuurree [[ooffff]]
- The sseeccuurree edit option turns off all access to
- external programs. This means that the versions
- of the rreeaadd and wwrriittee commands that filter text
- through other programs, the vvii !! and <<ccoonnttrrooll--ZZ>>
- commands, the eexx !!, ssccrriipptt, sshheellll, ssttoopp and ssuuss--
- ppeenndd commands and file name expansion will not be
- permitted. Once set, the sseeccuurree edit option may
- not be unset.
-
- sshheellll,, sshh [[eennvviirroonnmmeenntt vvaarriiaabbllee SSHHEELLLL,, oorr //bbiinn//sshh]]
- Select the shell used by the editor. The speci-
- fied path is the pathname of the shell invoked by
- the vvii !! shell escape command and by the eexx sshheellll
- command. This program is also used to resolve any
- shell meta-characters in eexx commands.
-
- sshheellllmmeettaa [[~~{{[[**??$$``''""\\]]
- The set of characters that eexx checks for when
- doing file name expansion. If any of the speci-
- fied characters are found in the file name
-
-
-
-
-
-
-
-
-
-
-NNvvii//NNeexx RReeffeerreennccee ((OOppttiioonnss)) UUSSDD::1133--9911
-
-
- arguments to the eexx commands, the arguments are
- expanded using the program defined by the sshheellll
- option. The default set of characters is a union
- of meta characters from the Version 7 and the
- Berkeley C shell.
-
- sshhiiffttwwiiddtthh,, ssww [[88]]
- Set the autoindent and shift command indentation
- width. This width is used by the aauuttooiinnddeenntt
- option and by the <<, >>, and sshhiifftt commands.
-
- sshhoowwmmaattcchh,, ssmm [[ooffff]]
- VVii only. This option causes vvii, when a "}"" oorr ""))"
- is entered, to briefly move the cursor the match-
- ing "{"" oorr ""((". See the mmaattcchhttiimmee option for more
- information.
-
- sshhoowwmmooddee [[ooffff]]
- VVii only. This option causes vvii 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,
-
- ssiiddeessccrroollll [[1166]]
- VVii only. Sets the number of columns that are
- shifted to the left or right, when vvii is doing
- left-right scrolling and the left or right margin
- is crossed. See the lleeffttrriigghhtt option for more
- information.
-
- sslloowwooppeenn,, ssllooww [[ooffff]]
- This option affects the display algorithm used by
- vvii, 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_.
-
- ssoouurrcceeaannyy [[ooffff]]
- If this option is turned on, vvii historically read
- startup files that were owned by someone other
- than the editor user. See the section entitled
- "SSttaarrttuupp IInnffoorrmmaattiioonn" 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_.
-
- ttaabbssttoopp,, ttss [[88]]
- This option sets tab widths for the editor dis-
- play.
-
-
-
-
-
-
-
-
-
-
-UUSSDD::1133--9922 NNvvii//NNeexx RReeffeerreennccee ((OOppttiioonnss))
-
-
- ttaagglleennggtthh,, ttll [[00]]
- 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.
-
- ttaaggss,, ttaagg [[ttaaggss //vvaarr//ddbb//lliibbcc..ttaaggss //ssyyss//kkeerrnn//ttaaggss]]
- Sets the list of tags files, in search order,
- which are used when the editor searches for a tag.
-
- tteerrmm,, ttttyyttyyppee,, ttttyy [[eennvviirroonnmmeenntt vvaarriiaabbllee TTEERRMM]]
- Set the terminal type. Setting this option causes
- eexx/vvii to set (or reset) the environmental variable
- TERM..
-
- tteerrssee [[ooffff]]
- This option has historically made editor messages
- less verbose. It has no effect in this implemen-
- tation. See the vveerrbboossee option for more informa-
- tion.
-
- ttiillddeeoopp
- Modify the ~~ command to take an associated motion.
-
- ttiimmeeoouutt,, ttoo [[oonn]]
- If this option is set, eexx/vvii waits for a specific
- period for a subsequent key to complete a key map-
- ping (see the kkeeyyttiimmee 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.
-
- ttttyywweerraassee [[ooffff]]
- VVii only. This option changes how vvii 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.
-
- vveerrbboossee [[ooffff]]
- VVii only. VVii 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.
-
- ww330000 [[nnoo ddeeffaauulltt]]
- VVii only. Set the window size if the baud rate is
- less than 1200 baud. See the wwiinnddooww option for
- more information.
-
- ww11220000 [[nnoo ddeeffaauulltt]]
- VVii only. Set the window size if the baud rate is
-
-
-
-
-
-
-
-
-
-
-NNvvii//NNeexx RReeffeerreennccee ((OOppttiioonnss)) UUSSDD::1133--9933
-
-
- equal to 1200 baud. See the wwiinnddooww option for
- more information.
-
- ww99660000 [[nnoo ddeeffaauulltt]]
- VVii only. Set the window size if the baud rate is
- greater than 1200 baud. See the wwiinnddooww option for
- more information.
-
- wwaarrnn [[oonn]]
- EExx only. This option causes a warning message to
- the terminal if the file has been modified, since
- it was last written, before a !! command.
-
- wwiinnddooww,, ww,, wwii [[eennvviirroonnmmeenntt vvaarriiaabbllee LLIINNEESS -- 11]]
- This option determines the default number of lines
- in a screenful, as displayed by the zz command. It
- also determines the number of lines scrolled by
- the vvii commands <<ccoonnttrrooll--BB>> and <<ccoonnttrrooll--FF>>, and
- the default number of lines scrolled by the vvii
- commands <<ccoonnttrrooll--DD>> and <<ccoonnttrrooll--UU>>. 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
- "SSiizziinngg tthhee SSccrreeeenn" for more information. Setting
- the value of the wwiinnddooww option is the same as
- using the --ww command line option.
-
- If the value of the wwiinnddooww option (as set by the
- wwiinnddooww, ww330000, ww11220000 or ww99660000 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 <<ccoonnttrrooll--
- DD>> and <<ccoonnttrrooll--UU>> commands.
-
- wwrraapplleenn,, wwll [[00]]
- This option is identical to the wwrraappmmaarrggiinn 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 wwrraapplleenn and wwrraappmmaarrggiinn are set, the wwrraapp--
- mmaarrggiinn value is used.
-
- wwrraappmmaarrggiinn,, wwmm [[00]]
- VVii only. If the value of the wwrraappmmaarrggiinn option is
- non-zero, vvii will split lines so that they end at
-
-
-
-
-
-
-
-
-
-
-UUSSDD::1133--9944 NNvvii//NNeexx RReeffeerreennccee ((OOppttiioonnss))
-
-
- least that number of columns before the right-hand
- margin of the screen. (Note, the value of wwrraapp--
- mmaarrggiinn 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 wwrraapplleenn and wwrraappmmaarrggiinn are set, the wwrraapp--
- mmaarrggiinn value is used.
-
- wwrraappssccaann,, wwss [[oonn]]
- 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.
-
- wwrriitteeaannyy,, wwaa [[ooffff]]
- If this option is set, file-overwriting checks
- that would usually be made before the wwrriittee and
- xxiitt commands, or before an automatic write (see
- the aauuttoowwrriittee option), are not made. This allows
- a write to any file, provided the file permissions
- allow it.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-NNvvii//NNeexx RReeffeerreennccee UUSSDD::1133--9955
-
-
- 1199.. IInnddeexx
-
- ! 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 45
- ( 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 58
- < 27, 43 P 30 escapetime 58
- <carriage-return> 14 Q 30 exrc 58
- <control-A> 18 R 30 extended 59
- <control-B> 18 S 31 exusage 46
- <cont1r8o,l-3D9>, 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-1H9>, 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 47
- <control-P> 20 ^ 32 i 34
- <control-R> 19 ^<control-D>39 iclower 59
- <control-2T0>, 39 _ 33 ignorecase 59
- <control-U> 20 `<character>24 insert 47
- <control-2W0>, 39 a 33 j 19
- <control-X> 39 abbrev 44 join 48
- <control-Y> 20 alternate pathname 13 k 20, 49
- <control-2Z1>, 52 altwerase 56 keytime 59
- <control-]> 21 append 45 l 21
- <control-^> 21 args 45 leftright 59
- <end-of-file> 41, 42 autoindent 56 line 41
- <erase> 39 autoprint 57 lines 60
- <escape>21, 39 autowrite 57 lisp 60
- <inte1r3r,up3t8>, 40 b 33 list 48, 60
- <line erase>39 backup 57 lock 60
- <literal-next> 13, 39 beautify 57 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 57 mkexrc 49
-
-
-
-
-
-
-
-
-
-
-UUSSDD::1133--9966 NNvvii//NNeexx RReeffeerreennccee
-
-
- modelines 60 suspend 52
- motion 16 t 35, 45
- move 49 tabstop 64
- msgcat 60 tag 52
- n 25 taglength 64
- next 49 tagnext 53
- noprint 61 tagpop 53
- number 43, 61 tagprev 53
- o 34 tags 64
- octal 61 tagtop 53
- open 49, 61 term 64
- optimize 61 terse 64
- p 35 tildeop 64
- paragraph 17 timeout 64
- paragraphs 61 ttywerase 64
- preserve 49 u 35
- previous 50 unabbrev 54
- previous context 16 undo 54
- print 50, 61 unmap 54
- prompt 62 unnamed buffer 14
- put 50 v 47
- quit 50 verbose 65
- r 35 version 54
- range 41 visual 54
- read 50 viusage 54
- readonly 62 w 36
- recdir 62 w1200 65
- recover 51 w300 65
- redraw 62 w9600 65
- remap 62 warn 65
- report 62 whitespace 14
- resize 51 window 65
- rewind 51 wn 55
- ruler 63 word 17
- s 35 wq 55
- scroll 63 wraplen 65
- searchincr 63 wrapmargin 65
- section 17 wrapscan 66
- sections 63 write 54
- secure 63 writeany 66
- sentence 17 x 36
- set 51 xit 55
- shell 51, 63 y 36
- shellmeta 63 yank 55
- shiftwidth 63 z 36, 55
- showmatch 63 { 37
- showmode 63 | 37
- sidescroll 64 } 37
- slowopen 64 ~ 37, 38, 52
- source 52
- sourceany 64
- stop 52
- substitute 52
-
-
-
-
-
-
-
-
-
-
-UUSSDD::1133--22 NNvvii//NNeexx RReeffeerreennccee
-
-
- TTaabbllee ooff CCoonntteennttss
-
- 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 ...................................... 79
- Index ............................................ 95
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/usr.bin/vi/docs/USD.doc/vitut/Makefile b/usr.bin/vi/docs/USD.doc/vitut/Makefile
index bfb29bff32e..c6131af7797 100644
--- a/usr.bin/vi/docs/USD.doc/vitut/Makefile
+++ b/usr.bin/vi/docs/USD.doc/vitut/Makefile
@@ -2,7 +2,7 @@
DIR= usd/12.vi
SRCS= vi.in vi.chars
-MACROS= -msU
+MACROS= -ms
CLEANFILES+=summary.* viapwh.*
paper.ps: ${SRCS} summary.ps viapwh.ps
diff --git a/usr.bin/vi/docs/USD.doc/vitut/vi.chars b/usr.bin/vi/docs/USD.doc/vitut/vi.chars
index 147c4ff7f2d..7941065d1d0 100644
--- a/usr.bin/vi/docs/USD.doc/vitut/vi.chars
+++ b/usr.bin/vi/docs/USD.doc/vitut/vi.chars
@@ -29,10 +29,10 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.\" @(#)vi.chars 8.1 (Berkeley) 6/8/93
+.\" @(#)vi.chars 8.3 (Berkeley) 6/27/96
.\"
.bd S 3
-..pn 21
+.pn 21
.de iP
.IP "\fB\\$1\fR" \\$2
..
@@ -111,6 +111,7 @@ The \s-2ASCII\s0 formfeed character, this causes the screen to be cleared
and redrawn. This is useful after a transmission error, if characters
typed by a program other than the editor scramble the screen,
or after output is stopped by an interrupt (5.4, 7.2f).
+.ne 1i
.iP "^M\ (\fR\s-2CR\s0\fP)" 15
A carriage return advances to the next line, at the first non-white position
in the line. Given a count, it advances that many lines (2.3).
diff --git a/usr.bin/vi/docs/USD.doc/vitut/vi.in b/usr.bin/vi/docs/USD.doc/vitut/vi.in
index 3bdfeb95b65..9815e6d3c8a 100644
--- a/usr.bin/vi/docs/USD.doc/vitut/vi.in
+++ b/usr.bin/vi/docs/USD.doc/vitut/vi.in
@@ -29,10 +29,10 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.\" @(#)vi.in 8.1 (Berkeley) 6/8/93
+.\" @(#)vi.in 8.4 (Berkeley) 6/27/96
.\"
-.EH 'USD:12-%''An Introduction to Display Editing with Vi'
-.OH 'An Introduction to Display Editing with Vi''USD:12-%'
+.EH 'USD:11-%''An Introduction to Display Editing with Vi'
+.OH 'An Introduction to Display Editing with Vi''USD:11-%'
.bd S 3
.if t .ds dg \(dg
.if n .ds dg +
@@ -586,6 +586,7 @@ This will set the
.I readonly
option which will prevent you from
accidently overwriting the file.
+.sp
.NH 1
Making simple changes
.NH 2
@@ -664,6 +665,7 @@ you can't backspace around the end of a line. If you need to back up
to the previous line to make a correction, just hit \s-2ESC\s0 and move
the cursor back to the previous line. After making the correction you
can return to where you were and use the insert or append command again.
+.sp .5
.NH 2
Making small corrections
.PP
@@ -720,6 +722,7 @@ Find a word which you can change to another, and try this
now.
Notice that the end of the text to be changed was marked with the character
`$' so that you can see this as you are typing in the new material.
+.sp .5
.NH 2
Operating on lines
.PP
@@ -1000,6 +1003,7 @@ F\fIx\fR f backward in line
P put text back, before cursor or above current line
T\fIx\fR t backward in line
.TE
+.ne 1i
.NH 1
High level commands
.NH 2
@@ -1167,6 +1171,18 @@ Options, set, and editor startup files
.PP
The editor has a set of options, some of which have been mentioned above.
The most useful options are given in the following table.
+.PP
+The options are of three kinds: numeric options, string options, and
+toggle options. You can set numeric and string options by a statement
+of the form
+.DS
+\fBset\fR \fIopt\fR\fB=\fR\fIval\fR
+.DE
+and toggle options can be set or unset by statements of one of the forms
+.DS
+\fBset\fR \fIopt\fR
+\fBset\fR \fBno\fR\fIopt\fR
+.DE
.KF
.TS
lb lb lb lb
@@ -1189,18 +1205,6 @@ slowopen slow Postpone display updates during inserts
term dumb The kind of terminal you are using.
.TE
.KE
-.PP
-The options are of three kinds: numeric options, string options, and
-toggle options. You can set numeric and string options by a statement
-of the form
-.DS
-\fBset\fR \fIopt\fR\fB=\fR\fIval\fR
-.DE
-and toggle options can be set or unset by statements of one of the forms
-.DS
-\fBset\fR \fIopt\fR
-\fBset\fR \fBno\fR\fIopt\fR
-.DE
These statements can be placed in your EXINIT in your environment,
or given while you are running
.I vi
@@ -1487,7 +1491,7 @@ command from
.I EXINIT )
with a command of the form:
.DS
-:map \fIlhs\fR \fIrhs\fR\s-2CR\f0
+:map \fIlhs\fR \fIrhs\fR\s-2CR
.DE
mapping
.I lhs
@@ -1758,6 +1762,7 @@ If you make changes to the editor's copy of a file, but do not wish to
write them back, then you must give an \fB!\fR after the command you
would otherwise use; this forces the editor to discard any changes
you have made. Use this carefully.
+.ne 1i
.PP
The \fB:e\fR command can be given a \fB+\fR argument to start at the
end of the file, or a \fB+\fR\fIn\fR argument to start at line \fIn\fR\^.
@@ -1810,7 +1815,7 @@ of the string. If you are using an operator such as \fBd\fR,
\fBc\fR or \fBy\fR, then you may well wish to affect lines up to the
line before the line containing the pattern. You can give a search of
the form \fB/\fR\fIpat\fR\fB/\-\fR\fIn\fR to refer to the \fIn\fR'th line
-before the next line containing \fIpat\fR, or you can use \fB\+\fR instead
+before the next line containing \fIpat\fR, or you can use \fB+\fR instead
of \fB\-\fR to refer to the lines after the one containing \fIpat\fR.
If you don't give a line offset, then the editor will affect characters
up to the match place, rather than whole lines; thus use ``+0'' to affect
@@ -1819,6 +1824,7 @@ to the line which matches.
You can have the editor ignore the case of words in the searches it does
by giving the command \fB:se ic\fR\s-2CR\s0.
The command \fB:se noic\fR\s-2CR\s0 turns this off.
+.ne 1i
.PP
Strings given to searches may actually be regular expressions.
If you do not want or need this facility, you should
@@ -1836,7 +1842,7 @@ It is also necessary to use a \e before a
The following table gives the extended forms when \fBmagic\fR is set.
.DS
.TS
-bl l.
+lb l.
\(ua at beginning of pattern, matches beginning of line
$ at end of pattern, matches end of line
\fB\&.\fR matches any character
@@ -1856,6 +1862,7 @@ More about input mode
.PP
There are a number of characters which you can use to make corrections
during input mode. These are summarized in the following table.
+.sp .5
.DS
.TS
lb l.
@@ -1873,6 +1880,7 @@ kill your kill character, deletes the input on this line
^V quotes the next non-printing character into the file
.TE
.DE
+.sp .5
.PP
The most usual way of making corrections to input is by typing \fB^H\fR
to correct a single character, or by typing one or more \fB^W\fR's to
diff --git a/usr.bin/vi/docs/USD.doc/vitut/vi.summary b/usr.bin/vi/docs/USD.doc/vitut/vi.summary
index a7d99384dc8..2e3a5c2b3b0 100644
--- a/usr.bin/vi/docs/USD.doc/vitut/vi.summary
+++ b/usr.bin/vi/docs/USD.doc/vitut/vi.summary
@@ -29,7 +29,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.\" @(#)vi.summary 8.1 (Berkeley) 6/8/93
+.\" @(#)vi.summary 8.2 (Berkeley) 6/27/96
.\"
.ds CH
.ds CF
@@ -434,7 +434,7 @@ c change
< left shift
> right shift
! filter through command
-\&\= indent for \s-2LISP\s0
+\&= indent for \s-2LISP\s0
y yank lines to buffer
.TE
.h "Miscellaneous operations"
diff --git a/usr.bin/vi/docs/changelog b/usr.bin/vi/docs/changelog
index 1c84e7ad2cd..aaa0c320af8 100644
--- a/usr.bin/vi/docs/changelog
+++ b/usr.bin/vi/docs/changelog
@@ -1,3 +1,91 @@
+1.70 -> 1.71 (07/01/96)
+ + Don't include <term.h> -- neither HPUX or Solaris can cope with it.
+ + Fix bug where ^M's in the original pattern were converted into new
+ lines in the file during substitution commands.
+ + Make window resize events separate from interrupts -- too many users
+ complained.
+ + Fix bug in first-character-is-null text input semantic.
+ + Rework search routines to take a length instead of a nul-terminated
+ string for a pattern. This fixes a couple of bugs in searching, but
+ probably introduces new ones.
+ + Fix prompting the user after a write filter command, the way I did
+ it in 1.70 broke the display.
+ + Don't switch to the alternate xterm screen when entering the ex
+ text input commands from vi mode.
+ + Implement the Fg command, so can foreground a background screen into
+ a split screen.
+ + Change the fg command to match screen names using the last component
+ of the filename the full filename fails.
+1.69 -> 1.70 (06/28/96)
+ + Change the ex read command to support named pipes.
+ + Copy the EXINIT/NEXINIT strings before executing their commands so
+ we don't step on the process environment.
+ + Don't do "line modification" reports for intermediate commands
+ executed from the vi colon command line, it screws up filter
+ reads, causing nvi to prompt for the user to continue.
+ + Add "smd" as an abbreviation for showmode: HP, ICL and SCO have it.
+ + Change nvi to always prompt the user after a write filter command.
+ This matches historic practice.
+ + Fix recovery information mailed to the user to reflect the program's
+ installed name.
+ + Change configuration script to not cache option information, e.g.,
+ --disable-curses.
+ + Fix a bug where the second character of the vi [[, ]] and ZZ
+ commands could start a command mapped sequence.
+ + Fix 3 write bugs: partial writes (3,$write), were clearing the
+ modified flag, full writes using line numbers (1,$write) were
+ not, and append historically never cleared the modified flag, and
+ we didn't get that right.
+ + Shorten the "more files to edit" message so it can gang on a single
+ line, lots of people have complained. Add the number of files that
+ are left to edit, it's historic practice.
+ + Fix core dump where message catalogs collided with truncating the
+ write path. Add a new write message so the string "appended" is
+ taken from a message catalog.
+ + Fix bug where an undo followed by '.' to repeat it wouldn't work
+ if no other repeatable commands had been entered.
+ + Fix core dump when resolution of input lines' autoindent characters
+ invalidated cached display information.
+ + Set the name of the X11 xterm icon/window to "xterm" when exiting,
+ if modified based on the windowname option.
+ + Include <term.h> if it exists, fixes portability problems on IRIX
+ systems.
+1.68 -> 1.69 (06/17/96)
+ + Add the windowname edit option and code to change the icon/window
+ name for xterm's.
+ + Enhance the comment edit option to skip shell comments.
+ + Add conditional prototypes to replacement C library functions.
+ + Minor enhancements/reworking to Makefile.in, other build files.
+ + Fix bug in vi text input ^D processing, could result in cursor
+ warp to the beginning of the line.
+ + Fix leftright screen bug where the screen wasn't repainted when
+ being repainted from scratch.
+ + Update the Swedish and Dutch catalogs.
+ + Truncate paths in write commands if they don't fit on one line.
+ + Fix alternate screen bug where the screen flashed and output lost
+ when switching to/from the X11 xterm alternate screen. Fix bug
+ where nvi switched into the alternate screen during filter-read
+ commands, which doesn't match historic practice.
+ + Minor relative cursor positioning change, make cursor position
+ changes from ex real and permanent.
+1.67 -> 1.68 (06/09/96)
+ + Fix core dump when tagging out of a modified file.
+1.66 -> 1.67 (06/09/96)
+ + Convert the license to adware.
+ + Leftright scrolling tweak, don't repaint the screen as often.
+ + Change so that search warning/error messages don't appear during an
+ incremental search.
+ + Cscope fix: test for files newer than the database was reversed.
+ + Don't display ex `welcome message' if in ex batch mode.
+ + Test for vsnprintf and snprintf separately, HP 10.10 has snprintf
+ but not vsnprintf.
+ + Reverse lookup order between LC_MESSAGES and LANG.
+ + Fix Tcl/Perl core dumps in common API code to get/set options.
+ + Fix R command -- it used a DB pinned page after discarding it.
+ + Minor fixes in multiple edit buffer message handling code.
+ + Fix yk command moving to shorter line core dump.
+ + Rework message handing to try and gang more messages onto a single
+ line.
1.65 -> 1.66 (05/18/96)
+ Convert vi man page to historic -man macro package, and install it.
+ Fix bug were !! on an empty line with a nonexistent command left the
diff --git a/usr.bin/vi/docs/features b/usr.bin/vi/docs/features
index 6b054ce0f22..5050e13ddbe 100644
--- a/usr.bin/vi/docs/features
+++ b/usr.bin/vi/docs/features
@@ -1,7 +1,6 @@
List of things that should be added:
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-+ Some way to read both the EXINIT variable *and* the .exrc files.
+ X11 (Tk, Motif, Xaw) interface.
+ Interpreted language (Perl5, Scheme, Tcl/Rush, Python)
+ Additional ports: Windows, Windows NT, MSDOS
@@ -15,15 +14,16 @@ List of things that should be added:
List of suggested features:
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-+ Add a tab listing, e.g. "set tabs=8,16,32,64", so that ^T moves
- to specific screen locations.
-
-+ Filename completion. While on the subject of completion, it would be
- nice to have the completion mechanism found in tcsh version >= 6.03.
- For instance, the completion for the `:cd' command will be directories
- only. The completion for the `:set' command will be all options not
- set at that moment, and for `:set un' will be all options that are set
- at that moment. The completion for `:< count' will be the flags.
++ It would be nice to have the completion mechanism found in tcsh versions
+ >= 6.03. For instance, the completion for the `:cd' command will be
+ directories only. The completion for the `:set' command will be all
+ options not set at that moment, and for `:set un' will be all options
+ that are set at that moment. The completion for `:< count' will be the
+ flags.
+
++ Add an command-line option to initially split the screen based on the
+ number of file arguments, e.g., "nvi -a file1 file2" would initialize
+ a two edit-buffer display.
+ Add a "push" command that would push a file on the tags stack.
(Essentially make tags a special case of the stack, and make
diff --git a/usr.bin/vi/docs/help b/usr.bin/vi/docs/help
new file mode 100644
index 00000000000..9d24b0c8021
--- /dev/null
+++ b/usr.bin/vi/docs/help
@@ -0,0 +1,206 @@
+MOVING THE CURSOR:
+ k - cursor up ^F - page forward /<pattern><CR> - search forward
+ j - cursor down ^B - page backward ?<pattern><CR> - search backward
+ h - cursor left w - move forward a "word" n - repeat the last search
+ l - cursor right b - move backward a "word"
+
+ENTERING TEXT:
+a - append after the cursor. Use the <escape> key to return to
+i - insert before the cursor. command mode.
+o - open a new line below the cursor.
+O - open new line above the cursor.
+
+WRITING AND EXITING:
+:w<Enter> - write the file
+:q<Enter> - exit the file
+:q!<Enter> - exit without writing the file
+:#<Enter> - move to a line (e.g., :35<Enter> moves to line 35)
+
+MISCELLANEOUS:
+^G - display the file name
+ J - join two lines (use i<Enter><escape> to split a line)
+ u - undo the last change (enter . after a 'u' to undo more than one change)
+
+=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+VI COMMANDS:
+ ^A search forward for cursor word
+ ^B scroll up by screens
+ ^C interrupt an operation (e.g. read, write, search)
+ ^D scroll down by half screens (setting count)
+ ^E scroll down by lines
+ ^F scroll down by screens
+ ^G file status
+ ^H move left by characters
+ ^J move down by lines
+ ^L redraw screen
+ ^M move down by lines (to first non-blank)
+ ^N move down by lines
+ ^P move up by lines
+ ^R redraw screen
+ ^T tag pop
+ ^U half page up (set count)
+ ^V input a literal character
+ ^W move to next screen
+ ^Y page up by lines
+ ^Z suspend editor
+ ^[ <escape> exit input mode, cancel partial commands
+ ^\ switch to ex mode
+ ^] tag push cursor word
+ ^^ switch to previous file
+ <space> move right by columns
+ ! filter through command(s) to motion
+ # number increment/decrement
+ $ move to last column
+ % move to match
+ & repeat substitution
+ ' move to mark (to first non-blank)
+ ( move back sentence
+ ) move forward sentence
+ + move down by lines (to first non-blank)
+ , reverse last F, f, T or t search
+ - move up by lines (to first non-blank)
+ . repeat the last command
+ / search forward
+ 0 move to first character
+ : ex command
+ ; repeat last F, f, T or t search
+ < shift lines left to motion
+ > shift lines right to motion
+ ? search backward
+ @ execute buffer
+ A append to the line
+ B move back bigword
+ C change to end-of-line
+ D delete to end-of-line
+ E move to end of bigword
+ F character in line backward search
+ G move to line
+ H move to count lines from screen top
+ I insert before first nonblank
+ J join lines
+ L move to screen bottom
+ M move to screen middle
+ N reverse last search
+ O insert above line
+ P insert before cursor from buffer
+ Q switch to ex mode
+ R replace characters
+ S substitute for the line(s)
+ T before character in line backward search
+ U Restore the current line
+ W move to next bigword
+ X delete character before cursor
+ Y copy line
+ ZZ save file and exit
+ [[ move back section
+ ]] move forward section
+ ^ move to first non-blank
+ _ move to first non-blank
+ ` move to mark
+ a append after cursor
+ b move back word
+ c change to motion
+ d delete to motion
+ e move to end of word
+ f character in line forward search
+ h move left by columns
+ i insert before cursor
+ j move down by lines
+ k move up by lines
+ l move right by columns
+ m set mark
+ n repeat last search
+ o append after line
+ p insert after cursor from buffer
+ r replace character
+ s substitute character
+ t before character in line forward search
+ u undo last change
+ w move to next word
+ x delete character
+ y copy text to motion into a cut buffer
+ z reposition the screen
+ { move back paragraph
+ | move to column
+ } move forward paragraph
+ ~ reverse case
+=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+EX COMMANDS:
+ ^D: scroll lines
+ !: filter lines through commands or run commands
+ #: display numbered lines
+ &: repeat the last subsitution
+ *: execute a buffer
+ <: shift lines left
+ =: display line number
+ >: shift lines right
+ @: execute a buffer
+ append: append input to a line
+ abbreviate: specify an input abbreviation
+ args: display file argument list
+ bg: background the current screen
+ change: change lines to input
+ cd: change the current directory
+ chdir: change the current directory
+ copy: copy lines elsewhere in the file
+ cscope: create a set of tags using a cscope command
+ delete: delete lines from the file
+ display: display buffers, screens or tags
+ [Ee]dit: begin editing another file
+ [Ee]x: begin editing another file
+ exusage: display ex command usage statement
+ file: display (and optionally set) file name
+ fg: switch the current screen and a backgrounded screen
+ global: execute a global command on lines matching an RE
+ help: display help statement
+ insert: insert input before a line
+ join: join lines into a single line
+ k: mark a line position
+ list: display lines in an unambiguous form
+ move: move lines elsewhere in the file
+ mark: mark a line position
+ map: map input or commands to one or more keys
+ mkexrc: write a .exrc file
+ [Nn]ext: edit (and optionally specify) the next file
+ number: change display to number lines
+ open: enter "open" mode (not implemented)
+ print: display lines
+ perl: run the perl interpreter with the command
+ perldo: run the perl interpreter with the command, on each line
+ preserve: preserve an edit session for recovery
+ [Pp]revious: edit the previous file in the file argument list
+ put: append a cut buffer to the line
+ quit: exit ex/vi
+ read: append input from a command or file to the line
+ recover: recover a saved file
+ resize: grow or shrink the current screen
+ rewind: re-edit all the files in the file argument list
+ s: substitute on lines matching an RE
+ script: run a shell in a screen
+ set: set options (use ":set all" to see all options)
+ shell: suspend editing and run a shell
+ source: read a file of ex commands
+ stop: suspend the edit session
+ suspend: suspend the edit session
+ t: copy lines elsewhere in the file
+ [Tt]ag: edit the file containing the tag
+ tagnext: move to the next tag
+ tagpop: return to the previous group of tags
+ tagprev: move to the previous tag
+ tagtop: discard all tags
+ tcl: run the tcl interpreter with the command
+ undo: undo the most recent change
+unabbreviate: delete an abbreviation
+ unmap: delete an input or command map
+ v: execute a global command on lines NOT matching an RE
+ version: display the program version information
+ visual: enter visual (vi) mode from ex mode
+ [Vv]isual: edit another file (from vi mode only)
+ viusage: display vi key usage statement
+ write: write the file
+ wn: write the file and switch to the next file
+ wq: write the file and exit
+ xit: exit
+ yank: copy lines to a cut buffer
+ z: display different screens of the file
+ ~: replace previous RE with previous replacement string,
diff --git a/usr.bin/vi/docs/spell.ok b/usr.bin/vi/docs/spell.ok
new file mode 100644
index 00000000000..411b631a305
--- /dev/null
+++ b/usr.bin/vi/docs/spell.ok
@@ -0,0 +1,93 @@
+API's
+Amir
+Bostic
+CFLAGS
+DB
+DPURIFY
+Ds
+Dw
+EXINIT
+Englar
+GDB
+Kirkendall
+Lite
+Makefile
+NEXINIT
+NVI
+Neville
+Nvi
+Nvi's
+OS
+POSIX
+POSIX.2
+Perl
+PostScript
+README
+Roff
+Sven
+Tcl
+Todo
+USD
+USD.doc
+USD:14
+USD:15
+USD:16
+UUNET
+Verdoolaege
+api
+autowrite
+berkeley
+bitstring
+bitstring.h
+bostic
+bsd
+bugs.current
+changelog
+cl
+clib
+cs
+cs.berkeley.edu
+db
+dbopen
+doc
+docs
+edu
+elvis
+email
+exrc
+exref
+free's
+ftp.cs.berkeley.edu
+gdb.script
+gz
+gzip'd
+hardtabs
+init.tcl
+keystrokes
+nex
+nexrc
+nvi
+nvi's
+nvi.ALPHA.tar.gz
+nvi.tar.Z
+nvi.tar.gz
+openmode
+ps
+queue.h
+recover.script
+redistributable
+slowopen
+svi
+tcl
+tclapi
+tknvi
+txt
+ucb
+uunet
+vi
+vi.man
+vi.ref
+vi.ref.ps
+vi.ref.txt
+vitut
+xaw
diff --git a/usr.bin/vi/ex/ex.c b/usr.bin/vi/ex/ex.c
index 3f2af66b5c4..f4a5bfb3a47 100644
--- a/usr.bin/vi/ex/ex.c
+++ b/usr.bin/vi/ex/ex.c
@@ -10,7 +10,7 @@
#include "config.h"
#ifndef lint
-static const char sccsid[] = "@(#)ex.c 10.46 (Berkeley) 5/15/96";
+static const char sccsid[] = "@(#)ex.c 10.50 (Berkeley) 6/30/96";
#endif /* not lint */
#include <sys/types.h>
@@ -427,7 +427,7 @@ loop: ecp = gp->ecq.lh_first;
goto skip_srch;
}
break;
- case 'E': case 'N': case 'P': case 'T': case 'V':
+ case 'E': case 'F': case 'N': case 'P': case 'T': case 'V':
newscreen = 1;
p[0] = tolower(p[0]);
break;
@@ -1373,7 +1373,7 @@ addr_verify:
* lines message -- that's wrong enough that we don't match it.
*/
if (F_ISSET(sp, SC_EX))
- msgq_rpt(sp);
+ mod_rpt(sp);
/*
* Integrate any offset parsed by the underlying command, and make
@@ -1454,16 +1454,11 @@ addr_verify:
*
* This can happen more than once -- the historic vi simply hung or
* dropped core, of course. Prepend the + command back into the
- * current command and continue. We may have to add up to two more
- * characters, a <literal next> and a command separator. We know
- * that it will still fit because we discarded at least one space
- * and the + character.
+ * current command and continue. We may have to add an additional
+ * <literal next> character. We know that it will fit because we
+ * discarded at least one space and the + character.
*/
if (arg1_len != 0) {
- /* Add in a command separator. */
- *--ecp->save_cmd = '\n';
- ++ecp->save_cmdlen;
-
/*
* If the last character of the + command was a <literal next>
* character, it would be treated differently because of the
@@ -1480,11 +1475,11 @@ addr_verify:
/*
* Any commands executed from a +cmd are executed starting at
- * the last line, first column of the file -- NOT the first
- * nonblank.) The main file startup code doesn't know that a
- * +cmd was set, however, so it may have put us at the top of
- * the file. (Note, this is safe because we must have switched
- * files to get here.)
+ * the first column of the last line of the file -- NOT the
+ * first nonblank.) The main file startup code doesn't know
+ * that a +cmd was set, however, so it may have put us at the
+ * top of the file. (Note, this is safe because we must have
+ * switched files to get here.)
*/
F_SET(ecp, E_MOVETOEND);
}
@@ -1805,7 +1800,7 @@ ex_line(sp, ecp, mp, isaddrp, errp)
GS *gp;
long total, val;
int isneg;
- int (*sf) __P((SCR *, MARK *, MARK *, char *, char **, u_int));
+ int (*sf) __P((SCR *, MARK *, MARK *, char *, size_t, char **, u_int));
char *endp;
gp = sp->gp;
@@ -1893,8 +1888,9 @@ ex_line(sp, ecp, mp, isaddrp, errp)
search: mp->lno = sp->lno;
mp->cno = sp->cno;
- if (sf(sp, mp, mp,
- ecp->cp, &endp, SEARCH_MSG | SEARCH_PARSE | SEARCH_SET)) {
+ if (sf(sp, mp, mp, ecp->cp, ecp->clen, &endp,
+ SEARCH_MSG | SEARCH_PARSE | SEARCH_SET |
+ (F_ISSET(ecp, E_SEARCH_WMSG) ? SEARCH_WMSG : 0))) {
*errp = 1;
return (0);
}
@@ -2122,12 +2118,9 @@ ex_load(sp)
* the current line number, and get a new copy of the command for
* the parser. Note, the original pointer almost certainly moved,
* so we have play games.
- *
- * See ex.h for a discussion of SEARCH_TERMINATION.
*/
ecp->cp = ecp->o_cp;
- memmove(ecp->cp,
- ecp->cp + ecp->o_clen + SEARCH_TERMINATION, ecp->o_clen);
+ memmove(ecp->cp, ecp->cp + ecp->o_clen, ecp->o_clen);
ecp->clen = ecp->o_clen;
ecp->range_lno = sp->lno = rp->start++;
diff --git a/usr.bin/vi/ex/ex.h b/usr.bin/vi/ex/ex.h
index 0cfb6b7c028..cd18ced76ab 100644
--- a/usr.bin/vi/ex/ex.h
+++ b/usr.bin/vi/ex/ex.h
@@ -6,7 +6,7 @@
*
* See the LICENSE file for redistribution information.
*
- * @(#)ex.h 10.22 (Berkeley) 5/16/96
+ * @(#)ex.h 10.23 (Berkeley) 6/30/96
*/
#define PROMPTCHAR ':' /* Prompt using a colon. */
@@ -61,17 +61,6 @@ extern EXCMDLIST const cmds[]; /* Table of ex commands. */
} \
}
-/*
- * XXX
- * There's a chance that the last command in the string, source file or the @
- * buffer or global or v commands is a search command. All search commands
- * must be nul-terminated -- the supporting RE routines require it for historic
- * reasons, and we don't want our mid-level routines to copy the strings before
- * performing searches. So, we allocate an extra character in various places,
- * and make it a nul.
- */
-#define SEARCH_TERMINATION 1
-
/* Range structures for global and @ commands. */
typedef struct _range RANGE;
struct _range { /* Global command range. */
@@ -160,8 +149,9 @@ struct _excmd {
#define E_MODIFY 0x00200000 /* File name expansion modified arg. */
#define E_MOVETOEND 0x00400000 /* Move to the end of the file first. */
#define E_NEWLINE 0x00800000 /* Found ending <newline>. */
-#define E_USELASTCMD 0x01000000 /* Use the last command. */
-#define E_VISEARCH 0x02000000 /* It's really a vi search command. */
+#define E_SEARCH_WMSG 0x01000000 /* Display search-wrapped message. */
+#define E_USELASTCMD 0x02000000 /* Use the last command. */
+#define E_VISEARCH 0x04000000 /* It's really a vi search command. */
u_int32_t flags; /* Current flags. */
};
diff --git a/usr.bin/vi/ex/ex_append.c b/usr.bin/vi/ex/ex_append.c
index af951f6e62f..42f1e93ba8e 100644
--- a/usr.bin/vi/ex/ex_append.c
+++ b/usr.bin/vi/ex/ex_append.c
@@ -10,7 +10,7 @@
#include "config.h"
#ifndef lint
-static const char sccsid[] = "@(#)ex_append.c 10.27 (Berkeley) 4/27/96";
+static const char sccsid[] = "@(#)ex_append.c 10.29 (Berkeley) 6/28/96";
#endif /* not lint */
#include <sys/types.h>
@@ -83,6 +83,7 @@ ex_aci(sp, cmdp, cmd)
enum which cmd;
{
CHAR_T *p, *t;
+ GS *gp;
TEXT *tp;
TEXTH tiq;
recno_t cnt, lno;
@@ -90,6 +91,7 @@ ex_aci(sp, cmdp, cmd)
u_int32_t flags;
int need_newline;
+ gp = sp->gp;
NEEDFILE(sp, cmdp);
/*
@@ -210,7 +212,7 @@ ex_aci(sp, cmdp, cmd)
* be possible.
*/
if (F_ISSET(sp, SC_VI)) {
- if (sp->gp->scr_screen(sp, SC_EX)) {
+ if (gp->scr_screen(sp, SC_EX)) {
ex_emsg(sp, cmdp->cmd->name, EXM_NOCANON);
return (1);
}
diff --git a/usr.bin/vi/ex/ex_argv.c b/usr.bin/vi/ex/ex_argv.c
index 933fd0bd3fc..f62b081eb40 100644
--- a/usr.bin/vi/ex/ex_argv.c
+++ b/usr.bin/vi/ex/ex_argv.c
@@ -272,7 +272,7 @@ argv_exp3(sp, excp, cmd, cmdlen)
off = exp->argsoff;
exp->args[off]->len = len;
for (p = exp->args[off]->bp; len > 0; --len, *p++ = *ap++)
- if (IS_ESCAPE(sp, excp, *(u_char *)ap))
+ if (IS_ESCAPE(sp, excp, *ap))
++ap;
*p = '\0';
}
diff --git a/usr.bin/vi/ex/ex_at.c b/usr.bin/vi/ex/ex_at.c
index 15081ef4f9e..630c11d8507 100644
--- a/usr.bin/vi/ex/ex_at.c
+++ b/usr.bin/vi/ex/ex_at.c
@@ -10,7 +10,7 @@
#include "config.h"
#ifndef lint
-static const char sccsid[] = "@(#)ex_at.c 10.10 (Berkeley) 4/27/96";
+static const char sccsid[] = "@(#)ex_at.c 10.11 (Berkeley) 6/30/96";
#endif /* not lint */
#include <sys/types.h>
@@ -108,14 +108,13 @@ ex_at(sp, cmdp)
tp != (void *)&cbp->textq; tp = tp->q.cqe_prev)
len += tp->len + 1;
- /* See ex.h for a discussion of SEARCH_TERMINATION. */
- MALLOC_RET(sp, ecp->cp, char *, len * 2 + SEARCH_TERMINATION);
+ MALLOC_RET(sp, ecp->cp, char *, len * 2);
ecp->o_cp = ecp->cp;
ecp->o_clen = len;
ecp->cp[len] = '\0';
/* Copy the buffer into the command space. */
- for (p = ecp->cp + len + SEARCH_TERMINATION, tp = cbp->textq.cqh_last;
+ for (p = ecp->cp + len, tp = cbp->textq.cqh_last;
tp != (void *)&cbp->textq; tp = tp->q.cqe_prev) {
memmove(p, tp->lb, tp->len);
p += tp->len;
diff --git a/usr.bin/vi/ex/ex_cmd.c b/usr.bin/vi/ex/ex_cmd.c
index 0aa43b8532e..af8151117e6 100644
--- a/usr.bin/vi/ex/ex_cmd.c
+++ b/usr.bin/vi/ex/ex_cmd.c
@@ -10,7 +10,7 @@
#include "config.h"
#ifndef lint
-static const char sccsid[] = "@(#)ex_cmd.c 10.17 (Berkeley) 4/10/96";
+static const char sccsid[] = "@(#)ex_cmd.c 10.18 (Berkeley) 6/29/96";
#endif /* not lint */
#include <sys/types.h>
@@ -113,7 +113,7 @@ EXCMDLIST const cmds[] = {
{"bg", ex_bg, E_VIONLY,
"",
"bg",
- "background the current screen"},
+ "put a foreground screen into the background"},
/* C_CHANGE */
{"change", ex_change, E_ADDR2|E_ADDR_ZERODEF,
"!ca",
@@ -175,10 +175,10 @@ EXCMDLIST const cmds[] = {
"f[ile] [name]",
"display (and optionally set) file name"},
/* C_FG */
- {"fg", ex_fg, E_VIONLY,
+ {"fg", ex_fg, E_NEWSCREEN|E_VIONLY,
"f1o",
- "fg [file]",
- "switch the current screen and a backgrounded screen"},
+ "[Ff]g [file]",
+ "bring a backgrounded screen into the foreground"},
/* C_GLOBAL */
{"global", ex_global, E_ADDR2_ALL,
"!s",
diff --git a/usr.bin/vi/ex/ex_cscope.c b/usr.bin/vi/ex/ex_cscope.c
index b753082b294..c5fca718cb8 100644
--- a/usr.bin/vi/ex/ex_cscope.c
+++ b/usr.bin/vi/ex/ex_cscope.c
@@ -10,7 +10,7 @@
#include "config.h"
#ifndef lint
-static const char sccsid[] = "@(#)ex_cscope.c 10.6 (Berkeley) 5/16/96";
+static const char sccsid[] = "@(#)ex_cscope.c 10.8 (Berkeley) 6/30/96";
#endif /* not lint */
#include <sys/param.h>
@@ -712,11 +712,11 @@ parse(sp, csc, tqp, matchesp)
csc_file(sp, csc, name, &dname, &dlen, &isnewer);
/*
- * If the file was modified less recently than the cscope
+ * If the file was modified more recently than the cscope
* database, or there wasn't a search string, use the line
* number.
*/
- if (!isnewer || strcmp(search, "<unknown>") == 0) {
+ if (isnewer || strcmp(search, "<unknown>") == 0) {
search = NULL;
slen = 0;
}
@@ -782,7 +782,7 @@ csc_file(sp, csc, name, dirp, dlenp, isnewerp)
if (stat(buf, &sb) == 0) {
*dirp = *pp;
*dlenp = strlen(*pp);
- *isnewerp = sb.st_mtime >= csc->mtime;
+ *isnewerp = sb.st_mtime > csc->mtime;
return;
}
}
@@ -973,7 +973,7 @@ cscope_search(sp, tqp, tp)
m.lno = 1;
m.cno = 0;
if (f_search(sp, &m, &m,
- tp->search, NULL, SEARCH_CSCOPE | SEARCH_FILE)) {
+ tp->search, tp->slen, NULL, SEARCH_CSCOPE | SEARCH_FILE)) {
tag_msg(sp, TAG_SEARCH, tqp->tag);
return (1);
}
diff --git a/usr.bin/vi/ex/ex_global.c b/usr.bin/vi/ex/ex_global.c
index 7f4024c6f1d..ae0b23cfbc1 100644
--- a/usr.bin/vi/ex/ex_global.c
+++ b/usr.bin/vi/ex/ex_global.c
@@ -10,7 +10,7 @@
#include "config.h"
#ifndef lint
-static const char sccsid[] = "@(#)ex_global.c 10.20 (Berkeley) 5/3/96";
+static const char sccsid[] = "@(#)ex_global.c 10.21 (Berkeley) 6/30/96";
#endif /* not lint */
#include <sys/types.h>
@@ -137,14 +137,14 @@ usage: ex_emsg(sp, cmdp->cmd->usage, EXM_USAGE);
return (1);
}
- /* Compile the RE if necessary. */
- if (!F_ISSET(sp, SC_RE_SEARCH) &&
- re_compile(sp, sp->re, NULL, NULL, &sp->re_c, RE_C_SEARCH))
+ /* Re-compile the RE if necessary. */
+ if (!F_ISSET(sp, SC_RE_SEARCH) && re_compile(sp,
+ sp->re, sp->re_len, NULL, NULL, &sp->re_c, RE_C_SEARCH))
return (1);
} else {
/* Compile the RE. */
- if (re_compile(sp,
- ptrn, &sp->re, &sp->re_len, &sp->re_c, RE_C_SEARCH))
+ if (re_compile(sp, ptrn, t - ptrn,
+ &sp->re, &sp->re_len, &sp->re_c, RE_C_SEARCH))
return (1);
/*
@@ -177,11 +177,10 @@ usage: ex_emsg(sp, cmdp->cmd->usage, EXM_USAGE);
len = 1;
}
- /* See ex.h for a discussion of SEARCH_TERMINATION. */
- MALLOC_RET(sp, ecp->cp, char *, len * 2 + SEARCH_TERMINATION);
+ MALLOC_RET(sp, ecp->cp, char *, len * 2);
ecp->o_cp = ecp->cp;
ecp->o_clen = len;
- memmove(ecp->cp + len + SEARCH_TERMINATION, p, len);
+ memcpy(ecp->cp + len, p, len);
ecp->range_lno = OOBLNO;
FL_SET(ecp->agv_flags, cmd == GLOBAL ? AGV_GLOBAL : AGV_V);
LIST_INSERT_HEAD(&sp->gp->ecq, ecp, q);
diff --git a/usr.bin/vi/ex/ex_init.c b/usr.bin/vi/ex/ex_init.c
index 5dc28ef570d..4aeffc26831 100644
--- a/usr.bin/vi/ex/ex_init.c
+++ b/usr.bin/vi/ex/ex_init.c
@@ -10,7 +10,7 @@
#include "config.h"
#ifndef lint
-static const char sccsid[] = "@(#)ex_init.c 10.22 (Berkeley) 5/15/96";
+static const char sccsid[] = "@(#)ex_init.c 10.24 (Berkeley) 6/30/96";
#endif /* not lint */
#include <sys/param.h>
@@ -187,10 +187,10 @@ ex_exrc(sp)
}
if ((p = getenv("NEXINIT")) != NULL) {
- if (ex_run_str(sp, "NEXINIT", p, strlen(p), 1, 1))
+ if (ex_run_str(sp, "NEXINIT", p, strlen(p), 1, 0))
return (1);
} else if ((p = getenv("EXINIT")) != NULL) {
- if (ex_run_str(sp, "EXINIT", p, strlen(p), 1, 1))
+ if (ex_run_str(sp, "EXINIT", p, strlen(p), 1, 0))
return (1);
} else if ((p = getenv("HOME")) != NULL && *p) {
(void)snprintf(path, sizeof(path), "%s/%s", p, _PATH_NEXRC);
@@ -290,11 +290,9 @@ ex_run_str(sp, name, str, len, ex_flags, nocopy)
if (nocopy)
ecp->cp = str;
- else {
- /* See ex.h for a discussion of SEARCH_TERMINATION. */
+ else
if ((ecp->cp = v_strdup(sp, str, len)) == NULL)
return (1);
- }
ecp->clen = len;
if (name == NULL)
diff --git a/usr.bin/vi/ex/ex_read.c b/usr.bin/vi/ex/ex_read.c
index 7f409db4bc3..7d4e43f63c8 100644
--- a/usr.bin/vi/ex/ex_read.c
+++ b/usr.bin/vi/ex/ex_read.c
@@ -10,7 +10,7 @@
#include "config.h"
#ifndef lint
-static const char sccsid[] = "@(#)ex_read.c 10.31 (Berkeley) 5/8/96";
+static const char sccsid[] = "@(#)ex_read.c 10.36 (Berkeley) 6/28/96";
#endif /* not lint */
#include <sys/types.h>
@@ -144,7 +144,7 @@ ex_read(sp, cmdp)
* the don't-wait flag.
*/
if (!F_ISSET(sp, SC_SCR_EXWROTE))
- F_SET(sp, SC_EX_DONTWAIT);
+ F_SET(sp, SC_EX_WAIT_NO);
/*
* Switch into ex canonical mode. The reason to restore the
@@ -156,10 +156,16 @@ ex_read(sp, cmdp)
* the screen on a normal read.
*/
if (F_ISSET(sp, SC_VI)) {
- if (sp->gp->scr_screen(sp, SC_EX)) {
+ if (gp->scr_screen(sp, SC_EX)) {
ex_emsg(sp, cmdp->cmd->name, EXM_NOCANON_F);
return (1);
}
+ /*
+ * !!!
+ * Historically, the read command doesn't switch to
+ * the alternate X11 xterm screen, if doing a filter
+ * read -- don't set SA_ALTERNATE.
+ */
F_SET(sp, SC_SCR_EX | SC_SCR_EXWROTE);
}
@@ -237,17 +243,20 @@ ex_read(sp, cmdp)
/*
* !!!
- * Historically, vi did not permit reads from non-regular files,
- * nor did it distinguish between "read !" and "read!", so there
- * was no way to "force" it.
+ * Historically, vi did not permit reads from non-regular files, nor
+ * did it distinguish between "read !" and "read!", so there was no
+ * way to "force" it. We permit reading from named pipes too, since
+ * they didn't exist when the original implementation of vi was done
+ * and they seem a reasonable addition.
*/
if ((fp = fopen(name, "r")) == NULL || fstat(fileno(fp), &sb)) {
msgq_str(sp, M_SYSERR, name, "%s");
return (1);
}
- if (!S_ISREG(sb.st_mode)) {
+ if (!S_ISFIFO(sb.st_mode) && !S_ISREG(sb.st_mode)) {
(void)fclose(fp);
- msgq(sp, M_ERR, "145|Only regular files may be read");
+ msgq(sp, M_ERR,
+ "145|Only regular files and named pipes may be read");
return (1);
}
diff --git a/usr.bin/vi/ex/ex_screen.c b/usr.bin/vi/ex/ex_screen.c
index 91caa832fe2..9bc5bf04b06 100644
--- a/usr.bin/vi/ex/ex_screen.c
+++ b/usr.bin/vi/ex/ex_screen.c
@@ -10,7 +10,7 @@
#include "config.h"
#ifndef lint
-static const char sccsid[] = "@(#)ex_screen.c 10.10 (Berkeley) 3/6/96";
+static const char sccsid[] = "@(#)ex_screen.c 10.11 (Berkeley) 6/29/96";
#endif /* not lint */
#include <sys/types.h>
@@ -51,7 +51,19 @@ ex_fg(sp, cmdp)
SCR *sp;
EXCMD *cmdp;
{
- return (vs_fg(sp, cmdp->argc ? cmdp->argv[0]->bp : NULL));
+ SCR *nsp;
+ int newscreen;
+
+ newscreen = F_ISSET(cmdp, E_NEWSCREEN);
+ if (vs_fg(sp, &nsp, cmdp->argc ? cmdp->argv[0]->bp : NULL, newscreen))
+ return (1);
+
+ /* Set up the switch. */
+ if (newscreen) {
+ sp->nextdisp = nsp;
+ F_SET(sp, SC_SSWITCH);
+ }
+ return (0);
}
/*
diff --git a/usr.bin/vi/ex/ex_shell.c b/usr.bin/vi/ex/ex_shell.c
index abb016f3d88..070d6d54706 100644
--- a/usr.bin/vi/ex/ex_shell.c
+++ b/usr.bin/vi/ex/ex_shell.c
@@ -10,7 +10,7 @@
#include "config.h"
#ifndef lint
-static const char sccsid[] = "@(#)ex_shell.c 10.33 (Berkeley) 4/27/96";
+static const char sccsid[] = "@(#)ex_shell.c 10.35 (Berkeley) 6/28/96";
#endif /* not lint */
#include <sys/param.h>
@@ -63,7 +63,7 @@ ex_shell(sp, cmdp)
* Historically, vi didn't require a continue message after the
* return of the shell. Match it.
*/
- F_SET(sp, SC_EX_DONTWAIT);
+ F_SET(sp, SC_EX_WAIT_NO);
return (rval);
}
@@ -82,19 +82,23 @@ ex_exec_proc(sp, cmdp, cmd, msg, need_newline)
const char *msg;
int need_newline;
{
+ GS *gp;
const char *name;
pid_t pid;
+ gp = sp->gp;
+
/* We'll need a shell. */
if (opts_empty(sp, O_SHELL, 0))
return (1);
/* Enter ex mode. */
if (F_ISSET(sp, SC_VI)) {
- if (sp->gp->scr_screen(sp, SC_EX)) {
+ if (gp->scr_screen(sp, SC_EX)) {
ex_emsg(sp, cmdp->cmd->name, EXM_NOCANON);
return (1);
}
+ (void)gp->scr_attr(sp, SA_ALTERNATE, 0);
F_SET(sp, SC_SCR_EX | SC_SCR_EXWROTE);
}
diff --git a/usr.bin/vi/ex/ex_source.c b/usr.bin/vi/ex/ex_source.c
index ae58c973197..468fd79ee2c 100644
--- a/usr.bin/vi/ex/ex_source.c
+++ b/usr.bin/vi/ex/ex_source.c
@@ -10,7 +10,7 @@
#include "config.h"
#ifndef lint
-static const char sccsid[] = "@(#)ex_source.c 10.10 (Berkeley) 4/22/96";
+static const char sccsid[] = "@(#)ex_source.c 10.11 (Berkeley) 6/30/96";
#endif /* not lint */
#include <sys/types.h>
@@ -62,8 +62,7 @@ ex_source(sp, cmdp)
goto err;
}
- /* See ex.h for a discussion of SEARCH_TERMINATION. */
- MALLOC(sp, bp, char *, (size_t)sb.st_size + SEARCH_TERMINATION);
+ MALLOC(sp, bp, char *, (size_t)sb.st_size);
if (bp == NULL) {
(void)close(fd);
return (1);
diff --git a/usr.bin/vi/ex/ex_subst.c b/usr.bin/vi/ex/ex_subst.c
index 9713871f505..c935d92c248 100644
--- a/usr.bin/vi/ex/ex_subst.c
+++ b/usr.bin/vi/ex/ex_subst.c
@@ -10,7 +10,7 @@
#include "config.h"
#ifndef lint
-static const char sccsid[] = "@(#)ex_subst.c 10.30 (Berkeley) 5/16/96";
+static const char sccsid[] = "@(#)ex_subst.c 10.32 (Berkeley) 6/30/96";
#endif /* not lint */
#include <sys/types.h>
@@ -32,11 +32,11 @@ static const char sccsid[] = "@(#)ex_subst.c 10.30 (Berkeley) 5/16/96";
#define SUB_FIRST 0x01 /* The 'r' flag isn't reasonable. */
#define SUB_MUSTSETR 0x02 /* The 'r' flag is required. */
-static int re_conv __P((SCR *, char **, int *));
-static int re_cscope_conv __P((SCR *, char **, int *));
+static int re_conv __P((SCR *, char **, size_t *, int *));
+static int re_cscope_conv __P((SCR *, char **, size_t *, int *));
static int re_sub __P((SCR *,
char *, char **, size_t *, size_t *, regmatch_t [10]));
-static int re_tag_conv __P((SCR *, char **, int *));
+static int re_tag_conv __P((SCR *, char **, size_t *, int *));
static int s __P((SCR *, EXCMD *, char *, regex_t *, u_int));
/*
@@ -139,9 +139,9 @@ subagain: return (ex_subagain(sp, cmdp));
return (1);
}
- /* Compile the RE if necessary. */
- if (!F_ISSET(sp, SC_RE_SEARCH) &&
- re_compile(sp, sp->re, NULL, NULL, &sp->re_c, RE_C_SEARCH))
+ /* Re-compile the RE if necessary. */
+ if (!F_ISSET(sp, SC_RE_SEARCH) && re_compile(sp,
+ sp->re, sp->re_len, NULL, NULL, &sp->re_c, RE_C_SEARCH))
return (1);
flags = 0;
} else {
@@ -152,11 +152,11 @@ subagain: return (ex_subagain(sp, cmdp));
* RE's. We compile the RE twice, as we don't want to bother
* ref counting the pattern string and (opaque) structure.
*/
- if (re_compile(sp,
- ptrn, &sp->re, &sp->re_len, &sp->re_c, RE_C_SEARCH))
+ if (re_compile(sp, ptrn, t - ptrn,
+ &sp->re, &sp->re_len, &sp->re_c, RE_C_SEARCH))
return (1);
- if (re_compile(sp,
- ptrn, &sp->subre, &sp->subre_len, &sp->subre_c, RE_C_SUBST))
+ if (re_compile(sp, ptrn, t - ptrn,
+ &sp->subre, &sp->subre_len, &sp->subre_c, RE_C_SUBST))
return (1);
flags = SUB_FIRST;
@@ -262,8 +262,8 @@ ex_subagain(sp, cmdp)
ex_emsg(sp, NULL, EXM_NOPREVRE);
return (1);
}
- if (!F_ISSET(sp, SC_RE_SUBST) &&
- re_compile(sp, sp->subre, NULL, NULL, &sp->subre_c, RE_C_SUBST))
+ if (!F_ISSET(sp, SC_RE_SUBST) && re_compile(sp,
+ sp->subre, sp->subre_len, NULL, NULL, &sp->subre_c, RE_C_SUBST))
return (1);
return (s(sp,
cmdp, cmdp->argc ? cmdp->argv[0]->bp : NULL, &sp->subre_c, 0));
@@ -286,8 +286,8 @@ ex_subtilde(sp, cmdp)
ex_emsg(sp, NULL, EXM_NOPREVRE);
return (1);
}
- if (!F_ISSET(sp, SC_RE_SEARCH) &&
- re_compile(sp, sp->re, NULL, NULL, &sp->re_c, RE_C_SEARCH))
+ if (!F_ISSET(sp, SC_RE_SEARCH) && re_compile(sp,
+ sp->re, sp->re_len, NULL, NULL, &sp->re_c, RE_C_SEARCH))
return (1);
return (s(sp,
cmdp, cmdp->argc ? cmdp->argv[0]->bp : NULL, &sp->re_c, 0));
@@ -355,7 +355,6 @@ s(sp, cmdp, s, re, flags)
MARK from, to;
TEXTH tiq;
recno_t elno, lno, slno;
- long llno;
regmatch_t match[10];
size_t blen, cnt, last, lbclen, lblen, len, llen;
size_t offset, saved_offset, scno;
@@ -415,18 +414,13 @@ s(sp, cmdp, s, re, flags)
if (lno != OOBLNO)
goto usage;
errno = 0;
- llno = strtoul(s, &s, 10);
+ lno = strtoul(s, &s, 10);
if (*s == '\0') /* Loop increment correction. */
--s;
- lno = llno;
- if (llno != lno) {
- errno = ERANGE;
- llno = LONG_MAX;
- }
if (errno == ERANGE) {
- if (llno == LONG_MAX)
+ if (lno == LONG_MAX)
msgq(sp, M_ERR, "153|Count overflow");
- else if (llno == LONG_MIN)
+ else if (lno == LONG_MIN)
msgq(sp, M_ERR, "154|Count underflow");
else
msgq(sp, M_SYSERR, NULL);
@@ -893,13 +887,13 @@ err: rval = 1;
* Compile the RE.
*
* PUBLIC: int re_compile __P((SCR *,
- * PUBLIC: char *, char **, size_t *, regex_t *, u_int));
+ * PUBLIC: char *, size_t, char **, size_t *, regex_t *, u_int));
*/
int
-re_compile(sp, ptrn, ptrnp, lenp, rep, flags)
+re_compile(sp, ptrn, plen, ptrnp, lenp, rep, flags)
SCR *sp;
char *ptrn, **ptrnp;
- size_t *lenp;
+ size_t plen, *lenp;
regex_t *rep;
u_int flags;
{
@@ -915,10 +909,10 @@ re_compile(sp, ptrn, ptrnp, lenp, rep, flags)
if (O_ISSET(sp, O_IGNORECASE))
reflags |= REG_ICASE;
if (O_ISSET(sp, O_ICLOWER)) {
- for (p = ptrn; *p != '\0'; ++p)
+ for (p = ptrn, len = plen; len > 0; ++p, --len)
if (isupper(*p))
break;
- if (*p == '\0')
+ if (len == 0)
reflags |= REG_ICASE;
}
}
@@ -938,14 +932,9 @@ re_compile(sp, ptrn, ptrnp, lenp, rep, flags)
* so convert the vi-style RE's to POSIX 1003.2 RE's. Save a copy for
* later recompilation. Free any previously saved value.
*/
- replaced = 0;
if (ptrnp != NULL) {
- if (*ptrnp != NULL) {
- free(*ptrnp);
- *ptrnp = NULL;
- }
if (LF_ISSET(RE_C_CSCOPE)) {
- if (re_cscope_conv(sp, &ptrn, &replaced))
+ if (re_cscope_conv(sp, &ptrn, &plen, &replaced))
return (1);
/*
* XXX
@@ -955,25 +944,49 @@ re_compile(sp, ptrn, ptrnp, lenp, rep, flags)
*/
reflags |= REG_EXTENDED;
} else if (LF_ISSET(RE_C_TAG)) {
- if (re_tag_conv(sp, &ptrn, &replaced))
+ if (re_tag_conv(sp, &ptrn, &plen, &replaced))
return (1);
} else
- if (re_conv(sp, &ptrn, &replaced))
+ if (re_conv(sp, &ptrn, &plen, &replaced))
return (1);
- len = strlen(ptrn);
+
+ /* Discard previous pattern. */
+ if (*ptrnp != NULL) {
+ free(*ptrnp);
+ *ptrnp = NULL;
+ }
if (lenp != NULL)
- *lenp = len;
- if ((*ptrnp = v_strdup(sp, ptrn, len)) == NULL)
- return (1);
- }
+ *lenp = plen;
+
+ /*
+ * Copy the string into allocated memory.
+ *
+ * XXX
+ * Regcomp isn't 8-bit clean, so the pattern is nul-terminated
+ * for now. There's just no other solution.
+ */
+ MALLOC(sp, *ptrnp, char *, plen + 1);
+ if (*ptrnp != NULL) {
+ memcpy(*ptrnp, ptrn, plen);
+ (*ptrnp)[plen] = '\0';
+ }
- rval = regcomp(rep, ptrn, reflags);
+ /* Free up conversion-routine-allocated memory. */
+ if (replaced)
+ FREE_SPACE(sp, ptrn, 0);
- /* Free up any allocated memory. */
- if (replaced)
- FREE_SPACE(sp, ptrn, 0);
+ if (*ptrnp == NULL)
+ return (1);
+
+ ptrn = *ptrnp;
+ }
- if (rval) {
+ /*
+ * XXX
+ * Regcomp isn't 8-bit clean, so we just lost if the pattern
+ * contained a nul. Bummer!
+ */
+ if ((rval = regcomp(rep, ptrn, /* plen, */ reflags)) != 0) {
if (!LF_ISSET(RE_C_SILENT))
re_error(sp, rval, rep);
return (1);
@@ -1010,12 +1023,13 @@ re_compile(sp, ptrn, ptrnp, lenp, rep, flags)
* weren't historically. It's a bug.
*/
static int
-re_conv(sp, ptrnp, replacedp)
+re_conv(sp, ptrnp, plenp, replacedp)
SCR *sp;
char **ptrnp;
+ size_t *plenp;
int *replacedp;
{
- size_t blen, needlen;
+ size_t blen, len, needlen;
int magic;
char *bp, *p, *t;
@@ -1023,37 +1037,42 @@ re_conv(sp, ptrnp, replacedp)
* First pass through, we figure out how much space we'll need.
* We do it in two passes, on the grounds that most of the time
* the user is doing a search and won't have magic characters.
- * That way we can skip the malloc and memmove's.
+ * That way we can skip most of the memory allocation and copies.
*/
- for (p = *ptrnp, magic = 0, needlen = 0; *p != '\0'; ++p)
+ magic = 0;
+ for (p = *ptrnp, len = *plenp, needlen = 0; len > 0; ++p, --len)
switch (*p) {
case '\\':
- switch (*++p) {
- case '<':
- magic = 1;
- needlen += sizeof(RE_WSTART);
- break;
- case '>':
- magic = 1;
- needlen += sizeof(RE_WSTOP);
- break;
- case '~':
- if (!O_ISSET(sp, O_MAGIC)) {
+ if (len > 1) {
+ --len;
+ switch (*++p) {
+ case '<':
magic = 1;
- needlen += sp->repl_len;
- }
- break;
- case '.':
- case '[':
- case '*':
- if (!O_ISSET(sp, O_MAGIC)) {
+ needlen += sizeof(RE_WSTART);
+ break;
+ case '>':
magic = 1;
- needlen += 1;
+ needlen += sizeof(RE_WSTOP);
+ break;
+ case '~':
+ if (!O_ISSET(sp, O_MAGIC)) {
+ magic = 1;
+ needlen += sp->repl_len;
+ }
+ break;
+ case '.':
+ case '[':
+ case '*':
+ if (!O_ISSET(sp, O_MAGIC)) {
+ magic = 1;
+ needlen += 1;
+ }
+ break;
+ default:
+ needlen += 2;
}
- break;
- default:
- needlen += 2;
- }
+ } else
+ needlen += 1;
break;
case '~':
if (O_ISSET(sp, O_MAGIC)) {
@@ -1079,49 +1098,52 @@ re_conv(sp, ptrnp, replacedp)
return (0);
}
- /*
- * Get enough memory to hold the final pattern.
- *
- * XXX
- * It's nul-terminated, for now.
- */
- GET_SPACE_RET(sp, bp, blen, needlen + 1);
+ /* Get enough memory to hold the final pattern. */
+ *replacedp = 1;
+ GET_SPACE_RET(sp, bp, blen, needlen);
- for (p = *ptrnp, t = bp; *p != '\0'; ++p)
+ for (p = *ptrnp, len = *plenp, t = bp; len > 0; ++p, --len)
switch (*p) {
case '\\':
- switch (*++p) {
- case '<':
- memmove(t, RE_WSTART, sizeof(RE_WSTART) - 1);
- t += sizeof(RE_WSTART) - 1;
- break;
- case '>':
- memmove(t, RE_WSTOP, sizeof(RE_WSTOP) - 1);
- t += sizeof(RE_WSTOP) - 1;
- break;
- case '~':
- if (O_ISSET(sp, O_MAGIC))
- *t++ = '~';
- else {
- memmove(t, sp->repl, sp->repl_len);
- t += sp->repl_len;
- }
- break;
- case '.':
- case '[':
- case '*':
- if (O_ISSET(sp, O_MAGIC))
+ if (len > 1) {
+ --len;
+ switch (*++p) {
+ case '<':
+ memcpy(t,
+ RE_WSTART, sizeof(RE_WSTART) - 1);
+ t += sizeof(RE_WSTART) - 1;
+ break;
+ case '>':
+ memcpy(t,
+ RE_WSTOP, sizeof(RE_WSTOP) - 1);
+ t += sizeof(RE_WSTOP) - 1;
+ break;
+ case '~':
+ if (O_ISSET(sp, O_MAGIC))
+ *t++ = '~';
+ else {
+ memcpy(t,
+ sp->repl, sp->repl_len);
+ t += sp->repl_len;
+ }
+ break;
+ case '.':
+ case '[':
+ case '*':
+ if (O_ISSET(sp, O_MAGIC))
+ *t++ = '\\';
+ *t++ = *p;
+ break;
+ default:
*t++ = '\\';
- *t++ = *p;
- break;
- default:
+ *t++ = *p;
+ }
+ } else
*t++ = '\\';
- *t++ = *p;
- }
break;
case '~':
if (O_ISSET(sp, O_MAGIC)) {
- memmove(t, sp->repl, sp->repl_len);
+ memcpy(t, sp->repl, sp->repl_len);
t += sp->repl_len;
} else
*t++ = '~';
@@ -1137,10 +1159,9 @@ re_conv(sp, ptrnp, replacedp)
*t++ = *p;
break;
}
- *t = '\0';
*ptrnp = bp;
- *replacedp = 1;
+ *plenp = t - bp;
return (0);
}
@@ -1150,49 +1171,52 @@ re_conv(sp, ptrnp, replacedp)
* 1003.2 RE functions can handle.
*/
static int
-re_tag_conv(sp, ptrnp, replacedp)
+re_tag_conv(sp, ptrnp, plenp, replacedp)
SCR *sp;
char **ptrnp;
+ size_t *plenp;
int *replacedp;
{
size_t blen, len;
int lastdollar;
char *bp, *p, *t;
- *replacedp = 0;
-
- len = strlen(p = *ptrnp);
+ len = *plenp;
/* Max memory usage is 2 times the length of the string. */
+ *replacedp = 1;
GET_SPACE_RET(sp, bp, blen, len * 2);
+ p = *ptrnp;
t = bp;
- /* The last character is a '/' or '?', we just strip it. */
- if (p[len - 1] == '/' || p[len - 1] == '?')
- p[len - 1] = '\0';
+ /* If the last character is a '/' or '?', we just strip it. */
+ if (len > 0 && (p[len - 1] == '/' || p[len - 1] == '?'))
+ --len;
- /* The next-to-last character is a '$', and it's magic. */
- if (p[len - 2] == '$') {
+ /* If the next-to-last or last character is a '$', it's magic. */
+ if (len > 0 && p[len - 1] == '$') {
+ --len;
lastdollar = 1;
- p[len - 2] = '\0';
} else
lastdollar = 0;
- /* The first character is a '/' or '?', we just strip it. */
- if (p[0] == '/' || p[0] == '?')
+ /* If the first character is a '/' or '?', we just strip it. */
+ if (len > 0 && (p[0] == '/' || p[0] == '?')) {
++p;
+ --len;
+ }
- /* The second character is a '^', and it's magic. */
+ /* If the first or second character is a '^', it's magic. */
if (p[0] == '^')
*t++ = *p++;
/*
- * Escape every other magic character we can find, stripping the
- * backslashes ctags inserts to escape the search delimiter
+ * Escape every other magic character we can find, meanwhile stripping
+ * the backslashes ctags inserts when escaping the search delimiter
* characters.
*/
- while (p[0]) {
+ for (; len > 0; --len) {
/* Ctags escapes the search delimiter characters. */
if (p[0] == '\\' && (p[1] == '/' || p[1] == '?'))
++p;
@@ -1202,10 +1226,9 @@ re_tag_conv(sp, ptrnp, replacedp)
}
if (lastdollar)
*t++ = '$';
- *t++ = '\0';
*ptrnp = bp;
- *replacedp = 1;
+ *plenp = t - bp;
return (0);
}
@@ -1215,54 +1238,57 @@ re_tag_conv(sp, ptrnp, replacedp)
* 1003.2 RE functions can handle.
*/
static int
-re_cscope_conv(sp, ptrnp, replacedp)
+re_cscope_conv(sp, ptrnp, plenp, replacedp)
SCR *sp;
char **ptrnp;
+ size_t *plenp;
int *replacedp;
{
size_t blen, len, nspaces;
- char *bp, *p, *re;
+ char *bp, *p, *t;
/*
* Each space in the source line printed by cscope represents an
* arbitrary sequence of spaces, tabs, and comments.
*/
#define CSCOPE_RE_SPACE "([ \t]|/\\*([^*]|\\*/)*\\*/)*"
- for (nspaces = 0, p = *ptrnp; *p != '\0'; ++p)
+ for (nspaces = 0, p = *ptrnp, len = *plenp; len > 0; ++p, --len)
if (*p == ' ')
++nspaces;
/*
* Allocate plenty of space:
- * the string, plus potential escaping characters
- * nspaces + 2 copies of CSCOPE_RE_SPACE
- * ^, $, nul terminator characters
+ * the string, plus potential escaping characters;
+ * nspaces + 2 copies of CSCOPE_RE_SPACE;
+ * ^, $, nul terminator characters.
*/
+ *replacedp = 1;
len = (p - *ptrnp) * 2 + (nspaces + 2) * sizeof(CSCOPE_RE_SPACE) + 3;
GET_SPACE_RET(sp, bp, blen, len);
- p = bp;
- *p++ = '^';
- memcpy(p, CSCOPE_RE_SPACE, sizeof(CSCOPE_RE_SPACE) - 1);
- p += sizeof(CSCOPE_RE_SPACE) - 1;
+ p = *ptrnp;
+ t = bp;
- for (re = *ptrnp; *re != '\0'; ++re)
- if (*re == ' ') {
- memcpy(p, CSCOPE_RE_SPACE, sizeof(CSCOPE_RE_SPACE) - 1);
- p += sizeof(CSCOPE_RE_SPACE) - 1;
+ *t++ = '^';
+ memcpy(t, CSCOPE_RE_SPACE, sizeof(CSCOPE_RE_SPACE) - 1);
+ t += sizeof(CSCOPE_RE_SPACE) - 1;
+
+ for (len = *plenp; len > 0; ++p, --len)
+ if (*p == ' ') {
+ memcpy(t, CSCOPE_RE_SPACE, sizeof(CSCOPE_RE_SPACE) - 1);
+ t += sizeof(CSCOPE_RE_SPACE) - 1;
} else {
- if (strchr("\\^.[]$*", *re))
- *p++ = '\\';
- *p++ = *re;
+ if (strchr("\\^.[]$*", *p))
+ *t++ = '\\';
+ *t++ = *p;
}
- memcpy(p, CSCOPE_RE_SPACE, sizeof(CSCOPE_RE_SPACE) - 1);
- p += sizeof(CSCOPE_RE_SPACE) - 1;
- *p++ = '$';
- *p = '\0';
+ memcpy(t, CSCOPE_RE_SPACE, sizeof(CSCOPE_RE_SPACE) - 1);
+ t += sizeof(CSCOPE_RE_SPACE) - 1;
+ *t++ = '$';
*ptrnp = bp;
- *replacedp = 1;
+ *plenp = t - bp;
return (0);
}
@@ -1334,10 +1360,10 @@ re_sub(sp, ip, lbp, lbclenp, lblenp, match)
* Otherwise, since this is the lowest level of replacement, discard
* all escape characters. This (hopefully) follows historic practice.
*/
-#define OUTCH(ch) { \
+#define OUTCH(ch, nltrans) { \
CHAR_T __ch = (ch); \
u_int __value = KEY_VAL(sp, __ch); \
- if (__value == K_CR || __value == K_NL) { \
+ if (nltrans && (__value == K_CR || __value == K_NL)) { \
NEEDNEWLINE(sp); \
sp->newl[sp->newl_cnt++] = lbclen; \
} else if (conv != C_NOTSET) { \
@@ -1393,7 +1419,7 @@ subzero: if (match[no].rm_so == -1 ||
break;
mlen = match[no].rm_eo - match[no].rm_so;
for (t = ip + match[no].rm_so; mlen--; ++t)
- OUTCH(*t);
+ OUTCH(*t, 0);
continue;
case 'e':
case 'E':
@@ -1421,7 +1447,7 @@ subzero: if (match[no].rm_so == -1 ||
break;
}
}
- OUTCH(ch);
+ OUTCH(ch, 1);
}
*lbp = lb; /* Update caller's information. */
diff --git a/usr.bin/vi/ex/ex_tag.c b/usr.bin/vi/ex/ex_tag.c
index 002e27246af..3d0c60e94cf 100644
--- a/usr.bin/vi/ex/ex_tag.c
+++ b/usr.bin/vi/ex/ex_tag.c
@@ -13,7 +13,7 @@
#include "config.h"
#ifndef lint
-static const char sccsid[] = "@(#)ex_tag.c 10.32 (Berkeley) 5/16/96";
+static const char sccsid[] = "@(#)ex_tag.c 10.35 (Berkeley) 6/30/96";
#endif /* not lint */
#include <sys/param.h>
@@ -45,7 +45,7 @@ static const char sccsid[] = "@(#)ex_tag.c 10.32 (Berkeley) 5/16/96";
static char *binary_search __P((char *, char *, char *));
static int compare __P((char *, char *, char *));
static void ctag_file __P((SCR *, TAGF *, char *, char **, size_t *));
-static int ctag_search __P((SCR *, char *, char *));
+static int ctag_search __P((SCR *, char *, size_t, char *));
static int ctag_sfile __P((SCR *, TAGF *, TAGQ *, char *));
static TAGQ *ctag_slist __P((SCR *, char *));
static char *linear_search __P((char *, char *, char *));
@@ -195,7 +195,8 @@ ex_tag_push(sp, cmdp)
/* Link the new TAGQ structure into place. */
CIRCLEQ_INSERT_HEAD(&exp->tq, tqp, q);
- (void)ctag_search(sp, tqp->current->search, tqp->tag);
+ (void)ctag_search(sp,
+ tqp->current->search, tqp->current->slen, tqp->tag);
/*
* Move the current context from the temporary save area into the
@@ -258,7 +259,7 @@ ex_tag_next(sp, cmdp)
if (F_ISSET(tqp, TAG_CSCOPE))
(void)cscope_search(sp, tqp, tp);
else
- (void)ctag_search(sp, tp->search, tqp->tag);
+ (void)ctag_search(sp, tp->search, tp->slen, tqp->tag);
return (0);
}
@@ -293,7 +294,7 @@ ex_tag_prev(sp, cmdp)
if (F_ISSET(tqp, TAG_CSCOPE))
(void)cscope_search(sp, tqp, tp);
else
- (void)ctag_search(sp, tp->search, tqp->tag);
+ (void)ctag_search(sp, tp->search, tp->slen, tqp->tag);
return (0);
}
@@ -798,7 +799,13 @@ tagq_free(sp, tqp)
CIRCLEQ_REMOVE(&tqp->tagq, tp, q);
free(tp);
}
- CIRCLEQ_REMOVE(&exp->tq, tqp, q);
+ /*
+ * !!!
+ * If allocated and then the user failed to switch files, the TAGQ
+ * structure was never attached to any list.
+ */
+ if (tqp->q.cqe_next != NULL)
+ CIRCLEQ_REMOVE(&exp->tq, tqp, q);
free(tqp);
return (0);
}
@@ -817,7 +824,8 @@ tag_msg(sp, msg, tag)
{
switch (msg) {
case TAG_BADLNO:
- msgq_str(sp, M_ERR, tag, "164|%s: the tag line doesn't exist");
+ msgq_str(sp, M_ERR, tag,
+ "164|%s: the tag's line number is past the end of the file");
break;
case TAG_EMPTY:
msgq(sp, M_INFO, "165|The tags stack is empty");
@@ -904,9 +912,10 @@ ex_tag_free(sp)
* Search a file for a tag.
*/
static int
-ctag_search(sp, search, tag)
+ctag_search(sp, search, slen, tag)
SCR *sp;
char *search, *tag;
+ size_t slen;
{
MARK m;
char *p;
@@ -931,15 +940,12 @@ ctag_search(sp, search, tag)
m.lno = 1;
m.cno = 0;
if (f_search(sp, &m, &m,
- search, NULL, SEARCH_FILE | SEARCH_TAG))
+ search, slen, NULL, SEARCH_FILE | SEARCH_TAG))
if ((p = strrchr(search, '(')) != NULL) {
- p[1] = '\0';
- if (f_search(sp, &m, &m,
- search, NULL, SEARCH_FILE | SEARCH_TAG)) {
- p[1] = '(';
+ slen = p - search;
+ if (f_search(sp, &m, &m, search, slen,
+ NULL, SEARCH_FILE | SEARCH_TAG))
goto notfound;
- }
- p[1] = '(';
} else {
notfound: tag_msg(sp, TAG_SEARCH, tag);
return (1);
diff --git a/usr.bin/vi/ex/ex_txt.c b/usr.bin/vi/ex/ex_txt.c
index 106eaeeef62..399a7c958d8 100644
--- a/usr.bin/vi/ex/ex_txt.c
+++ b/usr.bin/vi/ex/ex_txt.c
@@ -10,7 +10,7 @@
#include "config.h"
#ifndef lint
-static const char sccsid[] = "@(#)ex_txt.c 10.13 (Berkeley) 3/6/96";
+static const char sccsid[] = "@(#)ex_txt.c 10.14 (Berkeley) 6/30/96";
#endif /* not lint */
#include <sys/types.h>
@@ -122,6 +122,7 @@ newtp: if ((tp = text_init(sp, NULL, 0, 32)) == NULL)
case E_ERR:
goto err;
case E_REPAINT:
+ case E_WRESIZE:
continue;
case E_EOF:
rval = 1;
diff --git a/usr.bin/vi/ex/ex_util.c b/usr.bin/vi/ex/ex_util.c
index bed242dffdb..6c4772e6154 100644
--- a/usr.bin/vi/ex/ex_util.c
+++ b/usr.bin/vi/ex/ex_util.c
@@ -10,7 +10,7 @@
#include "config.h"
#ifndef lint
-static const char sccsid[] = "@(#)ex_util.c 10.21 (Berkeley) 5/8/96";
+static const char sccsid[] = "@(#)ex_util.c 10.23 (Berkeley) 6/19/96";
#endif /* not lint */
#include <sys/types.h>
@@ -127,6 +127,8 @@ ex_ncheck(sp, force)
SCR *sp;
int force;
{
+ char **ap;
+
/*
* !!!
* Historic practice: quit! or two quit's done in succession
@@ -135,8 +137,11 @@ ex_ncheck(sp, force)
if (!force && sp->ccnt != sp->q_ccnt + 1 &&
sp->cargv != NULL && sp->cargv[1] != NULL) {
sp->q_ccnt = sp->ccnt;
+
+ for (ap = sp->cargv + 1; *ap != NULL; ++ap);
msgq(sp, M_ERR,
-"167|More files to edit; use n[ext] to go to the next file, q[uit]! to quit");
+ "167|%d more files to edit", (ap - sp->cargv) - 1);
+
return (1);
}
return (0);
@@ -152,8 +157,13 @@ int
ex_init(sp)
SCR *sp;
{
- if (sp->gp->scr_screen(sp, SC_EX))
+ GS *gp;
+
+ gp = sp->gp;
+
+ if (gp->scr_screen(sp, SC_EX))
return (1);
+ (void)gp->scr_attr(sp, SA_ALTERNATE, 0);
sp->rows = O_VAL(sp, O_LINES);
sp->cols = O_VAL(sp, O_COLUMNS);
diff --git a/usr.bin/vi/ex/ex_version.c b/usr.bin/vi/ex/ex_version.c
index d48a379678c..bc92b680c64 100644
--- a/usr.bin/vi/ex/ex_version.c
+++ b/usr.bin/vi/ex/ex_version.c
@@ -10,7 +10,7 @@
#include "config.h"
#ifndef lint
-static const char sccsid[] = "@(#)ex_version.c 10.25 (Berkeley) 4/12/96";
+static const char sccsid[] = "@(#)ex_version.c 10.27 (Berkeley) 6/9/96";
#endif /* not lint */
#include <sys/types.h>
@@ -23,9 +23,24 @@ static const char sccsid[] = "@(#)ex_version.c 10.25 (Berkeley) 4/12/96";
#include "../common/common.h"
#include "version.h"
+#define BSDI_ADVERT \
+"\nBerkeley Software Design, Inc. (BSDI) is the commercial supplier of \
+the state-of-the-art BSD operating system, networking and Internet \
+technologies originally developed by the Computer Systems Research \
+Group (CSRG) at the University of California at Berkeley. BSDI's \
+BSD/OS represents over twenty years of development by the worldwide \
+BSD community. BSD technology is known for its flexible and portable \
+architecture and advanced development environments. Today, BSDI is \
+recognized for the strength of BSDI-powered systems in demanding \
+business and technical computing environments, the worldwide customer \
+acceptance of BSD-based technology, the know-how of BSDI's leading \
+computer scientists, and BSDI's focus on delivering and supporting \
+industrial-strength software for computing platforms. BSDI may be \
+contacted at info@bsdi.com or 1-800-800-4273."
+
/*
* ex_version -- :version
- * Display the program version.
+ * Display the program version and a shameless plug for BSDI.
*
* PUBLIC: int ex_version __P((SCR *, EXCMD *));
*/
@@ -34,6 +49,7 @@ ex_version(sp, cmdp)
SCR *sp;
EXCMD *cmdp;
{
- (void)ex_printf(sp, "%s\n", VI_VERSION);
+ msgq(sp, M_INFO, VI_VERSION);
+ msgq(sp, M_INFO, BSDI_ADVERT);
return (0);
}
diff --git a/usr.bin/vi/ex/ex_visual.c b/usr.bin/vi/ex/ex_visual.c
index 070c1fbc64c..82e503d4465 100644
--- a/usr.bin/vi/ex/ex_visual.c
+++ b/usr.bin/vi/ex/ex_visual.c
@@ -10,7 +10,7 @@
#include "config.h"
#ifndef lint
-static const char sccsid[] = "@(#)ex_visual.c 10.12 (Berkeley) 4/27/96";
+static const char sccsid[] = "@(#)ex_visual.c 10.13 (Berkeley) 6/28/96";
#endif /* not lint */
#include <sys/types.h>
@@ -119,7 +119,7 @@ nopush: /*
* already a reason to wait.
*/
if (!F_ISSET(sp, SC_SCR_EXWROTE))
- F_SET(sp, SC_EX_DONTWAIT);
+ F_SET(sp, SC_EX_WAIT_NO);
if (F_ISSET(sp, SC_EX_GLOBAL)) {
/*
diff --git a/usr.bin/vi/ex/ex_write.c b/usr.bin/vi/ex/ex_write.c
index b96c38a7a18..5ab94480229 100644
--- a/usr.bin/vi/ex/ex_write.c
+++ b/usr.bin/vi/ex/ex_write.c
@@ -10,7 +10,7 @@
#include "config.h"
#ifndef lint
-static const char sccsid[] = "@(#)ex_write.c 10.25 (Berkeley) 5/8/96";
+static const char sccsid[] = "@(#)ex_write.c 10.28 (Berkeley) 6/28/96";
#endif /* not lint */
#include <sys/types.h>
@@ -159,16 +159,24 @@ exwr(sp, cmdp, cmd)
return (1);
}
+ /* Expand the argument. */
for (++p; *p && isblank(*p); ++p);
if (*p == '\0') {
ex_emsg(sp, cmdp->cmd->usage, EXM_USAGE);
return (1);
}
- /* Expand the argument. */
if (argv_exp1(sp, cmdp, p, strlen(p), 1))
return (1);
/*
+ * Historically, vi waited after a write filter even if there
+ * wasn't any output from the command. People complained when
+ * nvi waited only if there was output, wanting the visual cue
+ * that the program hadn't written anything.
+ */
+ F_SET(sp, SC_EX_WAIT_YES);
+
+ /*
* !!!
* Ignore the return cursor position, the cursor doesn't
* move.
@@ -184,6 +192,10 @@ exwr(sp, cmdp, cmd)
return (0);
}
+ /* Set the FS_ALL flag if we're writing the entire file. */
+ if (cmdp->addr1.lno == 1 && !db_exist(sp, cmdp->addr2.lno + 1))
+ LF_SET(FS_ALL);
+
/* If "write >>" it's an append to a file. */
if (cmdp->argc != 0 && cmd != XIT && p[0] == '>' && p[1] == '>') {
LF_SET(FS_APPEND);
@@ -192,13 +204,10 @@ exwr(sp, cmdp, cmd)
for (p += 2; *p && isblank(*p); ++p);
}
- /* If no arguments, just write the file back. */
- if (cmdp->argc == 0 || *p == '\0') {
- if (F_ISSET(cmdp, E_ADDR2_ALL))
- LF_SET(FS_ALL);
+ /* If no other arguments, just write the file back. */
+ if (cmdp->argc == 0 || *p == '\0')
return (file_write(sp,
&cmdp->addr1, &cmdp->addr2, NULL, flags));
- }
/* Build an argv so we get an argument count and file expansion. */
if (argv_exp2(sp, cmdp, p, strlen(p)))
@@ -256,8 +265,6 @@ exwr(sp, cmdp, cmd)
return (1);
}
- if (F_ISSET(cmdp, E_ADDR2_ALL))
- LF_SET(FS_ALL);
return (file_write(sp, &cmdp->addr1, &cmdp->addr2, name, flags));
}
diff --git a/usr.bin/vi/ex/version.h b/usr.bin/vi/ex/version.h
index 252824808b0..96884b40dbb 100644
--- a/usr.bin/vi/ex/version.h
+++ b/usr.bin/vi/ex/version.h
@@ -1,2 +1,2 @@
#define VI_VERSION \
- "Version 1.66 (5/18/96) The CSRG, University of California, Berkeley."
+ "Version 1.71 (7/1/96) The CSRG, University of California, Berkeley."
diff --git a/usr.bin/vi/include/cl_extern.h b/usr.bin/vi/include/cl_extern.h
index 54540da67c7..3659343d454 100644
--- a/usr.bin/vi/include/cl_extern.h
+++ b/usr.bin/vi/include/cl_extern.h
@@ -19,7 +19,9 @@ void *newterm __P((const char *, FILE *, FILE *));
#ifndef HAVE_CURSES_SETUPTERM
void setupterm __P((char *, int, int *));
#endif
-#ifndef HAVE_CURSES_TIGETSTR
+#ifdef HAVE_CURSES_TIGETSTR
+char *tigetstr();
+#else
char *tigetstr __P((char *));
#endif
#ifndef HAVE_CURSES_TIGETSTR
@@ -51,4 +53,4 @@ int cl_fmap __P((SCR *, seq_t, CHAR_T *, size_t, CHAR_T *, size_t));
int cl_optchange __P((SCR *, int, char *, u_long *));
int cl_omesg __P((SCR *, CL_PRIVATE *, int));
int cl_ssize __P((SCR *, int, size_t *, size_t *, int *));
-void cl_putchar __P((int));
+int cl_putchar __P((int));
diff --git a/usr.bin/vi/include/common_extern.h b/usr.bin/vi/include/common_extern.h
index 8402805965e..ee526475f68 100644
--- a/usr.bin/vi/include/common_extern.h
+++ b/usr.bin/vi/include/common_extern.h
@@ -1,6 +1,64 @@
+#ifndef HAVE_BSEARCH
+void *bsearch __P((const void *, const void *, size_t,
+ size_t, int (*)(const void *, const void *)));
+#endif
+#ifndef HAVE_SETENV
+int setenv __P((const char *, const char *, int));
+#endif
+#ifndef HAVE_UNSETENV
+void unsetenv __P((const char *));
+#endif
+#ifndef HAVE_GETHOSTNAME
+int gethostname __P((char *, int));
+#endif
+#ifndef HAVE_GETOPT
+int getopt __P((int, char * const *, const char *));
+#endif
+#ifndef HAVE_MEMCHR
+void *memchr __P((const void *, int, size_t));
+#endif
+#ifndef HAVE_MEMCPY
+void *memcpy __P((void *, const void *, size_t));
+#endif
+#ifndef HAVE_MEMMOVE
+void *memmove __P((void *, const void *, size_t));
+#endif
+#ifndef HAVE_MEMSET
+void *memset __P((void *, int, size_t));
+#endif
+#ifndef HAVE_MKSTEMP
+int mkstemp __P((char *));
+#endif
+#ifndef HAVE_MMAP
+char *mmap __P((char *, size_t, int, int, int, off_t));
+#endif
+#ifndef HAVE_MMAP
+int munmap __P((char *, size_t));
+#endif
+#ifndef HAVE_SNPRINTF
+int snprintf __P((char *, size_t, const char *, ...));
+#endif
+#ifndef HAVE_STRDUP
+char *strdup __P((const char *));
+#endif
+#ifndef HAVE_STRERROR
+char *strerror __P((int));
+#endif
+#ifndef HAVE_STRPBRK
+char *strpbrk __P((const char *, const char *));
+#endif
#ifndef HAVE_STRSEP
char *strsep __P((char **, const char *));
#endif
+#ifndef HAVE_STRTOL
+long strtol __P((const char *, char **, int));
+#endif
+#ifndef HAVE_STRTOUL
+unsigned long strtoul __P((const char *, char **, int));
+#endif
+#ifndef HAVE_VSNPRINTF
+int vsnprintf __P((char *, size_t, const char *, ...));
+#endif
SCR *api_fscreen __P((int, char *));
int api_aline __P((SCR *, recno_t, char *, size_t));
int api_dline __P((SCR *, recno_t));
@@ -74,7 +132,7 @@ int mark_set __P((SCR *, ARG_CHAR_T, MARK *, int));
int mark_insdel __P((SCR *, lnop_t, recno_t));
void msgq __P((SCR *, mtype_t, const char *, ...));
void msgq_str __P((SCR *, mtype_t, char *, char *));
-void msgq_rpt __P((SCR *));
+void mod_rpt __P((SCR *));
void msgq_status __P((SCR *, recno_t, u_int));
int msg_open __P((SCR *, char *));
void msg_close __P((GS *));
@@ -106,6 +164,7 @@ int f_w300 __P((SCR *, OPTION *, char *, u_long *));
int f_w1200 __P((SCR *, OPTION *, char *, u_long *));
int f_w9600 __P((SCR *, OPTION *, char *, u_long *));
int f_window __P((SCR *, OPTION *, char *, u_long *));
+int f_windowname __P((SCR *, OPTION *, char *, u_long *));
int put __P((SCR *, CB *, CHAR_T *, MARK *, MARK *, int));
int rcv_tmp __P((SCR *, EXF *, char *));
int rcv_init __P((SCR *));
@@ -115,8 +174,10 @@ int rcv_read __P((SCR *, FREF *));
int screen_init __P((GS *, SCR *, SCR **));
int screen_end __P((SCR *));
SCR *screen_next __P((SCR *));
-int f_search __P((SCR *, MARK *, MARK *, char *, char **, u_int));
-int b_search __P((SCR *, MARK *, MARK *, char *, char **, u_int));
+int f_search __P((SCR *,
+ MARK *, MARK *, char *, size_t, char **, u_int));
+int b_search __P((SCR *,
+ MARK *, MARK *, char *, size_t, char **, u_int));
void search_busy __P((SCR *, busy_t));
int seq_set __P((SCR *, CHAR_T *,
size_t, CHAR_T *, size_t, CHAR_T *, size_t, seq_t, int));
diff --git a/usr.bin/vi/include/ex_extern.h b/usr.bin/vi/include/ex_extern.h
index aed208c9264..2159c4713f6 100644
--- a/usr.bin/vi/include/ex_extern.h
+++ b/usr.bin/vi/include/ex_extern.h
@@ -89,7 +89,7 @@ int ex_s __P((SCR *, EXCMD *));
int ex_subagain __P((SCR *, EXCMD *));
int ex_subtilde __P((SCR *, EXCMD *));
int re_compile __P((SCR *,
- char *, char **, size_t *, regex_t *, u_int));
+ char *, size_t, char **, size_t *, regex_t *, u_int));
void re_error __P((SCR *, int, regex_t *));
int ex_tag_first __P((SCR *, char *));
int ex_tag_push __P((SCR *, EXCMD *));
diff --git a/usr.bin/vi/include/ip_extern.h b/usr.bin/vi/include/ip_extern.h
new file mode 100644
index 00000000000..b805343a8e8
--- /dev/null
+++ b/usr.bin/vi/include/ip_extern.h
@@ -0,0 +1,23 @@
+int ip_addstr __P((SCR *, const char *, size_t));
+int ip_attr __P((SCR *, scr_attr_t, int));
+int ip_baud __P((SCR *, u_long *));
+int ip_bell __P((SCR *));
+void ip_busy __P((SCR *, const char *, busy_t));
+int ip_clrtoeol __P((SCR *));
+int ip_cursor __P((SCR *, size_t *, size_t *));
+int ip_deleteln __P((SCR *));
+int ip_ex_adjust __P((SCR *, exadj_t));
+int ip_insertln __P((SCR *));
+int ip_keyval __P((SCR *, scr_keyval_t, CHAR_T *, int *));
+int ip_move __P((SCR *, size_t, size_t));
+int ip_refresh __P((SCR *, int));
+int ip_rename __P((SCR *));
+int ip_suspend __P((SCR *, int *));
+void ip_usage __P((void));
+int ip_event __P((SCR *, EVENT *, u_int32_t, int));
+int ip_screen __P((SCR *, u_int32_t));
+int ip_quit __P((GS *));
+int ip_term_init __P((SCR *));
+int ip_term_end __P((GS *));
+int ip_fmap __P((SCR *, seq_t, CHAR_T *, size_t, CHAR_T *, size_t));
+int ip_optchange __P((SCR *, int, char *, u_long *));
diff --git a/usr.bin/vi/include/options_def.h b/usr.bin/vi/include/options_def.h
index 7e0e7cfcf62..dd4af676dd9 100644
--- a/usr.bin/vi/include/options_def.h
+++ b/usr.bin/vi/include/options_def.h
@@ -70,8 +70,9 @@
#define O_W9600 69
#define O_WARN 70
#define O_WINDOW 71
-#define O_WRAPLEN 72
-#define O_WRAPMARGIN 73
-#define O_WRAPSCAN 74
-#define O_WRITEANY 75
-#define O_OPTIONCOUNT 76
+#define O_WINDOWNAME 72
+#define O_WRAPLEN 73
+#define O_WRAPMARGIN 74
+#define O_WRAPSCAN 75
+#define O_WRITEANY 76
+#define O_OPTIONCOUNT 77
diff --git a/usr.bin/vi/include/vi_extern.h b/usr.bin/vi/include/vi_extern.h
index 7483ddab651..fb50fac1383 100644
--- a/usr.bin/vi/include/vi_extern.h
+++ b/usr.bin/vi/include/vi_extern.h
@@ -116,7 +116,7 @@ void vs_home __P((SCR *));
void vs_update __P((SCR *, const char *, const char *));
void vs_msg __P((SCR *, mtype_t, char *, size_t));
int vs_ex_resolve __P((SCR *, int *));
-int vs_resolve __P((SCR *));
+int vs_resolve __P((SCR *, int));
int vs_repaint __P((SCR *, EVENT *));
int vs_refresh __P((SCR *, int));
int vs_column __P((SCR *, size_t *));
@@ -136,7 +136,7 @@ int vs_sm_position __P((SCR *, MARK *, u_long, pos_t));
recno_t vs_sm_nlines __P((SCR *, SMAP *, recno_t, size_t));
int vs_split __P((SCR *, SCR *, int));
int vs_discard __P((SCR *, SCR **));
-int vs_fg __P((SCR *, CHAR_T *));
+int vs_fg __P((SCR *, SCR **, CHAR_T *, int));
int vs_bg __P((SCR *));
int vs_swap __P((SCR *, SCR **, char *));
int vs_resize __P((SCR *, long, adj_t));
diff --git a/usr.bin/vi/vi/v_ex.c b/usr.bin/vi/vi/v_ex.c
index c44b059ec66..359080c656e 100644
--- a/usr.bin/vi/vi/v_ex.c
+++ b/usr.bin/vi/vi/v_ex.c
@@ -10,7 +10,7 @@
#include "config.h"
#ifndef lint
-static const char sccsid[] = "@(#)v_ex.c 10.38 (Berkeley) 4/28/96";
+static const char sccsid[] = "@(#)v_ex.c 10.42 (Berkeley) 6/28/96";
#endif /* not lint */
#include <sys/types.h>
@@ -64,12 +64,17 @@ v_exmode(sp, vp)
SCR *sp;
VICMD *vp;
{
+ GS *gp;
+
+ gp = sp->gp;
+
/* Try and switch screens -- the screen may not permit it. */
- if (sp->gp->scr_screen(sp, SC_EX)) {
+ if (gp->scr_screen(sp, SC_EX)) {
msgq(sp, M_ERR,
"207|The Q command requires the ex terminal interface");
return (1);
}
+ (void)gp->scr_attr(sp, SA_ALTERNATE, 0);
/* Save the current cursor position. */
sp->frp->lno = sp->lno;
@@ -341,9 +346,6 @@ v_event_exec(sp, vp)
case E_WRITE:
ex_cinit(&cmd, C_WRITE, 0, OOBLNO, OOBLNO, 0, NULL);
break;
- case E_WRITEQUIT:
- ex_cinit(&cmd, C_WQ, 0, OOBLNO, OOBLNO, 0, NULL);
- break;
default:
abort();
}
@@ -478,7 +480,7 @@ v_ex(sp, vp)
* that.
*/
if (do_resolution) {
- F_SET(sp, SC_EX_DONTWAIT);
+ F_SET(sp, SC_EX_WAIT_NO);
if (vs_ex_resolve(sp, &ifcontinue))
return (1);
}
@@ -527,6 +529,14 @@ v_ex_done(sp, vp)
vp->m_final.lno = sp->lno;
vp->m_final.cno = sp->cno;
+
+ /*
+ * Don't re-adjust the cursor after executing an ex command,
+ * and ex movements are permanent.
+ */
+ F_CLR(vp, VM_RCM_MASK);
+ F_SET(vp, VM_RCM_SET);
+
return (0);
}
diff --git a/usr.bin/vi/vi/v_replace.c b/usr.bin/vi/vi/v_replace.c
index 085690a26a3..a4712b683a9 100644
--- a/usr.bin/vi/vi/v_replace.c
+++ b/usr.bin/vi/vi/v_replace.c
@@ -10,7 +10,7 @@
#include "config.h"
#ifndef lint
-static const char sccsid[] = "@(#)v_replace.c 10.16 (Berkeley) 4/27/96";
+static const char sccsid[] = "@(#)v_replace.c 10.17 (Berkeley) 6/30/96";
#endif /* not lint */
#include <sys/types.h>
@@ -129,6 +129,10 @@ next: if (v_event_get(sp, &ev, 0, 0))
case E_INTERRUPT:
/* <interrupt> means they changed their minds. */
return (0);
+ case E_WRESIZE:
+ /* <resize> interrupts the input mode. */
+ v_emsg(sp, NULL, VIM_WRESIZE);
+ return (0);
case E_REPAINT:
if (vs_repaint(sp, &ev))
return (1);
diff --git a/usr.bin/vi/vi/v_search.c b/usr.bin/vi/vi/v_search.c
index dcf52bba732..94a53691613 100644
--- a/usr.bin/vi/vi/v_search.c
+++ b/usr.bin/vi/vi/v_search.c
@@ -10,7 +10,7 @@
#include "config.h"
#ifndef lint
-static const char sccsid[] = "@(#)v_search.c 10.16 (Berkeley) 5/8/96";
+static const char sccsid[] = "@(#)v_search.c 10.17 (Berkeley) 6/30/96";
#endif /* not lint */
#include <sys/types.h>
@@ -29,7 +29,7 @@ static const char sccsid[] = "@(#)v_search.c 10.16 (Berkeley) 5/8/96";
#include "vi.h"
static int v_exaddr __P((SCR *, VICMD *, dir_t));
-static int v_search __P((SCR *, VICMD *, char *, u_int, dir_t));
+static int v_search __P((SCR *, VICMD *, char *, size_t, u_int, dir_t));
/*
* v_srch -- [count]?RE[? offset]
@@ -85,7 +85,7 @@ v_exaddr(sp, vp, dir)
*/
if (F_ISSET(vp, VC_ISDOT))
return (v_search(sp, vp,
- NULL, SEARCH_PARSE | SEARCH_MSG | SEARCH_SET, dir));
+ NULL, 0, SEARCH_PARSE | SEARCH_MSG | SEARCH_SET, dir));
/* Get the search pattern. */
if (v_tcmd(sp, vp, dir == BACKWARD ? CH_BSEARCH : CH_FSEARCH,
@@ -123,8 +123,30 @@ v_exaddr(sp, vp, dir)
gp = sp->gp;
gp->excmd.cp = tp->lb;
gp->excmd.clen = tp->len;
- F_SET(&gp->excmd, E_VISEARCH);
+ F_INIT(&gp->excmd, E_VISEARCH);
+ /*
+ * XXX
+ * Warn if the search wraps. This is a pretty special case, but it's
+ * nice feature that wasn't in the original implementations of ex/vi.
+ * (It was added at some point to System V's version.) This message
+ * is only displayed if there are no keys in the queue. The problem is
+ * the command is going to succeed, and the message is informational,
+ * not an error. If a macro displays it repeatedly, e.g., the pattern
+ * only occurs once in the file and wrapscan is set, you lose big. For
+ * example, if the macro does something like:
+ *
+ * :map K /pattern/^MjK
+ *
+ * Each search will display the message, but the following "/pattern/"
+ * will immediately overwrite it, with strange results. The System V
+ * vi displays the "wrapped" message multiple times, but because it's
+ * overwritten each time, it's not as noticeable. As we don't discard
+ * messages, it's a real problem for us.
+ */
+ if (!KEYS_WAITING(sp))
+ F_SET(&gp->excmd, E_SEARCH_WMSG);
+
/* Save the current line/column. */
s_lno = sp->lno;
s_cno = sp->cno;
@@ -279,7 +301,7 @@ v_searchN(sp, vp)
dir = sp->searchdir;
break;
}
- return (v_search(sp, vp, NULL, SEARCH_PARSE, dir));
+ return (v_search(sp, vp, NULL, 0, SEARCH_PARSE, dir));
}
/*
@@ -293,7 +315,7 @@ v_searchn(sp, vp)
SCR *sp;
VICMD *vp;
{
- return (v_search(sp, vp, NULL, SEARCH_PARSE, sp->searchdir));
+ return (v_search(sp, vp, NULL, 0, SEARCH_PARSE, sp->searchdir));
}
/*
@@ -313,9 +335,9 @@ v_searchw(sp, vp)
len = VIP(sp)->klen + sizeof(RE_WSTART) + sizeof(RE_WSTOP);
GET_SPACE_RET(sp, bp, blen, len);
- (void)snprintf(bp, blen, "%s%s%s", RE_WSTART, VIP(sp)->keyw, RE_WSTOP);
+ len = snprintf(bp, blen, "%s%s%s", RE_WSTART, VIP(sp)->keyw, RE_WSTOP);
- rval = v_search(sp, vp, bp, SEARCH_SET, FORWARD);
+ rval = v_search(sp, vp, bp, len, SEARCH_SET, FORWARD);
FREE_SPACE(sp, bp, blen);
return (rval);
@@ -326,22 +348,37 @@ v_searchw(sp, vp)
* The search commands.
*/
static int
-v_search(sp, vp, ptrn, flags, dir)
+v_search(sp, vp, ptrn, plen, flags, dir)
SCR *sp;
VICMD *vp;
u_int flags;
char *ptrn;
+ size_t plen;
dir_t dir;
{
+ /* Display messages. */
+ LF_SET(SEARCH_MSG);
+
+ /* If it's a motion search, offset past end-of-line is okay. */
+ if (ISMOTION(vp))
+ LF_SET(SEARCH_EOL);
+
+ /*
+ * XXX
+ * Warn if the search wraps. See the comment above, in v_exaddr().
+ */
+ if (!KEYS_WAITING(sp))
+ LF_SET(SEARCH_WMSG);
+
switch (dir) {
case BACKWARD:
- if (b_search(sp, &vp->m_start, &vp->m_stop, ptrn, NULL,
- flags | SEARCH_MSG | (ISMOTION(vp) ? SEARCH_EOL : 0)))
+ if (b_search(sp,
+ &vp->m_start, &vp->m_stop, ptrn, plen, NULL, flags))
return (1);
break;
case FORWARD:
- if (f_search(sp, &vp->m_start, &vp->m_stop, ptrn, NULL,
- flags | SEARCH_MSG | (ISMOTION(vp) ? SEARCH_EOL : 0)))
+ if (f_search(sp,
+ &vp->m_start, &vp->m_stop, ptrn, plen, NULL, flags))
return (1);
break;
case NOTSET:
diff --git a/usr.bin/vi/vi/v_txt.c b/usr.bin/vi/vi/v_txt.c
index b60fa5400cc..0223a675f0b 100644
--- a/usr.bin/vi/vi/v_txt.c
+++ b/usr.bin/vi/vi/v_txt.c
@@ -10,7 +10,7 @@
#include "config.h"
#ifndef lint
-static const char sccsid[] = "@(#)v_txt.c 10.66 (Berkeley) 5/18/96";
+static const char sccsid[] = "@(#)v_txt.c 10.73 (Berkeley) 6/30/96";
#endif /* not lint */
#include <sys/types.h>
@@ -31,7 +31,7 @@ static const char sccsid[] = "@(#)v_txt.c 10.66 (Berkeley) 5/18/96";
#include "vi.h"
static int txt_abbrev __P((SCR *, TEXT *, CHAR_T *, int, int *, int *));
-static void txt_ai_resolve __P((SCR *, TEXT *));
+static void txt_ai_resolve __P((SCR *, TEXT *, int *));
static TEXT *txt_backup __P((SCR *, TEXTH *, TEXT *, u_int32_t *));
static int txt_dent __P((SCR *, TEXT *, int));
static int txt_emark __P((SCR *, TEXT *, size_t));
@@ -45,8 +45,7 @@ static int txt_map_end __P((SCR *));
static int txt_map_init __P((SCR *));
static int txt_margin __P((SCR *, TEXT *, TEXT *, int *, u_int32_t));
static void txt_nomorech __P((SCR *));
-static void txt_Rcleanup __P((SCR *,
- TEXTH *, TEXT *, const char *, const size_t));
+static void txt_Rcleanup __P((SCR *, TEXTH *, TEXT *, const size_t));
static int txt_resolve __P((SCR *, TEXTH *, u_int32_t));
static int txt_showmatch __P((SCR *, TEXT *));
static void txt_unmap __P((SCR *, TEXT *, u_int32_t *));
@@ -517,14 +516,17 @@ next: if (v_event_get(sp, evp, 0, ec_flags))
* Historically, <interrupt> exited the user from text input
* mode or cancelled a colon command, and returned to command
* mode. It also beeped the terminal, but that seems a bit
- * excessive. We also get resize events here, which mean that
- * our text structures may no longer be correct.
+ * excessive.
*/
goto k_escape;
case E_REPAINT:
if (vs_repaint(sp, &ev))
return (1);
goto next;
+ case E_WRESIZE:
+ /* <resize> interrupts the input mode. */
+ v_emsg(sp, NULL, VIM_WRESIZE);
+ goto k_escape;
default:
v_event_err(sp, evp);
goto k_escape;
@@ -536,18 +538,15 @@ next: if (v_event_get(sp, evp, 0, ec_flags))
* input. Note, it was okay to replay non-existent input. This was
* not documented as far as I know, and is a great test of vi clones.
*/
- if (LF_ISSET(TXT_REPLAY)) {
- LF_CLR(TXT_REPLAY);
- if (evp->e_c == '\0') {
- if (vip->rep == NULL)
- goto done;
+ if (!LF_ISSET(TXT_REPLAY) && evp->e_c == '\0') {
+ if (vip->rep == NULL)
+ goto done;
- rcol = 0;
- abb = AB_NOTSET;
- LF_CLR(TXT_RECORD);
- LF_SET(TXT_REPLAY);
- goto replay;
- }
+ rcol = 0;
+ abb = AB_NOTSET;
+ LF_CLR(TXT_RECORD);
+ LF_SET(TXT_REPLAY);
+ goto replay;
}
/*
@@ -880,7 +879,7 @@ k_escape: LINE_RESOLVE;
* characters, and making them into insert characters.
*/
if (LF_ISSET(TXT_REPLACE))
- txt_Rcleanup(sp, &sp->tiq, tp, lp, len);
+ txt_Rcleanup(sp, &sp->tiq, tp, len);
/*
* If there are any overwrite characters, copy down
@@ -1371,7 +1370,7 @@ resolve:/*
* command line or doing file name completion, resolve them.
*/
if ((vip->totalcount != 0 || F_ISSET(gp, G_BELLSCHED)) &&
- !F_ISSET(sp, SC_TINPUT_INFO) && !filec_redraw && vs_resolve(sp))
+ !F_ISSET(sp, SC_TINPUT_INFO) && !filec_redraw && vs_resolve(sp, 0))
return (1);
/*
@@ -1620,19 +1619,21 @@ txt_unmap(sp, tp, ec_flagsp)
/*
* txt_ai_resolve --
- * When a line is resolved by <esc> or <cr>, review autoindent
- * characters.
+ * When a line is resolved by <esc>, review autoindent characters.
*/
static void
-txt_ai_resolve(sp, tp)
+txt_ai_resolve(sp, tp, changedp)
SCR *sp;
TEXT *tp;
+ int *changedp;
{
u_long ts;
int del;
size_t cno, len, new, old, scno, spaces, tab_after_sp, tabs;
char *p;
+ *changedp = 0;
+
/*
* If the line is empty, has an offset, or no autoindent
* characters, we're done.
@@ -1700,6 +1701,7 @@ txt_ai_resolve(sp, tp)
*p++ = '\t';
while (spaces--)
*p++ = ' ';
+ *changedp = 1;
}
/*
@@ -1850,7 +1852,7 @@ txt_dent(sp, tp, isindent)
{
CHAR_T ch;
u_long sw, ts;
- size_t cno, current, spaces, target, tabs;
+ size_t cno, current, spaces, target, tabs, off;
int ai_reset;
ts = O_VAL(sp, O_TABSTOP);
@@ -1899,9 +1901,13 @@ txt_dent(sp, tp, isindent)
for (; tp->cno > tp->offset; --tp->cno, ++tp->owrite)
if (tp->lb[tp->cno - 1] == ' ')
--current;
- else if (tp->lb[tp->cno - 1] == '\t')
- current -= COL_OFF(current, ts);
- else
+ else if (tp->lb[tp->cno - 1] == '\t') {
+ off = COL_OFF(current, ts);
+ if (current > off)
+ current -= off;
+ else
+ current = 0;
+ } else
break;
/*
@@ -2182,7 +2188,7 @@ txt_fc_col(sp, argc, argv)
p = msg_print(sp, argv[base]->bp + prefix, &nf);
cnt = ex_printf(sp, "%s", p);
if (nf)
- FREE_SPACE(sp, p, 0);
+ FREE_SPACE(sp, (u_char **)p, 0);
CHK_INTR;
if ((base += numrows) >= argc)
break;
@@ -2502,7 +2508,6 @@ txt_isrch(sp, vp, tp, is_flagsp)
TEXT *tp;
u_int8_t *is_flagsp;
{
- CHAR_T savech;
MARK start;
recno_t lno;
u_int sf;
@@ -2544,10 +2549,6 @@ txt_isrch(sp, vp, tp, is_flagsp)
return (0);
}
- /* Nul terminate the search string. */
- savech = tp->lb[tp->cno];
- tp->lb[tp->cno] = '\0';
-
/*
* Remember the input line and discard the special input map,
* but don't overwrite the input line on the screen.
@@ -2574,8 +2575,10 @@ txt_isrch(sp, vp, tp, is_flagsp)
}
if (tp->lb[0] == '/' ?
- !f_search(sp, &start, &vp->m_final, tp->lb + 1, NULL, sf) :
- !b_search(sp, &start, &vp->m_final, tp->lb + 1, NULL, sf)) {
+ !f_search(sp,
+ &start, &vp->m_final, tp->lb + 1, tp->cno - 1, NULL, sf) :
+ !b_search(sp,
+ &start, &vp->m_final, tp->lb + 1, tp->cno - 1, NULL, sf)) {
sp->lno = vp->m_final.lno;
sp->cno = vp->m_final.cno;
FL_CLR(*is_flagsp, IS_RESTART);
@@ -2593,7 +2596,6 @@ txt_isrch(sp, vp, tp, is_flagsp)
/* Reset the line number of the input line. */
tp->lno = TMAP[0].lno;
- tp->lb[tp->cno] = savech;
/*
* If the colon command-line moved, i.e. the screen scrolled,
@@ -2624,23 +2626,33 @@ txt_resolve(sp, tiqh, flags)
VI_PRIVATE *vip;
TEXT *tp;
recno_t lno;
+ int changed;
/*
* The first line replaces a current line, and all subsequent lines
* are appended into the file. Resolve autoindented characters for
- * each line before committing it.
+ * each line before committing it. If the latter causes the line to
+ * change, we have to redisplay it, otherwise the information cached
+ * about the line will be wrong.
*/
vip = VIP(sp);
tp = tiqh->cqh_first;
+
if (LF_ISSET(TXT_AUTOINDENT))
- txt_ai_resolve(sp, tp);
- if (db_set(sp, tp->lno, tp->lb, tp->len))
+ txt_ai_resolve(sp, tp, &changed);
+ else
+ changed = 0;
+ if (db_set(sp, tp->lno, tp->lb, tp->len) ||
+ changed && vs_change(sp, tp->lno, LINE_RESET))
return (1);
for (lno = tp->lno; (tp = tp->q.cqe_next) != (void *)&sp->tiq; ++lno) {
if (LF_ISSET(TXT_AUTOINDENT))
- txt_ai_resolve(sp, tp);
- if (db_append(sp, 0, lno, tp->lb, tp->len))
+ txt_ai_resolve(sp, tp, &changed);
+ else
+ changed = 0;
+ if (db_append(sp, 0, lno, tp->lb, tp->len) ||
+ changed && vs_change(sp, tp->lno, LINE_RESET))
return (1);
}
@@ -2810,15 +2822,15 @@ txt_margin(sp, tp, wmtp, didbreak, flags)
* Resolve the input line for the 'R' command.
*/
static void
-txt_Rcleanup(sp, tiqh, tp, lp, olen)
+txt_Rcleanup(sp, tiqh, tp, olen)
SCR *sp;
TEXTH *tiqh;
TEXT *tp;
- const char *lp;
const size_t olen;
{
TEXT *ttp;
size_t ilen, tmp;
+ char *p;
/*
* Check to make sure that the cursor hasn't moved beyond
@@ -2849,7 +2861,9 @@ txt_Rcleanup(sp, tiqh, tp, lp, olen)
*/
if (ilen < olen) {
tmp = MIN(tp->owrite, olen - ilen);
- memmove(tp->lb + tp->cno, lp + ilen, tmp);
+ if (db_get(sp, tp->lno, DBG_FATAL | DBG_NOCACHE, &p, NULL))
+ return;
+ memmove(tp->lb + tp->cno, p + ilen, tmp);
tp->len -= tp->owrite - tmp;
tp->owrite = 0;
tp->insert += tmp;
diff --git a/usr.bin/vi/vi/v_util.c b/usr.bin/vi/vi/v_util.c
index 059c03e6727..c4c0daa901f 100644
--- a/usr.bin/vi/vi/v_util.c
+++ b/usr.bin/vi/vi/v_util.c
@@ -10,7 +10,7 @@
#include "config.h"
#ifndef lint
-static const char sccsid[] = "@(#)v_util.c 10.10 (Berkeley) 3/6/96";
+static const char sccsid[] = "@(#)v_util.c 10.11 (Berkeley) 6/30/96";
#endif /* not lint */
#include <sys/types.h>
@@ -170,6 +170,9 @@ v_emsg(sp, p, which)
which == VIM_NOCOM_B ? M_BERR : M_ERR,
"204|%s isn't a vi command", p);
break;
+ case VIM_WRESIZE:
+ msgq(sp, M_ERR, "Window resize interrupted text input mode");
+ break;
case VIM_USAGE:
msgq(sp, M_ERR, "205|Usage: %s", p);
break;
diff --git a/usr.bin/vi/vi/vi.c b/usr.bin/vi/vi/vi.c
index 0d410e4cce3..badc4abeec7 100644
--- a/usr.bin/vi/vi/vi.c
+++ b/usr.bin/vi/vi/vi.c
@@ -10,7 +10,7 @@
#include "config.h"
#ifndef lint
-static const char sccsid[] = "@(#)vi.c 10.47 (Berkeley) 5/18/96";
+static const char sccsid[] = "@(#)vi.c 10.52 (Berkeley) 6/30/96";
#endif /* not lint */
#include <sys/types.h>
@@ -90,7 +90,7 @@ vi(spp)
for (vip = VIP(sp), rval = 0;;) {
/* Resolve messages. */
- if (!MAPPED_KEYS_WAITING(sp) && vs_resolve(sp))
+ if (!MAPPED_KEYS_WAITING(sp) && vs_resolve(sp, 0))
goto ret;
/*
@@ -374,7 +374,7 @@ intr: CLR_INTERRUPT(sp);
* If the current screen is still displayed, it will
* want a new status line.
*/
- if (F_ISSET(sp, SC_STATUS) && vs_resolve(sp))
+ if (F_ISSET(sp, SC_STATUS) && vs_resolve(sp, 0))
goto ret;
/* Switch screens. */
@@ -575,12 +575,6 @@ v_cmd(sp, dp, vp, ismotion, comcountp, mappedp)
if (dp == NULL)
goto usage;
- /* A repeatable command must have been executed. */
- if (!F_ISSET(dp, VC_ISDOT)) {
- msgq(sp, M_ERR, "208|No command to repeat");
- return (GC_ERR);
- }
-
/*
* !!!
* If a '.' is immediately entered after an undo command, we
@@ -594,6 +588,12 @@ v_cmd(sp, dp, vp, ismotion, comcountp, mappedp)
return (GC_OK);
}
+ /* Otherwise, a repeatable command must have been executed. */
+ if (!F_ISSET(dp, VC_ISDOT)) {
+ msgq(sp, M_ERR, "208|No command to repeat");
+ return (GC_ERR);
+ }
+
/* Set new count/buffer, if any, and return. */
if (F_ISSET(vp, VC_C1SET)) {
F_SET(dp, VC_C1SET);
@@ -629,7 +629,7 @@ v_cmd(sp, dp, vp, ismotion, comcountp, mappedp)
/*
* Special case: '[', ']' and 'Z' commands. Doesn't the fact that
* the *single* characters don't mean anything but the *doubled*
- * characters do just frost your shorts?
+ * characters do, just frost your shorts?
*/
if (vp->key == '[' || vp->key == ']' || vp->key == 'Z') {
/*
@@ -637,8 +637,14 @@ v_cmd(sp, dp, vp, ismotion, comcountp, mappedp)
* cancelled by <escape>, the terminal was beeped instead.
* POSIX.2-1992 probably didn't notice, and requires that
* they be cancelled instead of beeping. Seems fine to me.
+ *
+ * Don't set the EC_MAPCOMMAND flag, apparently ] is a popular
+ * vi meta-character, and we don't want the user to wait while
+ * we time out a possible mapping. This *appears* to match
+ * historic vi practice, but with mapping characters, you Just
+ * Never Know.
*/
- KEY(key, EC_MAPCOMMAND);
+ KEY(key, 0);
if (vp->key != key) {
usage: if (ismotion == NULL)
@@ -917,13 +923,17 @@ static int
v_init(sp)
SCR *sp;
{
+ GS *gp;
VI_PRIVATE *vip;
+ gp = sp->gp;
vip = VIP(sp);
/* Switch into vi. */
- if (sp->gp->scr_screen(sp, SC_VI))
+ if (gp->scr_screen(sp, SC_VI))
return (1);
+ (void)gp->scr_attr(sp, SA_ALTERNATE, 1);
+
F_CLR(sp, SC_EX | SC_SCR_EX);
F_SET(sp, SC_VI);
@@ -1195,9 +1205,10 @@ v_key(sp, command_events, evp, ec_flags)
if (vs_repaint(sp, evp))
return (GC_FATAL);
break;
+ case E_WRESIZE:
+ return (GC_ERR);
case E_QUIT:
case E_WRITE:
- case E_WRITEQUIT:
if (command_events)
return (GC_EVENT);
/* FALLTHROUGH */
diff --git a/usr.bin/vi/vi/vi.h b/usr.bin/vi/vi/vi.h
index b674b1dc5e5..bede3a65181 100644
--- a/usr.bin/vi/vi/vi.h
+++ b/usr.bin/vi/vi/vi.h
@@ -6,7 +6,7 @@
*
* See the LICENSE file for redistribution information.
*
- * @(#)vi.h 10.18 (Berkeley) 5/4/96
+ * @(#)vi.h 10.19 (Berkeley) 6/30/96
*/
/* Definition of a vi "word". */
@@ -370,8 +370,8 @@ typedef enum {
/* Vi common error messages. */
typedef enum {
- VIM_COMBUF, VIM_EMPTY, VIM_EOF, VIM_EOL, VIM_NOCOM, VIM_NOCOM_B,
- VIM_USAGE
+ VIM_COMBUF, VIM_EMPTY, VIM_EOF, VIM_EOL,
+ VIM_NOCOM, VIM_NOCOM_B, VIM_USAGE, VIM_WRESIZE
} vim_t;
#include "vi_extern.h"
diff --git a/usr.bin/vi/vi/vs_msg.c b/usr.bin/vi/vi/vs_msg.c
index 0f268337221..adc7efb37c6 100644
--- a/usr.bin/vi/vi/vs_msg.c
+++ b/usr.bin/vi/vi/vs_msg.c
@@ -10,7 +10,7 @@
#include "config.h"
#ifndef lint
-static const char sccsid[] = "@(#)vs_msg.c 10.65 (Berkeley) 5/15/96";
+static const char sccsid[] = "@(#)vs_msg.c 10.73 (Berkeley) 6/28/96";
#endif /* not lint */
#include <sys/types.h>
@@ -38,8 +38,9 @@ typedef enum {
} sw_t;
static void vs_divider __P((SCR *));
-static void vs_output __P((SCR *, mtype_t, const char *, int));
static void vs_msgsave __P((SCR *, mtype_t, char *, size_t));
+static void vs_output __P((SCR *, mtype_t, const char *, int));
+static int vs_scr_resolve __P((SCR *, int));
static void vs_scroll __P((SCR *, int *, sw_t));
static void vs_wait __P((SCR *, int *, sw_t));
@@ -236,7 +237,7 @@ vs_msg(sp, mtype, line, len)
{
GS *gp;
VI_PRIVATE *vip;
- size_t oldx, oldy, padding;
+ size_t maxcols, oldx, oldy, padding;
const char *e, *s, *t;
gp = sp->gp;
@@ -275,8 +276,8 @@ vs_msg(sp, mtype, line, len)
* to respect that. Switch to ex mode long enough to put out the
* message.
*
- * If the SC_EX_DONTWAIT bit is set, turn it off -- we're writing,
- * so previous opinions should be ignored.
+ * If the SC_EX_WAIT_NO bit is set, turn it off -- we're writing to
+ * the screen, so previous opinions are ignored.
*/
if (F_ISSET(sp, SC_EX | SC_SCR_EXWROTE)) {
if (!F_ISSET(sp, SC_SCR_EX))
@@ -294,7 +295,7 @@ vs_msg(sp, mtype, line, len)
(void)gp->scr_attr(sp, SA_INVERSE, 0);
(void)fflush(stdout);
- F_CLR(sp, SC_EX_DONTWAIT);
+ F_CLR(sp, SC_EX_WAIT_NO);
if (!F_ISSET(sp, SC_SCR_EX))
(void)sp->gp->scr_screen(sp, SC_VI);
@@ -310,21 +311,6 @@ vs_msg(sp, mtype, line, len)
/* Save the cursor position. */
(void)gp->scr_cursor(sp, &oldy, &oldx);
- /*
- * If the message type is changing, terminate any previous message
- * and move to a new line.
- */
- if (mtype != vip->mtype) {
- if (vip->lcontinue != 0) {
- if (vip->mtype == M_NONE)
- vs_output(sp, vip->mtype, "\n", 1);
- else
- vs_output(sp, vip->mtype, ".\n", 2);
- vip->lcontinue = 0;
- }
- vip->mtype = mtype;
- }
-
/* If it's an ex output message, just write it out. */
if (mtype == M_NONE) {
vs_output(sp, mtype, line, len);
@@ -361,39 +347,41 @@ vs_msg(sp, mtype, line, len)
padding = 0;
padding += 2;
+ maxcols = sp->cols - 1;
if (vip->lcontinue != 0)
- if (len + vip->lcontinue + padding >= sp->cols)
- vs_output(sp, mtype, ".\n", 2);
+ if (len + vip->lcontinue + padding > maxcols)
+ vs_output(sp, vip->mtype, ".\n", 2);
else {
- vs_output(sp, mtype, ";", 1);
+ vs_output(sp, vip->mtype, ";", 1);
vs_output(sp, M_NONE, " ", 1);
}
- for (s = line; len > 0; s = t) {
- for (; isblank(*s) && --len != 0; ++s);
+ vip->mtype = mtype;
+ for (s = line;; s = t) {
+ for (; len > 0 && isblank(*s); --len, ++s);
if (len == 0)
break;
- if (len + vip->lcontinue > sp->cols) {
- for (e = s + (sp->cols - vip->lcontinue);
+ if (len + vip->lcontinue > maxcols) {
+ for (e = s + (maxcols - vip->lcontinue);
e > s && !isblank(*e); --e);
if (e == s)
- e = t = s + (sp->cols - vip->lcontinue);
+ e = t = s + (maxcols - vip->lcontinue);
else
for (t = e; isblank(e[-1]); --e);
- } else {
- e = s + len;
- /*
- * XXX:
- * If t isn't initialized for "s = t", len will be
- * equal to 0. Shut the freakin' compiler up.
- */
- t = s;
- }
- len -= e - s;
- if ((e - s) > 1 && s[(e - s) - 1] == '.')
+ } else
+ e = t = s + len;
+
+ /*
+ * If the message ends in a period, discard it, we want to
+ * gang messages where possible.
+ */
+ len -= t - s;
+ if (len == 0 && (e - s) > 1 && s[(e - s) - 1] == '.')
--e;
vs_output(sp, mtype, s, e - s);
+
if (len != 0)
vs_output(sp, M_NONE, "\n", 1);
+
if (INTERRUPTED(sp))
break;
}
@@ -549,50 +537,50 @@ vs_ex_resolve(sp, continuep)
vip = VIP(sp);
*continuep = 0;
- /* If we ran an ex command, we don't trust the cursor. */
+ /* If we ran any ex command, we can't trust the cursor position. */
F_SET(vip, VIP_CUR_INVALID);
+ /* Terminate any partially written message. */
+ if (vip->lcontinue != 0) {
+ vs_output(sp, vip->mtype, ".", 1);
+ vip->lcontinue = 0;
+
+ vip->mtype = M_NONE;
+ }
+
/*
* If we switched out of the vi screen into ex, switch back while we
* figure out what to do with the screen and potentially get another
* command to execute.
*
- * If we didn't switch into ex and only 0 or 1 lines of output, we may
- * be able to continue w/o making the user wait. First, if no lines of
- * output, we can simply return, leaving the line modifications report
- * to the next call to vs_resolve from the main vi loop. Else, output
- * that report and see if that pushes us over the edge. If it does, we
- * wait, else we can return, again leaving the line modification report
- * until later.
+ * If we didn't switch into ex, we're not required to wait, and less
+ * than 2 lines of output, we can continue without waiting for the
+ * wait.
*
- * Note, all other code paths require waiting, so those cases leave the
- * report of modified lines until later. As a result, groups of ex
- * commands will have cumulative line modification reports. That seems
- * right (well, at least not wrong) to me.
+ * Note, all other code paths require waiting, so we leave the report
+ * of modified lines until later, so that we won't wait for no other
+ * reason than a threshold number of lines were modified. This means
+ * we display cumulative line modification reports for groups of ex
+ * commands. That seems right to me (well, at least not wrong).
*/
if (F_ISSET(sp, SC_SCR_EXWROTE)) {
if (sp->gp->scr_screen(sp, SC_VI))
return (1);
- } else {
- if (vip->totalcount < 2) {
- if (vip->totalcount == 0) {
- F_CLR(sp, SC_EX_DONTWAIT);
- return (0);
- }
- msgq_rpt(sp);
- if (vip->totalcount < 2) {
- F_CLR(sp, SC_EX_DONTWAIT);
- return (0);
- }
+ } else
+ if (!F_ISSET(sp, SC_EX_WAIT_YES) && vip->totalcount < 2) {
+ F_CLR(sp, SC_EX_WAIT_NO);
+ return (0);
}
- }
+
+ /* Clear the required wait flag -- we're going to wait. */
+ F_CLR(sp, SC_EX_WAIT_YES);
/*
* Wait, unless explicitly told not to wait or the user interrupted
* the command. If the user is leaving the screen, for any reason,
* they can't continue with further ex commands.
*/
- if (!F_ISSET(sp, SC_EX_DONTWAIT) && !INTERRUPTED(sp)) {
+ if (!F_ISSET(sp, SC_EX_WAIT_NO) && !INTERRUPTED(sp)) {
wtype = F_ISSET(sp, SC_EXIT | SC_EXIT_FORCE |
SC_FSWITCH | SC_SSWITCH) ? SCROLL_W : SCROLL_W_EX;
if (F_ISSET(sp, SC_SCR_EXWROTE))
@@ -618,11 +606,14 @@ vs_ex_resolve(sp, continuep)
if (F_ISSET(vip, VIP_N_EX_REDRAW))
F_SET(sp, SC_SCR_REFORMAT);
+ /* Ex may have switched out of the alternate screen, return. */
+ (void)gp->scr_attr(sp, SA_ALTERNATE, 1);
+
/*
* Whew. We're finally back home, after what feels like years.
* Kiss the ground.
*/
- F_CLR(sp, SC_SCR_EXWROTE | SC_EX_DONTWAIT);
+ F_CLR(sp, SC_SCR_EXWROTE | SC_EX_WAIT_NO);
/*
* We may need to repaint some of the screen, e.g.:
@@ -630,8 +621,8 @@ vs_ex_resolve(sp, continuep)
* :set
* :!ls
*
- * gives us a combination of some lines that are "wrong", and a
- * need for a full refresh.
+ * gives us a combination of some lines that are "wrong", and a need
+ * for a full refresh.
*/
if (vip->totalcount > 1) {
/* Set up the redraw of the overwritten lines. */
@@ -654,16 +645,38 @@ vs_ex_resolve(sp, continuep)
/*
* vs_resolve --
- * Deal with message output.
+ * Cycle through each screen, dealing with message output.
*
* This routine is called from the main vi loop to periodically ensure that
* the user has seen any messages that have been displayed.
*
- * PUBLIC: int vs_resolve __P((SCR *));
+ * PUBLIC: int vs_resolve __P((SCR *, int));
*/
int
-vs_resolve(sp)
+vs_resolve(sp, forcewait)
+ SCR *sp;
+ int forcewait;
+{
+ SCR *tsp;
+
+ for (tsp = sp->gp->dq.cqh_first;
+ tsp != (void *)&sp->gp->dq; tsp = tsp->q.cqe_next)
+ if (vs_scr_resolve(tsp, forcewait))
+ return (1);
+ return (0);
+}
+
+/*
+ * vs_scr_resolve --
+ * Deal with message output.
+ *
+ * This routine is called from the main vi loop to periodically ensure that
+ * the user has seen any messages that have been displayed.
+ */
+static int
+vs_scr_resolve(sp, forcewait)
SCR *sp;
+ int forcewait;
{
EVENT ev;
GS *gp;
@@ -691,7 +704,7 @@ vs_resolve(sp)
}
/* Report on line modifications. */
- msgq_rpt(sp);
+ mod_rpt(sp);
/*
* Flush any saved messages. If the screen isn't ready, refresh
@@ -716,10 +729,16 @@ vs_resolve(sp)
redraw = 0;
break;
case 1:
- redraw = 0;
+ /*
+ * If we're switching screens, we have to wait for messages,
+ * regardless. If we don't wait, skip updating the modeline.
+ */
+ if (forcewait)
+ vs_scroll(sp, NULL, SCROLL_W);
+ else
+ F_SET(vip, VIP_S_MODELINE);
- /* Skip the modeline if it's in use. */
- F_SET(vip, VIP_S_MODELINE);
+ redraw = 0;
break;
default:
/*
@@ -732,6 +751,7 @@ vs_resolve(sp)
ev.e_flno = vip->totalcount >=
sp->rows ? 1 : sp->rows - vip->totalcount;
ev.e_tlno = sp->rows;
+
redraw = 1;
break;
}
diff --git a/usr.bin/vi/vi/vs_refresh.c b/usr.bin/vi/vi/vs_refresh.c
index e5b5df994e9..604fabc50e5 100644
--- a/usr.bin/vi/vi/vs_refresh.c
+++ b/usr.bin/vi/vi/vs_refresh.c
@@ -10,7 +10,7 @@
#include "config.h"
#ifndef lint
-static const char sccsid[] = "@(#)vs_refresh.c 10.35 (Berkeley) 5/7/96";
+static const char sccsid[] = "@(#)vs_refresh.c 10.37 (Berkeley) 6/12/96";
#endif /* not lint */
#include <sys/types.h>
@@ -144,7 +144,7 @@ vs_paint(sp, flags)
VI_PRIVATE *vip;
recno_t lastline, lcnt;
size_t cwtotal, cnt, len, notused, off, y;
- int ch, didpaint, isempty, leftright_warp;
+ int ch, didpaint, isempty, leftright_warp, shifted;
char *p;
#define LNO sp->lno /* Current file line. */
@@ -566,31 +566,47 @@ slow: for (smp = HMAP; smp->lno != LNO; ++smp);
/* Get the screen column for this character. */
cnt = vs_columns(sp, NULL, LNO, &CNO, NULL);
- /* Adjust the window toward the beginning of the line. */
+ shifted = 0;
+
+ /* Adjust the window towards the beginning of the line. */
off = smp->coff;
- while (off >= cnt)
- if (off >= O_VAL(sp, O_SIDESCROLL))
- off -= O_VAL(sp, O_SIDESCROLL);
- else {
- off = 0;
- break;
- }
+ if (off >= cnt) {
+ while (off >= cnt)
+ if (off >= O_VAL(sp, O_SIDESCROLL))
+ off -= O_VAL(sp, O_SIDESCROLL);
+ else {
+ off = 0;
+ break;
+ }
+ shifted = 1;
+ }
- /* Adjust the window toward the end of the line. */
+ /* Adjust the window towards the end of the line. */
if (off == 0 && off + SCREEN_COLS(sp) < cnt ||
- off != 0 && off + sp->cols < cnt)
- while (off + sp->cols < cnt)
- off += O_VAL(sp, O_SIDESCROLL);
+ off != 0 && off + sp->cols < cnt) {
+ while (off + sp->cols < cnt)
+ off += O_VAL(sp, O_SIDESCROLL);
+ shifted = 1;
+ }
/* Fill in screen map with the new offset. */
- if (F_ISSET(sp, SC_TINPUT_INFO))
- smp->coff = off;
- else {
- for (smp = HMAP; smp <= TMAP; ++smp)
+ if (shifted) {
+ if (F_ISSET(sp, SC_TINPUT_INFO))
smp->coff = off;
- leftright_warp = 1;
+ else {
+ for (smp = HMAP; smp <= TMAP; ++smp)
+ smp->coff = off;
+ leftright_warp = 1;
+ }
+ goto paint;
}
- goto paint;
+
+ /*
+ * We may have jumped here to adjust a leftright screen because
+ * redraw was set. If so, we have to paint the entire screen.
+ */
+ if (F_ISSET(sp, SC_SCR_REDRAW))
+ goto paint;
}
/*
diff --git a/usr.bin/vi/vi/vs_split.c b/usr.bin/vi/vi/vs_split.c
index 0d7a1b031a3..3257ead9d66 100644
--- a/usr.bin/vi/vi/vs_split.c
+++ b/usr.bin/vi/vi/vs_split.c
@@ -10,7 +10,7 @@
#include "config.h"
#ifndef lint
-static const char sccsid[] = "@(#)vs_split.c 10.24 (Berkeley) 5/4/96";
+static const char sccsid[] = "@(#)vs_split.c 10.28 (Berkeley) 6/30/96";
#endif /* not lint */
#include <sys/types.h>
@@ -27,6 +27,8 @@ static const char sccsid[] = "@(#)vs_split.c 10.24 (Berkeley) 5/4/96";
#include "../common/common.h"
#include "vi.h"
+static SCR *vs_getbg __P((SCR *, char *));
+
/*
* vs_split --
* Create a new screen.
@@ -51,6 +53,10 @@ vs_split(sp, new, ccl)
"222|Screen must be larger than %d lines to split", 4 - 1);
return (1);
}
+
+ /* Wait for any messages in the screen. */
+ vs_resolve(sp, 1);
+
half = sp->rows / 2;
if (ccl && half > 6)
half = 6;
@@ -258,31 +264,49 @@ vs_discard(sp, spp)
* vs_fg --
* Background the current screen, and foreground a new one.
*
- * PUBLIC: int vs_fg __P((SCR *, CHAR_T *));
+ * PUBLIC: int vs_fg __P((SCR *, SCR **, CHAR_T *, int));
*/
int
-vs_fg(csp, name)
- SCR *csp;
+vs_fg(sp, nspp, name, newscreen)
+ SCR *sp, **nspp;
CHAR_T *name;
+ int newscreen;
{
GS *gp;
- SCR *sp;
+ SCR *nsp;
- if (vs_swap(csp, &sp, name))
- return (1);
- if (sp == NULL) {
- msgq_str(csp, M_ERR, name,
+ gp = sp->gp;
+
+ if (newscreen)
+ /* Get the specified background screen. */
+ nsp = vs_getbg(sp, name);
+ else
+ /* Swap screens. */
+ if (vs_swap(sp, &nsp, name))
+ return (1);
+
+ if ((*nspp = nsp) == NULL) {
+ msgq_str(sp, M_ERR, name,
name == NULL ?
"223|There are no background screens" :
"224|There's no background screen editing a file named %s");
return (1);
}
- /* Move the old screen to the hidden queue. */
- gp = csp->gp;
- CIRCLEQ_REMOVE(&gp->dq, csp, q);
- CIRCLEQ_INSERT_TAIL(&gp->hq, csp, q);
+ if (newscreen) {
+ /* Remove the new screen from the background queue. */
+ CIRCLEQ_REMOVE(&gp->hq, nsp, q);
+ /* Split the screen; if we fail, hook the screen back in. */
+ if (vs_split(sp, nsp, 0)) {
+ CIRCLEQ_INSERT_TAIL(&gp->hq, nsp, q);
+ return (1);
+ }
+ } else {
+ /* Move the old screen to the background queue. */
+ CIRCLEQ_REMOVE(&gp->dq, sp, q);
+ CIRCLEQ_INSERT_TAIL(&gp->hq, sp, q);
+ }
return (0);
}
@@ -293,63 +317,57 @@ vs_fg(csp, name)
* PUBLIC: int vs_bg __P((SCR *));
*/
int
-vs_bg(csp)
- SCR *csp;
+vs_bg(sp)
+ SCR *sp;
{
GS *gp;
- SCR *sp;
+ SCR *nsp;
+
+ gp = sp->gp;
/* Try and join with another screen. */
- if (vs_discard(csp, &sp))
+ if (vs_discard(sp, &nsp))
return (1);
- if (sp == NULL) {
- msgq(csp, M_ERR,
+ if (nsp == NULL) {
+ msgq(sp, M_ERR,
"225|You may not background your only displayed screen");
return (1);
}
- /* Move the old screen to the hidden queue. */
- gp = csp->gp;
- CIRCLEQ_REMOVE(&gp->dq, csp, q);
- CIRCLEQ_INSERT_TAIL(&gp->hq, csp, q);
+ /* Move the old screen to the background queue. */
+ CIRCLEQ_REMOVE(&gp->dq, sp, q);
+ CIRCLEQ_INSERT_TAIL(&gp->hq, sp, q);
/* Toss the screen map. */
- free(_HMAP(csp));
- _HMAP(csp) = NULL;
+ free(_HMAP(sp));
+ _HMAP(sp) = NULL;
/* Switch screens. */
- csp->nextdisp = sp;
- F_SET(csp, SC_SSWITCH);
+ sp->nextdisp = nsp;
+ F_SET(sp, SC_SSWITCH);
return (0);
}
/*
* vs_swap --
- * Swap the current screen with a hidden one.
+ * Swap the current screen with a backgrounded one.
*
* PUBLIC: int vs_swap __P((SCR *, SCR **, char *));
*/
int
-vs_swap(csp, nsp, name)
- SCR *csp, **nsp;
+vs_swap(sp, nspp, name)
+ SCR *sp, **nspp;
char *name;
{
GS *gp;
- SCR *sp;
- int issmallscreen;
+ SCR *nsp;
- /* Find the screen, or, if name is NULL, the first screen. */
- gp = csp->gp;
- for (sp = gp->hq.cqh_first;
- sp != (void *)&gp->hq; sp = sp->q.cqe_next)
- if (name == NULL || !strcmp(sp->frp->name, name))
- break;
- if (sp == (void *)&gp->hq) {
- *nsp = NULL;
+ gp = sp->gp;
+
+ /* Get the specified background screen. */
+ if ((*nspp = nsp = vs_getbg(sp, name)) == NULL)
return (0);
- }
- *nsp = sp;
/*
* Save the old screen's cursor information.
@@ -358,25 +376,23 @@ vs_swap(csp, nsp, name)
* If called after file_end(), and the underlying file was a tmp
* file, it may have gone away.
*/
- if (csp->frp != NULL) {
- csp->frp->lno = csp->lno;
- csp->frp->cno = csp->cno;
- F_SET(csp->frp, FR_CURSORSET);
+ if (sp->frp != NULL) {
+ sp->frp->lno = sp->lno;
+ sp->frp->cno = sp->cno;
+ F_SET(sp->frp, FR_CURSORSET);
}
/* Switch screens. */
- csp->nextdisp = sp;
- F_SET(csp, SC_SSWITCH);
+ sp->nextdisp = nsp;
+ F_SET(sp, SC_SSWITCH);
/* Initialize terminal information. */
- VIP(sp)->srows = VIP(csp)->srows;
-
- issmallscreen = IS_SMALL(sp);
+ VIP(nsp)->srows = VIP(sp)->srows;
/* Initialize screen information. */
- sp->cols = csp->cols;
- sp->rows = csp->rows; /* XXX: Only place in vi that sets rows. */
- sp->woff = csp->woff;
+ nsp->cols = sp->cols;
+ nsp->rows = sp->rows; /* XXX: Only place in vi that sets rows. */
+ nsp->woff = sp->woff;
/*
* Small screens: see vs_refresh.c, section 6a.
@@ -385,43 +401,43 @@ vs_swap(csp, nsp, name)
* old one, so use them. Make sure that text counts aren't larger
* than the new screen sizes.
*/
- if (issmallscreen) {
- sp->t_minrows = sp->t_rows = O_VAL(sp, O_WINDOW);
- if (sp->t_rows > csp->t_maxrows)
- sp->t_rows = sp->t_maxrows;
- if (sp->t_minrows > csp->t_maxrows)
- sp->t_minrows = sp->t_maxrows;
+ if (IS_SMALL(nsp)) {
+ nsp->t_minrows = nsp->t_rows = O_VAL(nsp, O_WINDOW);
+ if (nsp->t_rows > sp->t_maxrows)
+ nsp->t_rows = nsp->t_maxrows;
+ if (nsp->t_minrows > sp->t_maxrows)
+ nsp->t_minrows = nsp->t_maxrows;
} else
- sp->t_rows = sp->t_maxrows = sp->t_minrows = sp->rows - 1;
+ nsp->t_rows = nsp->t_maxrows = nsp->t_minrows = nsp->rows - 1;
/* Reset the length of the default scroll. */
- sp->defscroll = sp->t_maxrows / 2;
+ nsp->defscroll = nsp->t_maxrows / 2;
/* Allocate a new screen map. */
- CALLOC_RET(sp, HMAP, SMAP *, SIZE_HMAP(sp), sizeof(SMAP));
- TMAP = HMAP + (sp->t_rows - 1);
+ CALLOC_RET(nsp, _HMAP(nsp), SMAP *, SIZE_HMAP(nsp), sizeof(SMAP));
+ _TMAP(nsp) = _HMAP(nsp) + (nsp->t_rows - 1);
/* Fill the map. */
- if (vs_sm_fill(sp, sp->lno, P_FILL))
+ if (vs_sm_fill(nsp, nsp->lno, P_FILL))
return (1);
/*
* The new screen replaces the old screen in the parent/child list.
* We insert the new screen after the old one. If we're exiting,
* the exit will delete the old one, if we're foregrounding, the fg
- * code will move the old one to the hidden queue.
+ * code will move the old one to the background queue.
*/
- CIRCLEQ_REMOVE(&gp->hq, sp, q);
- CIRCLEQ_INSERT_AFTER(&gp->dq, csp, sp, q);
+ CIRCLEQ_REMOVE(&gp->hq, nsp, q);
+ CIRCLEQ_INSERT_AFTER(&gp->dq, sp, nsp, q);
/*
* Don't change the screen's cursor information other than to
* note that the cursor is wrong.
*/
- F_SET(VIP(sp), VIP_CUR_INVALID);
+ F_SET(VIP(nsp), VIP_CUR_INVALID);
/* Draw the new screen from scratch, and add a status line. */
- F_SET(sp, SC_SCR_REDRAW | SC_STATUS);
+ F_SET(nsp, SC_SCR_REDRAW | SC_STATUS);
return (0);
}
@@ -526,3 +542,49 @@ toosmall: msgq(sp, M_BERR,
return (0);
}
+
+/*
+ * vs_getbg --
+ * Get the specified background screen, or, if name is NULL, the first
+ * background screen.
+ */
+static SCR *
+vs_getbg(sp, name)
+ SCR *sp;
+ char *name;
+{
+ GS *gp;
+ SCR *nsp;
+ char *p;
+
+ gp = sp->gp;
+
+ /* If name is NULL, return the first background screen on the list. */
+ if (name == NULL) {
+ nsp = gp->hq.cqh_first;
+ return (nsp == (void *)&gp->hq ? NULL : nsp);
+ }
+
+ /* Search for a full match. */
+ for (nsp = gp->hq.cqh_first;
+ nsp != (void *)&gp->hq; nsp = nsp->q.cqe_next)
+ if (!strcmp(nsp->frp->name, name))
+ break;
+ if (nsp != (void *)&gp->hq)
+ return (nsp);
+
+ /* Search for a last-component match. */
+ for (nsp = gp->hq.cqh_first;
+ nsp != (void *)&gp->hq; nsp = nsp->q.cqe_next) {
+ if ((p = strrchr(nsp->frp->name, '/')) == NULL)
+ p = nsp->frp->name;
+ else
+ ++p;
+ if (!strcmp(p, name))
+ break;
+ }
+ if (nsp != (void *)&gp->hq)
+ return (nsp);
+
+ return (NULL);
+}