aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSean Eric Fagan <sef@FreeBSD.org>1994-08-16 23:36:45 +0000
committerSean Eric Fagan <sef@FreeBSD.org>1994-08-16 23:36:45 +0000
commit18fd508d0161c9fe62f7563d3ae9681fa0cade2e (patch)
treef7f1cc01b7d9f04f19bfc16853d3e1be207a8ffc
downloadsrc-18fd508d0161c9fe62f7563d3ae9681fa0cade2e.tar.gz
src-18fd508d0161c9fe62f7563d3ae9681fa0cade2e.zip
Latest public release of nvi, from Keith Bostic. I hope I got thisvendor/nvi/1.32
right ;). Reviewed by: Sean Eric Fagan
Notes
Notes: svn path=/cvs2svn/branches/nvi/; revision=2081 svn path=/cvs2svn/tags/nvi_1_32/; revision=2083; tag=vendor/nvi/1.32
-rw-r--r--usr.bin/vi/Makefile3
-rw-r--r--usr.bin/vi/USD.doc/edit/Makefile18
-rw-r--r--usr.bin/vi/USD.doc/edit/edit.vindex115
-rw-r--r--usr.bin/vi/USD.doc/edit/edittut.ms2322
-rw-r--r--usr.bin/vi/USD.doc/exref/Makefile14
-rw-r--r--usr.bin/vi/USD.doc/exref/ex.rm2230
-rw-r--r--usr.bin/vi/USD.doc/exref/ex.summary734
-rw-r--r--usr.bin/vi/USD.doc/vi.man/Makefile14
-rw-r--r--usr.bin/vi/USD.doc/vi.man/vi.0798
-rw-r--r--usr.bin/vi/USD.doc/vi.man/vi.0.ps1063
-rw-r--r--usr.bin/vi/USD.doc/vi.man/vi.11294
-rw-r--r--usr.bin/vi/USD.doc/vi.ref/Makefile25
-rw-r--r--usr.bin/vi/USD.doc/vi.ref/ex.cmd.roff1776
-rw-r--r--usr.bin/vi/USD.doc/vi.ref/merge.awk16
-rw-r--r--usr.bin/vi/USD.doc/vi.ref/paper.ps30924
-rw-r--r--usr.bin/vi/USD.doc/vi.ref/set.opt.roff949
-rw-r--r--usr.bin/vi/USD.doc/vi.ref/spell.ok270
-rw-r--r--usr.bin/vi/USD.doc/vi.ref/vi.cmd.roff2984
-rw-r--r--usr.bin/vi/USD.doc/vi.ref/vi.ref1270
-rw-r--r--usr.bin/vi/USD.doc/vi.ref/vi.ref.txt5544
-rw-r--r--usr.bin/vi/USD.doc/vitut/Makefile17
-rw-r--r--usr.bin/vi/USD.doc/vitut/vi.apwh.ms1079
-rw-r--r--usr.bin/vi/USD.doc/vitut/vi.chars644
-rw-r--r--usr.bin/vi/USD.doc/vitut/vi.in2064
-rw-r--r--usr.bin/vi/USD.doc/vitut/vi.summary468
-rw-r--r--usr.bin/vi/common/Makefile98
-rw-r--r--usr.bin/vi/common/args.h53
-rw-r--r--usr.bin/vi/common/cut.c366
-rw-r--r--usr.bin/vi/common/cut.h96
-rw-r--r--usr.bin/vi/common/delete.c193
-rw-r--r--usr.bin/vi/common/exf.c830
-rw-r--r--usr.bin/vi/common/exf.h128
-rw-r--r--usr.bin/vi/common/gs.h107
-rw-r--r--usr.bin/vi/common/line.c492
-rw-r--r--usr.bin/vi/common/log.c698
-rw-r--r--usr.bin/vi/common/log.h53
-rw-r--r--usr.bin/vi/common/main.c711
-rw-r--r--usr.bin/vi/common/mark.c272
-rw-r--r--usr.bin/vi/common/mark.h73
-rw-r--r--usr.bin/vi/common/mem.h178
-rw-r--r--usr.bin/vi/common/msg.c427
-rw-r--r--usr.bin/vi/common/msg.h82
-rw-r--r--usr.bin/vi/common/options.awk9
-rw-r--r--usr.bin/vi/common/options.c890
-rw-r--r--usr.bin/vi/common/options.h.stub108
-rw-r--r--usr.bin/vi/common/options_f.c518
-rw-r--r--usr.bin/vi/common/pathnames.h45
-rw-r--r--usr.bin/vi/common/put.c254
-rw-r--r--usr.bin/vi/common/recover.c869
-rw-r--r--usr.bin/vi/common/screen.c309
-rw-r--r--usr.bin/vi/common/screen.h342
-rw-r--r--usr.bin/vi/common/search.c833
-rw-r--r--usr.bin/vi/common/search.h54
-rw-r--r--usr.bin/vi/common/seq.c350
-rw-r--r--usr.bin/vi/common/seq.h79
-rw-r--r--usr.bin/vi/common/signal.c569
-rw-r--r--usr.bin/vi/common/term.c732
-rw-r--r--usr.bin/vi/common/term.h205
-rw-r--r--usr.bin/vi/common/trace.c84
-rw-r--r--usr.bin/vi/common/util.c215
-rw-r--r--usr.bin/vi/common/vi.h124
-rw-r--r--usr.bin/vi/docs/README200
-rw-r--r--usr.bin/vi/docs/bugs.current47
-rw-r--r--usr.bin/vi/docs/changelog519
-rw-r--r--usr.bin/vi/docs/ev55
-rw-r--r--usr.bin/vi/docs/features92
-rw-r--r--usr.bin/vi/docs/internals/autowrite88
-rw-r--r--usr.bin/vi/docs/internals/context32
-rw-r--r--usr.bin/vi/docs/internals/gdb.script68
-rw-r--r--usr.bin/vi/docs/internals/input350
-rw-r--r--usr.bin/vi/docs/internals/quoting219
-rw-r--r--usr.bin/vi/docs/internals/structures61
-rw-r--r--usr.bin/vi/docs/tutorial/vi.advanced1458
-rw-r--r--usr.bin/vi/docs/tutorial/vi.beginner741
-rwxr-xr-xusr.bin/vi/docs/tutorial/vi.tut.csh24
-rw-r--r--usr.bin/vi/ex/ex.c1866
-rw-r--r--usr.bin/vi/ex/ex_abbrev.c129
-rw-r--r--usr.bin/vi/ex/ex_append.c220
-rw-r--r--usr.bin/vi/ex/ex_args.c263
-rw-r--r--usr.bin/vi/ex/ex_argv.c609
-rw-r--r--usr.bin/vi/ex/ex_at.c118
-rw-r--r--usr.bin/vi/ex/ex_bang.c242
-rw-r--r--usr.bin/vi/ex/ex_cd.c223
-rw-r--r--usr.bin/vi/ex/ex_delete.c92
-rw-r--r--usr.bin/vi/ex/ex_digraph.c324
-rw-r--r--usr.bin/vi/ex/ex_display.c169
-rw-r--r--usr.bin/vi/ex/ex_edit.c122
-rw-r--r--usr.bin/vi/ex/ex_equal.c86
-rw-r--r--usr.bin/vi/ex/ex_exit.c79
-rw-r--r--usr.bin/vi/ex/ex_file.c103
-rw-r--r--usr.bin/vi/ex/ex_global.c400
-rw-r--r--usr.bin/vi/ex/ex_init.c202
-rw-r--r--usr.bin/vi/ex/ex_join.c200
-rw-r--r--usr.bin/vi/ex/ex_map.c160
-rw-r--r--usr.bin/vi/ex/ex_mark.c66
-rw-r--r--usr.bin/vi/ex/ex_mkexrc.c130
-rw-r--r--usr.bin/vi/ex/ex_move.c222
-rw-r--r--usr.bin/vi/ex/ex_open.c75
-rw-r--r--usr.bin/vi/ex/ex_preserve.c128
-rw-r--r--usr.bin/vi/ex/ex_print.c212
-rw-r--r--usr.bin/vi/ex/ex_put.c78
-rw-r--r--usr.bin/vi/ex/ex_read.c300
-rw-r--r--usr.bin/vi/ex/ex_screen.c155
-rw-r--r--usr.bin/vi/ex/ex_script.c582
-rw-r--r--usr.bin/vi/ex/ex_set.c70
-rw-r--r--usr.bin/vi/ex/ex_shell.c150
-rw-r--r--usr.bin/vi/ex/ex_shift.c204
-rw-r--r--usr.bin/vi/ex/ex_source.c66
-rw-r--r--usr.bin/vi/ex/ex_stop.c76
-rw-r--r--usr.bin/vi/ex/ex_subst.c1001
-rw-r--r--usr.bin/vi/ex/ex_tag.c905
-rw-r--r--usr.bin/vi/ex/ex_undo.c103
-rw-r--r--usr.bin/vi/ex/ex_usage.c197
-rw-r--r--usr.bin/vi/ex/ex_util.c189
-rw-r--r--usr.bin/vi/ex/ex_version.c71
-rw-r--r--usr.bin/vi/ex/ex_visual.c137
-rw-r--r--usr.bin/vi/ex/ex_write.c327
-rw-r--r--usr.bin/vi/ex/ex_yank.c69
-rw-r--r--usr.bin/vi/ex/ex_z.c180
-rw-r--r--usr.bin/vi/ex/excmd.awk6
-rw-r--r--usr.bin/vi/ex/excmd.c458
-rw-r--r--usr.bin/vi/ex/excmd.h.stub285
-rw-r--r--usr.bin/vi/ex/filter.c414
-rw-r--r--usr.bin/vi/ex/script.h45
-rw-r--r--usr.bin/vi/ex/tag.h58
-rw-r--r--usr.bin/vi/install/recover.script32
-rw-r--r--usr.bin/vi/sex/sex_confirm.c86
-rw-r--r--usr.bin/vi/sex/sex_get.c514
-rw-r--r--usr.bin/vi/sex/sex_refresh.c140
-rw-r--r--usr.bin/vi/sex/sex_screen.c340
-rw-r--r--usr.bin/vi/sex/sex_screen.h79
-rw-r--r--usr.bin/vi/sex/sex_term.c217
-rw-r--r--usr.bin/vi/sex/sex_util.c148
-rw-r--r--usr.bin/vi/sex/sex_window.c194
-rw-r--r--usr.bin/vi/svi/svi_confirm.c95
-rw-r--r--usr.bin/vi/svi/svi_curses.c252
-rw-r--r--usr.bin/vi/svi/svi_ex.c650
-rw-r--r--usr.bin/vi/svi/svi_get.c161
-rw-r--r--usr.bin/vi/svi/svi_line.c441
-rw-r--r--usr.bin/vi/svi/svi_refresh.c818
-rw-r--r--usr.bin/vi/svi/svi_relative.c334
-rw-r--r--usr.bin/vi/svi/svi_screen.c332
-rw-r--r--usr.bin/vi/svi/svi_screen.h262
-rw-r--r--usr.bin/vi/svi/svi_smap.c1216
-rw-r--r--usr.bin/vi/svi/svi_split.c627
-rw-r--r--usr.bin/vi/svi/svi_term.c310
-rw-r--r--usr.bin/vi/svi/svi_util.c347
-rw-r--r--usr.bin/vi/vi/getc.c268
-rw-r--r--usr.bin/vi/vi/v_ch.c340
-rw-r--r--usr.bin/vi/vi/v_delete.c160
-rw-r--r--usr.bin/vi/vi/v_ex.c352
-rw-r--r--usr.bin/vi/vi/v_increment.c163
-rw-r--r--usr.bin/vi/vi/v_init.c256
-rw-r--r--usr.bin/vi/vi/v_left.c287
-rw-r--r--usr.bin/vi/vi/v_mark.c210
-rw-r--r--usr.bin/vi/vi/v_match.c198
-rw-r--r--usr.bin/vi/vi/v_ntext.c1899
-rw-r--r--usr.bin/vi/vi/v_paragraph.c370
-rw-r--r--usr.bin/vi/vi/v_put.c168
-rw-r--r--usr.bin/vi/vi/v_redraw.c67
-rw-r--r--usr.bin/vi/vi/v_replace.c194
-rw-r--r--usr.bin/vi/vi/v_right.c162
-rw-r--r--usr.bin/vi/vi/v_screen.c90
-rw-r--r--usr.bin/vi/vi/v_scroll.c486
-rw-r--r--usr.bin/vi/vi/v_search.c414
-rw-r--r--usr.bin/vi/vi/v_section.c280
-rw-r--r--usr.bin/vi/vi/v_sentence.c386
-rw-r--r--usr.bin/vi/vi/v_status.c73
-rw-r--r--usr.bin/vi/vi/v_stop.c75
-rw-r--r--usr.bin/vi/vi/v_text.c883
-rw-r--r--usr.bin/vi/vi/v_ulcase.c208
-rw-r--r--usr.bin/vi/vi/v_undo.c162
-rw-r--r--usr.bin/vi/vi/v_util.c159
-rw-r--r--usr.bin/vi/vi/v_word.c570
-rw-r--r--usr.bin/vi/vi/v_xchar.c136
-rw-r--r--usr.bin/vi/vi/v_yank.c94
-rw-r--r--usr.bin/vi/vi/v_z.c159
-rw-r--r--usr.bin/vi/vi/v_zexit.c82
-rw-r--r--usr.bin/vi/vi/vcmd.c533
-rw-r--r--usr.bin/vi/vi/vcmd.h346
-rw-r--r--usr.bin/vi/vi/vi.c937
-rw-r--r--usr.bin/vi/xaw/xaw_screen.c98
182 files changed, 103461 insertions, 0 deletions
diff --git a/usr.bin/vi/Makefile b/usr.bin/vi/Makefile
new file mode 100644
index 000000000000..9777077acf56
--- /dev/null
+++ b/usr.bin/vi/Makefile
@@ -0,0 +1,3 @@
+SUBDIR= common
+
+.include <bsd.subdir.mk>
diff --git a/usr.bin/vi/USD.doc/edit/Makefile b/usr.bin/vi/USD.doc/edit/Makefile
new file mode 100644
index 000000000000..3d30bc919644
--- /dev/null
+++ b/usr.bin/vi/USD.doc/edit/Makefile
@@ -0,0 +1,18 @@
+# @(#)Makefile 8.1 (Berkeley) 6/8/93
+
+DIR= usd/11.edit
+SRCS= edittut.ms
+MACROS= -msU
+
+paper.ps: ${SRCS}
+ ${TBL} ${SRCS} | ${ROFF} > ${.TARGET}
+
+# index for versatec is different from the one in edit.tut
+# because the fonts are different and entries reference page
+# rather than section numbers. if you have a typesetter
+# you should just use the index in edit.tut, and ignore editvindex.
+
+editvindex:
+ ${TROFF} ${MACROS} -n22 edit.vindex
+
+.include <bsd.doc.mk>
diff --git a/usr.bin/vi/USD.doc/edit/edit.vindex b/usr.bin/vi/USD.doc/edit/edit.vindex
new file mode 100644
index 000000000000..2098f14ea190
--- /dev/null
+++ b/usr.bin/vi/USD.doc/edit/edit.vindex
@@ -0,0 +1,115 @@
+.\" Copyright (c) 1980, 1993
+.\" 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.
+.\"
+.\" @(#)edit.vindex 8.1 (Berkeley) 6/8/93
+.\"
+.bd I
+.ND
+.TL
+Index
+.sp 3
+.2C
+.nf
+addressing, \fIsee\fR line numbers
+append mode, 4
+backslash (\\), 18
+buffer, 2
+command mode, 4
+context search, 8, 10, 13, 18
+control characters (``^'' notation), 8
+control-d, 6
+current filename, 19, 20
+current line (.), 9, 15
+diagnostic messages, 4
+disk, 2
+documentation, 21
+edit (to begin editing session), 3, 7
+editing commands:
+.in +2
+append (a), 4, 7
+change (c), 16
+copy (co), 13
+delete (d), 13-14
+edit (e), 12
+file (f), 19
+global (g), 18-19
+move (m), 12-13
+number (nu), 9
+preserve (pre), 20-21
+print (p), 8
+quit (q), 5, 11
+quit! (q!), 11
+read (r), 20
+recover (rec), 20
+substitute (s), 9-10, 17, 18
+undo (u), 14, 17
+write (w), 5-6, 11, 19-20
+z, 11
+.sp 10i
+! (shell escape), 19
+$= , 15
++, 15
+\-, 15
+//, 8, 18
+??, 18
+\&\fB.\fR, 9, 15
+\&\fB.\fR=, 9, 15
+.in -2
+erasing
+.ti +2
+characters (#), 8
+.ti +2
+lines (@), 8
+ex (text editor), 21
+\fIEx Reference Manual\fR, 21
+file, 1
+file recovery, 20
+filename, 2
+Interrupt (message), 7
+line numbers, \fIsee also\fR current line
+.ti +2
+dollar sign ($), 8, 12-13, 15
+.ti +2
+dot (.), 9, 15
+.ti +2
+relative (+ and \-), 15, 16
+logging out, 6
+login procedure, 2
+``magic'' characters, 21
+non-printing characters, 8
+``not found'' (message), 3
+program, 1
+recovery \fIsee\fR file recovery
+shell, 18
+shell escape (!), 19
+special characters (^, $, \e), 18
+text input mode, 4
+UNIX, 1
diff --git a/usr.bin/vi/USD.doc/edit/edittut.ms b/usr.bin/vi/USD.doc/edit/edittut.ms
new file mode 100644
index 000000000000..5f4c28cb6d2a
--- /dev/null
+++ b/usr.bin/vi/USD.doc/edit/edittut.ms
@@ -0,0 +1,2322 @@
+.\" Copyright (c) 1980, 1993
+.\" 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.
+.\"
+.\" @(#)edittut.ms 8.1 (Berkeley) 6/8/93
+.\"
+.EH 'USD:11-%''Edit: A Tutorial'
+.OH 'Edit: A Tutorial''USD:11-%'
+.LP
+.ds u \s-2UNIX\s0
+.ll 5i
+.nr LL 5i
+.ND
+.sp 4
+.ce
+\f3\s+2Edit: A Tutorial\s0\f1
+.sp
+.ce 3
+.I
+Ricki Blau
+.sp
+James Joyce
+.R
+.sp
+.ce 3
+Computing Services
+University of California
+Berkeley, California 94720
+.sp 3
+.ce
+.I
+ABSTRACT
+.R
+.sp
+.LP
+This narrative introduction to the use of the text editor
+.I edit
+assumes no prior familiarity with computers or with text editing.
+Its aim is to lead the beginning \s-2UNIX\(dg\s+2 user through the
+.FS
+\(dgUNIX is a trademark of Bell Laboratories.
+.FE
+fundamental steps of writing and revising a file of text.
+Edit,
+a version of the text editor
+.I ex,
+was designed to provide an informative environment
+for new and casual users.
+.PP
+We welcome comments and suggestions about this tutorial
+and the \s-2UNIX\s+2 documentation in general.
+.sp .5v
+September 1981
+.bp
+.ll 6.5i
+.nr LL 6.5i
+.nr LT 6.5i
+.ds u \s-2UNIX\s0
+.ce
+\s+2\f3Contents\f1\s0
+.LP
+.nf
+Introduction\ \ \ 3
+.sp
+Session 1\ \ \4
+.in +.5i
+Making contact with \s-2UNIX\s+2\ \ \ 4
+Logging in\ \ \4
+Asking for \fIedit\fR\ \ \ 4
+The ``Command not found'' message\ \ \ 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
+.in -.5i
+.sp
+Session 2\ \ \ 8
+.in +.5i
+Adding more text to the file\ \ \ 8
+Interrupt\ \ \ 8
+Making corrections\ \ \ 8
+Listing what's in the buffer (p)\ \ \ 9
+Finding things in the buffer\ \ \ 9
+The current line\ \ \ 10
+Numbering lines (nu)\ \ \ 10
+Substitute command (s)\ \ \ 10
+Another way to list what's in the buffer (z)\ \ \ 11
+Saving the modified text\ \ \ 12
+.in -.5i
+.sp
+Session 3\ \ \ 13
+.in +.5i
+Bringing text into the buffer (e)\ \ \ 13
+Moving text in the buffer (m)\ \ \ 13
+Copying lines (copy)\ \ \ 14
+Deleting lines (d)\ \ \ 14
+A word or two of caution\ \ \ 15
+Undo (u) to the rescue\ \ \ 15
+More about the dot (.) and buffer end ($)\ \ \ 16
+Moving around in the buffer (+ and \-)\ \ \ 16
+Changing lines (c)\ \ \ 17
+.in -.5i
+.sp
+Session 4\ \ \ 18
+.in +.5i
+Making commands global (g)\ \ \ 18
+More about searching and substituting\ \ \ 19
+Special characters\ \ \ 19
+Issuing \s-2UNIX\s+2 commands from the editor\ \ \ 20
+Filenames and file manipulation\ \ \ 20
+The file (f) command\ \ \ 20
+Reading additional files (r)\ \ \ 21
+Writing parts of the buffer\ \ \ 21
+Recovering files\ \ \ 21
+Other recovery techniques\ \ \ 21
+Further reading and other information\ \ \ 22
+Using \fIex\fR\ \ \ 22
+.in -.5i
+.sp
+Index\ \ \ 23
+.bp
+.SH
+.ce
+\s+2Introduction\s0
+.PP
+Text editing using a terminal connected to a computer
+allows you to create, modify, and print text
+easily.
+A
+.I
+text editor
+.R
+is a program
+that assists you
+as you create and modify text.
+The text editor you will learn here is named
+.I edit.
+Creating text using edit is as easy as typing it
+on an electric typewriter.
+Modifying text involves telling the text editor
+what you want to add, change, or delete.
+You can review your text
+by typing a command
+to print the file contents
+as they are currently.
+Another program (which we do not discuss in this
+document), a text formatter,
+rearranges your text
+for you into ``finished form.''
+.PP
+These lessons assume no prior familiarity with computers
+or with text editing.
+They consist of a series of text editing sessions
+which lead you through the fundamental steps
+of creating and revising text.
+After scanning each lesson and before beginning the next,
+you should try the examples at a terminal to get a feeling
+for the actual process of text editing.
+If you set aside some time for experimentation,
+you will soon become familiar with using the
+computer to write and modify text.
+In addition to the actual use of the text editor,
+other features of \s-2UNIX\s0 will be very important to your work.
+You can begin to
+learn about these other features by
+reading one of the other tutorials
+that provide a general introduction to the system.
+You will be ready to proceed with this lesson as soon as
+you are familiar with (1) your terminal and its special keys,
+(2) how to login,
+(3) and the ways of correcting typing errors.
+Let's first define some terms:
+.sp .5
+.IP program 12
+A set of instructions, given to the computer,
+describing the sequence of steps the computer performs
+in order to accomplish a specific task.
+The task must be specific,
+such as balancing your checkbook
+or editing your text.
+A general task,
+such as working for world peace,
+is something we can all do,
+but not something we can currently write programs to do.
+.IP UNIX
+\s-2UNIX\s0 is a special type of program,
+called an operating system, that supervises the machinery
+and all other programs comprising the total
+computer system.
+.IP edit
+.I edit
+is the name of the \s-2UNIX\s0 text editor you will be learning to use,
+and is a program that aids you in writing or revising text.
+Edit was designed for beginning users,
+and is a simplified version of an editor named
+.I ex.
+.IP file
+Each \s-2UNIX\s0 account is allotted
+space for the permanent storage of information,
+such as programs, data or text.
+A file is a logical unit of data,
+for example, an essay, a program,
+or a chapter from a book,
+which is stored on a computer system.
+Once you create a file,
+it is kept until you instruct the system to remove it.
+You may create a file during one \s-2UNIX\s0 session,
+end the session,
+and return to use it at a later time.
+Files contain anything you choose to write and store in them.
+The sizes of files vary to suit your needs;
+one file might hold only a single number,
+yet another might contain
+a very long document or program.
+The only way to save
+information from one session to the next is to store it in a file,
+which you will learn in Session 1.
+.IP filename
+Filenames are used to distinguish one file from another,
+serving the same purpose as the labels of manila
+folders in a file cabinet.
+In order to write or access information in a file,
+you use the name of that file in a \s-2UNIX\s0 command,
+and the system will automatically locate the file.
+.IP disk
+Files are stored on an input/output device called a disk,
+which looks something like a stack of phonograph records.
+Each surface is coated with a material similar to that
+on magnetic recording tape,
+and information is recorded on it.
+.IP buffer
+A temporary work space, made available to the user
+for the duration of a session of text editing
+and used for creating and modifying
+the text file.
+We can think of the buffer as a blackboard that is
+erased after each class, where each session with the editor
+is a class.
+.bp
+.SH
+.ce 1
+\s+2Session 1\s0
+.sp 1
+.SH
+Making contact with \s-1UNIX\s0
+.PP
+To use the editor you must first make contact with the computer
+by logging in to \s-2UNIX\s0.
+We'll quickly review the standard \s-2UNIX\s0 login procedure
+for the two ways you can make contact:
+on a terminal that is directly linked to the computer,
+or over a telephone line where the computer answers your call.
+.SH
+Directly-linked terminals
+.PP
+Turn on your terminal and press the \s-1RETURN\s0 key.
+You are now ready to login.
+.SH
+Dial-up terminals
+.PP
+If your terminal connects with the computer over a telephone line,
+turn on the terminal, dial the system access number,
+and, when you hear a high-pitched tone, place the
+telephone handset in the acoustic coupler, if you are using one.
+You are now ready to login.
+.SH
+Logging in
+.PP
+The message inviting you to login is:
+.DS I 1i
+login:
+.DE
+.LP
+Type your login name, which identifies you to \s-2UNIX\s0,
+on the same line as the login message,
+and press \s-2RETURN\s+2.
+If the terminal you are using
+has both upper and lower case,
+.B
+be sure you enter your login name in lower case;
+.R
+otherwise \s-2UNIX\s0 assumes your terminal
+has only upper case and will not recognize lower case
+letters you may type.
+\s-2UNIX\s0 types ``login:'' and you reply
+with your login name, for example ``susan'':
+.DS I 1i
+login: \fBsusan\fR \fI(and press the \s-2RETURN\s0 key)\fR
+.DE
+(In the examples, input you would type appears in
+.B "bold face"
+to distinguish it from the responses from \s-2UNIX\s0.)
+.PP
+\s-2UNIX\s0 will next respond with a request for a password
+as an additional precaution to prevent
+unauthorized people from using your account.
+The password will not appear when you type it,
+to prevent others from seeing it.
+The message is:
+.DS I 1i
+Password: \fI(type your password and press \s-2RETURN\s+2)\fR
+.DE
+If any of the information you gave during the login
+sequence was mistyped or incorrect,
+\s-2UNIX\s0 will respond with
+.DS I 1i
+Login incorrect.
+.if t .sp .2v
+.if n .sp 1
+login:
+.DE
+in which case you should start the login process anew.
+Assuming that you have successfully
+logged in, \s-2UNIX\s0
+will print the message of the day and eventually will present
+you with a % at the beginning of a fresh line.
+The % is the \s-2UNIX\s0 prompt symbol
+which tells you that \s-2UNIX\s0 is ready to accept a command.
+.bd I 3
+.SH
+Asking for \fIedit\fP
+.fl
+.bd I
+.PP
+You are ready to tell \s-2UNIX\s0 that you
+want to work with edit, the text editor.
+Now is a convenient time to choose
+a name for the file of text you are about to create.
+To begin your editing session,
+type
+.B edit
+followed by a space and then the filename
+you have selected; for example, ``text''.
+After that,
+press the \s-2RETURN\s0 key and wait for edit's response:
+.DS I 1i
+% \fBedit text\fP \fI(followed by a \s-2RETURN\s+2)\fR
+"text" No such file or directory
+:
+.DE
+If you typed the command correctly,
+you will now be in communication with edit.
+Edit has set aside a buffer for use as
+a temporary working space during your current editing session.
+Since ``text'' is a new file we are about to create
+the editor was unable to find that file, which it
+confirms by saying:
+.DS I 1i
+"text" No such file or directory
+.DE
+On the next line appears edit's prompt ``:'',
+announcing that you are in \f2command mode\f1 and
+edit expects a command from you.
+You may now begin to create the new file.
+.SH
+The ``Command not found'' message
+.PP
+If you misspelled edit by typing, say, ``editor'',
+this might appear:
+.DS I 1i
+% \fBeditor\fP
+editor: Command not found
+%
+.DE
+Your mistake in calling edit ``editor'' was
+treated by \s-2UNIX\s0 as a request
+for a program named ``editor''.
+Since there is no program
+named ``editor'',
+\s-2UNIX\s0 reported that the program was ``not found''.
+A new % indicates that \s-2UNIX\s0 is ready for another command,
+and you may then enter the correct command.
+.SH
+A summary
+.PP
+Your exchange with \s-2UNIX\s0 as you logged in and made contact with edit
+should look something like this:
+.DS I 1i
+login: \fBsusan\fP
+Password:
+\&... A Message of General Interest ...
+% \fBedit text\fP
+"text" No such file or directory
+:
+.DE
+.SH
+Entering text
+.PP
+You may now begin entering text into the buffer.
+This is done by \fIappending\fP (or adding) text to whatever
+is currently in the buffer.
+Since there is nothing in the buffer at the moment,
+you are appending text to nothing;
+in effect,
+since you are adding text to nothing
+you are creating text.
+Most edit commands have two equivalent forms:
+a word that suggests what the command does,
+and a shorter abbreviation of that word.
+Many beginners find the full command names
+easier to remember at first,
+but once you are familiar with editing you may
+prefer to type the shorter abbreviations.
+The command to input text is ``append''.
+(It may be abbreviated ``a''.)
+Type
+.B append
+and press the \s-2RETURN\s0 key.
+.DS I 1i
+% \fBedit text
+\fR:\|\fBappend
+.R
+.DE
+.SH
+.bd I 3
+Messages from
+.I edit
+.fl
+.bd I
+.PP
+If you make a mistake in entering a command and
+type something that edit does not recognize,
+edit will respond with a message
+intended to help you diagnose your error.
+For example, if you misspell the command to input text by typing,
+perhaps, ``add'' instead of ``append'' or ``a'',
+you will receive this message:
+.DS I 1i
+:\|\fBadd\fR
+add: Not an editor command
+:
+.DE
+When you receive a diagnostic message,
+check what you typed in order to determine what
+part of your command confused edit.
+The message above means that edit
+was unable to recognize your mistyped command
+and, therefore, did not execute it.
+Instead, a new ``:''
+appeared to let you know that
+edit is again ready to execute a command.
+.SH
+Text input mode
+.PP
+By giving the command ``append'' (or using the abbreviation ``a''),
+you entered
+.I
+text input mode,
+.R
+also known as
+.I
+append mode.
+.R
+When you enter text input mode,
+edit stops sending you a prompt.
+You will not receive any prompts
+or error messages
+while in text input mode.
+You can enter
+pretty much anything you want on the lines.
+The lines are transmitted one by one to the buffer
+and held there during the editing session.
+You may append as much text as you want, and
+.I
+when you wish to stop entering text lines you should
+type a period as the only character on the line
+and press the \s-2RETURN\s0 key.
+.R
+When you type the period and press \s-2RETURN\s0,
+you signal that you want to stop appending text,
+and edit responds by allowing
+you to exit text input mode and reenter command mode.
+Edit will again
+prompt you for a command by printing ``:''.
+.PP
+Leaving append mode does not destroy the text in
+the buffer.
+You have to leave append
+mode to do any of the other kinds of editing,
+such as changing, adding, or printing text.
+If you type a period as the first character and
+type any other character on the same line,
+edit will believe you want to remain in append mode
+and will not let you out.
+As this can be very frustrating,
+be sure to type
+.B only
+the period and the \s-2RETURN\s0 key.
+.PP
+This is a good place to learn an important
+lesson about computers and text: a blank space is
+a character as far as a computer is concerned.
+If you so much as type a period followed by a blank
+(that is, type a period and then the space bar on the keyboard),
+you will remain in append mode with the last line of text
+being:
+.DS I 1i
+.B
+.ps +2
+\&.
+.ps -2
+.R
+.DE
+Let's say that you enter the lines
+(try to type
+.B exactly
+what you see, including ``thiss''):
+.DS I 1i
+.B
+This is some sample text.
+And thiss is some more text.
+Text editing is strange, but nice.
+\&.
+.R
+.DE
+The last line is the period followed by a \s-2RETURN\s0
+that gets you out of append mode.
+.SH
+Making corrections
+.PP
+If you have read a general introduction to \s-2UNIX\s0,
+you will recall that it is possible to erase individual
+letters that you have typed.
+This is done by typing the designated erase character
+as many times as there are characters
+you want to erase.
+.PP
+The usual erase character varies from place to place and
+user to user. Often it
+is the backspace (control-H),
+so you can correct typing errors
+in the line you are typing
+by holding down the \s-1CTRL\s+1 key
+and typing the ``H'' key. (Sometimes it is the DEL key.)
+If you type the erase character
+you will notice
+that the terminal backspaces in the line you are on.
+You can backspace over your error,
+and then type what you want to be the rest of the line.
+.PP
+If you make a bad start
+in a line
+and would like to begin again,
+you can either backspace to the beginning of the line
+or you can use the at-sign ``@'' to erase everything on the line:
+.DS I 1i
+.B
+Text edtiing is strange, but@
+Text editing is strange, but nice.
+.R
+.fl
+.bd S
+.DE
+When you type the at-sign (@), you erase
+the entire line typed so far
+and are given a fresh line to type on.
+You may immediately begin to retype the line.
+This, unfortunately, does not work after you type the
+line and press \s-2RETURN\s+2.
+To make corrections in lines that have been completed,
+it is necessary to use the editing commands
+covered in the next sessions.
+.SH
+Writing text to disk
+.PP
+You are now ready to edit the text. One common operation
+is to write the text to disk as a file for safekeeping
+after the session is over.
+This is the only way to save information from one session to the next,
+since the editor's buffer is temporary and will last only until the
+end of the editing session.
+Learning how to write a file to disk is second in
+importance only to entering the text.
+To write the contents of the buffer to a disk
+file, use the command ``write''
+(or its abbreviation ``w''):
+.DS I 1i
+:\|\fBwrite
+.R
+.DE
+Edit will copy the contents of the buffer to a disk file.
+If the file does not yet exist,
+a new file will be created automatically
+and the presence of a ``[New file]'' will be noted.
+The newly-created file will be given the name specified when
+you entered the editor, in this case ``text''.
+To confirm that the disk file has been successfully written,
+edit will repeat the filename and give
+the number of lines and the total
+number of characters in the file.
+The buffer remains unchanged by the ``write'' command.
+All of the lines that were written to disk will still be
+in the buffer,
+should you want to modify or add to them.
+.PP
+Edit must have a name for the file to be written.
+If you forgot to indicate the name of the file
+when you began to edit,
+edit will print in response to your write command:
+.DS I 1i
+No current filename
+.DE
+If this happens, you can specify the filename in a new write command:
+.DS I 1i
+:\|\fBwrite text
+.R
+.DE
+After the ``write'' (or ``w''), type a space and then the name of the file.
+.SH
+Signing off
+.PP
+We have done enough for this first lesson on using the
+\s-2UNIX\s0 text editor, and are ready to quit the session with edit.
+To do this we type ``quit'' (or ``q'') and press \s-2RETURN\s+2:
+.DS I 1i
+:\|\fBwrite
+.R
+"text" [New file] 3 lines, 90 characters
+:\|\fBquit\fR
+%
+.DE
+The % is from \s-2UNIX\s0 to tell you that your session with edit is
+over and you may command \s-2UNIX\s0 further.
+Since we want
+to end the entire session at the terminal, we also need to
+exit from \s-2UNIX\s0.
+In response to the \s-2UNIX\s0 prompt of ``\|%\|''
+type the command
+.DS I 1i
+%\|\fBlogout\fR
+.DE
+This will end your session with \s-2UNIX\s0, and will ready the
+terminal for the next user.
+It is always important to type \fBlogout\fR at the end of a session
+to make absolutely sure no one
+could accidentally stumble into your abandoned
+session and thus gain access to your files,
+tempting even the most honest of souls.
+.sp 1
+.PP
+This is the end of the first session on \s-2UNIX\s0 text editing.
+.bp
+.TL
+Session 2
+.sp
+.PP
+Login with \s-2UNIX\s0 as in the first session:
+.DS I 1i
+login: \fBsusan\fP \fI(carriage return)\fR
+Password: \fI(give password and carriage return)\fR
+.if t .sp .2v
+.if n .sp 1
+\&... A Message of General Interest ...
+%
+.DE
+When you indicate you want to edit,
+you can specify the name of the file you worked on last time.
+This will
+start edit working, and it will fetch the contents of the
+file into the buffer, so that you can resume editing the same file.
+When edit has copied the file into the buffer, it
+will repeat its name and tell
+you the number of lines and characters it contains.
+Thus,
+.DS I 1i
+.B
+% edit text
+.R
+"text" 3 lines, 90 characters
+:
+.DE
+means you asked edit to fetch
+the file named ``text'' for editing,
+causing it to copy the
+90 characters of text into the buffer.
+Edit awaits
+your further instructions,
+and indicates this by its prompt character, the colon (:).
+In this session, we will append more text to our file,
+print the contents of the buffer, and learn to change the text of a line.
+.SH
+Adding more text to the file
+.PP
+If you want to add more to the end of your
+text you may do so by using the append command to enter text input mode.
+When ``append'' is the first command
+of your editing session,
+the lines you enter
+are placed at the end of the buffer.
+Here we'll use the abbreviation for the append command, ``a'':
+.DS I 1i
+:\|\fBa
+This is text added in Session 2.
+It doesn't mean much here, but
+it does illustrate the editor.
+\|\fB\s+2\&.\s-2
+.R
+.DE
+You may recall that once you enter append mode
+using the ``a'' (or ``append'') command,
+you need to type a line containing only a period (.)
+to exit append mode.
+.SH
+Interrupt
+.PP
+Should you press the \s-2RUB\s+2 key (sometimes labelled \s-2DELETE\s+2)
+while working with edit,
+it will send this message to you:
+.DS I 1i
+Interrupt
+:
+.DE
+Any command that edit might be executing
+is terminated by rub or delete,
+causing edit to prompt you for a new command.
+If you are appending text at the time,
+you will exit from append mode
+and be expected to give another command.
+The line of text you were typing
+when the append command was interrupted
+will not be entered into the buffer.
+.SH
+Making corrections
+.PP
+If while typing the line you hit an incorrect key,
+recall that
+you may delete the incorrect character
+or cancel the entire line of input by erasing in the usual way.
+Refer either
+to the last few pages of Session 1
+if you need to review
+the procedures for making a correction.
+The most important idea to remember is that
+erasing a character or cancelling a line must be done
+before you press the \s-2RETURN\s+2 key.
+.SH
+Listing what's in the buffer (p)
+.PP
+Having appended text to what you wrote in Session 1,
+you might want to see all the lines in the buffer.
+To print the contents of the buffer, type the command:
+.DS I 1i
+:\|\fB1,$p
+.R
+.DE
+The ``1''\(dg
+.FS
+\(dgThe numeral ``one'' is the top left-most key,
+and should not be confused with the letter ``el''.
+.FE
+stands for line 1 of the buffer,
+the ``$'' is a special symbol designating the last line
+of the buffer,
+and ``p'' (or \fBprint\fR) is the command to print from line 1
+to the end of the buffer.
+The command ``1,$p'' gives you:
+.DS I 1i
+This is some sample text.
+And thiss is some more text.
+Text editing is strange, but nice.
+This is text added in Session 2.
+It doesn't mean much here, but
+it does illustrate the editor.
+.DE
+Occasionally, you may accidentally
+type a character that can't be printed,
+which can be done by striking a key
+while the \s-2CTRL\s0 key is pressed.
+In printing lines, edit uses a special notation to
+show the existence of non-printing characters.
+Suppose you had introduced the non-printing character ``control-A''
+into the word ``illustrate''
+by accidently pressing the \s-2CTRL\s0 key while
+typing ``a''.
+This can happen on many terminals
+because the \s-2CTRL\s+2 key and the ``A'' key
+are beside each other.
+If your finger presses between the two keys,
+control-A results.
+When asked to print the contents of the buffer,
+edit would display
+.DS I 1i
+it does illustr^Ate the editor.
+.DE
+To represent the control-A, edit shows ``^A''.
+The sequence ``^'' followed by a capital
+letter stands for the one character
+entered by holding down the \s-2CTRL\s0 key and typing the letter
+which appears after the ``^''.
+We'll soon discuss the commands that can be used
+to correct this typing error.
+.PP
+In looking over the text we see that
+``this'' is typed as ``thiss'' in the second line,
+a deliberate error so we can learn to make corrections.
+Let's correct the spelling.
+.SH
+Finding things in the buffer
+.PP
+In order to change something in the buffer we first need to
+find it.
+We can find ``thiss'' in the text we have
+entered by looking at a listing
+of the lines.
+Physically speaking, we search the lines
+of text looking for ``thiss'' and stop searching when
+we have found it.
+The way to tell edit to search for something
+is to type it inside slash marks:
+.DS I 1i
+:\|\fB/thiss/
+.R
+.DE
+By typing
+.B /thiss/
+and pressing \s-1RETURN\s0,
+you instruct edit to search for ``thiss''.
+If you ask edit to look for a pattern of characters
+which it cannot find in the buffer,
+it will respond ``Pattern not found''.
+When edit finds
+the characters ``thiss'', it will print the line of text
+for your inspection:
+.DS I 1i
+And thiss is some more text.
+.DE
+Edit is now positioned in the buffer at the
+line it just printed,
+ready to make a change in the line.
+.bp
+.SH
+The current line
+.PP
+Edit keeps track of the line in the buffer where it is located
+at all times during an editing session.
+In general, the line that has been most recently
+printed, entered, or changed
+is the current location in the buffer.
+The editor is prepared to make changes
+at the current location in the buffer,
+unless you direct it to another location.
+.PP
+In particular,
+when you bring a file into the buffer,
+you will be located at the last line in the file,
+where the editor left off copying the lines
+from the file to the buffer.
+If your first editing command is ``append'',
+the lines you enter are added
+to the end of the file,
+after the current line \(em
+the last line in the file.
+.PP
+You can refer to your current location in the buffer by the
+symbol
+period (.) usually known by the name ``dot''.
+If you type ``.'' and carriage
+return you will be instructing edit to print the current line:
+.DS I 1i
+:\|\fB\s+2\&.\s-2
+.R
+And thiss is some more text.
+.DE
+.PP
+If you want to know the number of the current line,
+you can type
+.B \&.=
+and press \s-2RETURN\s+2,
+and edit will respond with the line number:
+.DS I 1i
+:\|\fB\s+2.\s-2=
+.R
+2
+.DE
+If you type the number of any line and press \s-2RETURN\s+2,
+edit will position you at that line and
+print its contents:
+.DS I 1i
+:\|\fB2
+.R
+And thiss is some more text.
+.DE
+You should experiment with these commands
+to gain experience in using them to make changes.
+.SH
+Numbering lines (nu)
+.PP
+The
+.B
+number (nu)
+.R
+command is similar to print,
+giving both the number and the text of each printed line.
+To see the number and the text of the current line type
+.DS I 1i
+:\|\fBnu
+.R
+\0\0\0\0\02\0\0And thiss is some more text.
+.DE
+Note that the shortest abbreviation for the number command is
+``nu'' (and not ``n'', which is used for a different command).
+You may specify a range of lines
+to be listed by the number command in the same way that lines
+are specified for print.
+For example, \f31,$nu\f1 lists all lines in the buffer with their
+corresponding line numbers.
+.SH
+Substitute command (s)
+.PP
+Now that you have found the misspelled word,
+you can change it from ``thiss'' to ``this''.
+As far as edit is concerned,
+changing things is a matter of
+substituting one thing for another.
+As
+.I a
+stood for
+.I append,
+so
+.I s
+stands for
+.I substitute.
+We will use the abbreviation ``s'' to reduce the chance
+of mistyping the substitute command.
+This command will instruct edit to make the change:
+.DS I 1i
+\f32s/thiss/this/\f1
+.DE
+We first indicate the line to be changed, line 2,
+and then
+type an ``s'' to indicate we want
+edit to make a substitution.
+Inside the first set of slashes
+are the characters that we want to change,
+followed by the characters to replace them,
+and then a closing slash mark.
+To summarize:
+.DS I 1i
+2s/ \fIwhat is to be changed\fR / \fIwhat to change it to \fR/
+.DE
+If edit finds an exact match of the characters to be
+changed it will make the change
+.B only
+in the first occurrence of the characters.
+If it does not find the characters
+to be changed, it will respond:
+.DS I 1i
+Substitute pattern match failed
+.DE
+indicating that your instructions could not be carried out.
+When edit does find the characters that you want to change,
+it will make the substitution and automatically print
+the changed line, so that you can check that the correct substitution
+was made.
+In the example,
+.DS I 1i
+:\|\fB2s/thiss/this/
+.R
+And this is some more text.
+.DE
+line 2 (and line 2 only) will be searched for the characters
+``thiss'', and when the first exact match is found, ``thiss''
+will be changed to ``this''.
+Strictly speaking, it was not necessary above to
+specify the number of the line to be changed.
+In
+.DS I 1i
+:\|\fBs/thiss/this/
+.R
+.DE
+edit will assume that we mean to change
+the line where we are currently located (``.'').
+In this case,
+the command without a line number would have produced the same result
+because we were already located
+at the line we wished to change.
+.PP
+For another illustration of the substitute command,
+let us choose the line:
+.DS I 1i
+Text editing is strange, but nice.
+.DE
+You can make this line a bit more positive
+by taking out the characters ``strange, but\ '' so the line
+reads:
+.DS I 1i
+Text editing is nice.
+.DE
+A command that will first position edit at the desired line
+and then make the substitution is:
+.DS I 1i
+:\|\fB/strange/s/strange, but //
+.R
+.DE
+.LP
+What we have done here is combine our search with
+our substitution.
+Such combinations are perfectly legal,
+and speed up editing quite a bit
+once you get used to them.
+That is, you do not necessarily have to use
+line numbers to identify a line to edit.
+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
+.TE
+.PP
+You should note the space after ``but'' in ``/strange, but /''.
+If you do not indicate that the space is to be taken out,
+your line will read:
+.DS I 1i
+.if t Text editing is nice.
+.if n Text editing is nice.
+.DE
+which looks a little funny
+because of the extra space between ``is'' and ``nice''.
+Again, we realize from this that a blank space
+is a real character to a computer, and in editing text
+we need to be aware of spaces
+within a line just as we would be aware of an ``a'' or
+a ``4''.
+.SH
+Another way to list what's in the buffer (z)
+.PP
+Although the print command is useful for looking at specific lines
+in the buffer,
+other commands may be more convenient for
+viewing large sections of text.
+You can ask to see a screen full of text at a time
+by using the command
+.B z.
+If you type
+.DS I 1i
+:\|\fB1z
+.R
+.DE
+edit will start with line 1 and continue printing lines,
+stopping either when the screen of
+your terminal is full
+or when the last line in the buffer has been printed.
+If you want to read the next segment of text, type the command
+.DS I 1i
+:\|\fBz
+.DE
+If no starting line number is given for the z command,
+printing will start at the ``current'' line, in this case the
+last line printed.
+Viewing lines in the buffer one screen full at a time
+is known as \fIpaging\fR.
+Paging can also be used to print
+a section of text on a hard-copy terminal.
+.SH
+Saving the modified text
+.PP
+This seems to be a good place to pause in our work,
+and so we should end the second session.
+If you (in haste) type ``q'' to quit the session
+your dialogue with edit will be:
+.DS I 1i
+:\|\fBq
+.R
+No write since last change (:quit! overrides)
+:
+.DE
+This is edit's warning that you have not written
+the modified contents of the buffer to disk.
+You run the risk of losing the work you did
+during the editing session since you typed the latest write
+command.
+Because in this lesson we have not written
+to disk at all, everything we have done
+would have been lost
+if edit had obeyed the \fBq\fR command.
+If you did not want to save the work done during
+this editing session, you would have to type ``q!''
+or (``quit!'')
+to confirm that you indeed wanted to end the session
+immediately,
+leaving the file as it was
+after the most recent ``write'' command.
+However,
+since you want to save what
+you have edited, you need to type:
+.DS I 1i
+:\|\fBw
+.R
+"text" 6 lines, 171 characters
+.DE
+and then follow with the commands to quit and logout:
+.DS I 1i
+:\|\fBq
+% \fBlogout\fR
+.DE
+and hang up the phone or turn off the terminal when
+\s-2UNIX\s0 asks for a name.
+Terminals connected to the port selector
+will stop after the logout command,
+and pressing keys on the keyboard will do nothing.
+.sp 1
+.PP
+This is the end of the second session on \s-2UNIX\s0 text editing.
+.bp
+.TL
+Session 3
+.SH
+Bringing text into the buffer (e)
+.PP
+Login to \s-2UNIX\s0 and make contact with edit.
+You should try to login without
+looking at the notes, but if you must
+then by all means do.
+.PP
+Did you remember to give the name of the file
+you wanted to edit?
+That is, did you type
+.DS I 1i
+% \fBedit text\fR
+.DE
+or simply
+.DS I 1i
+% \fBedit\fR
+.DE
+Both ways get you in contact with edit, but the first way
+will bring a copy of the file named ``text'' into
+the buffer.
+If you did forget to tell edit the name of your file,
+you can get it into the buffer by
+typing:
+.DS I 1i
+:\|\fBe text
+.R
+"text" 6 lines, 171 characters
+.DE
+The command
+.B edit,
+which may be abbreviated \fBe\fR,
+tells edit that you want
+to erase anything that might already be in
+the buffer and bring a copy of the file ``text'' into the buffer
+for editing.
+You may also use the edit (e) command to change files in
+the middle of an editing session,
+or to give edit the name of a new file that you want to create.
+Because the edit command clears the buffer,
+you will receive a warning if you try to edit a new file without
+having saved a copy of the old file.
+This gives you a chance to write the contents of the buffer to disk
+before editing the next file.
+.SH
+Moving text in the buffer (m)
+.PP
+Edit allows you to move lines of text
+from one location in the buffer to another
+by means of the
+.B move
+(\fBm\fR) command.
+The first two examples are for illustration only,
+though after you have read this Session
+you are welcome to return to them for practice.
+The command
+.DS I 1i
+:\|\fB2,4m$
+.R
+.DE
+directs edit to move lines 2, 3, and 4
+to the end of the buffer ($).
+The format for the move command is that you specify
+the first line to be moved, the last line to be moved,
+the move command ``m'', and the line after which
+the moved text is to be placed.
+So,
+.DS I 1i
+:\|\fB1,3m6
+.R
+.DE
+would instruct edit to move lines 1 through 3 (inclusive)
+to a location after line 6 in the buffer.
+To move only one line, say, line 4,
+to a location in the buffer after line 5,
+the command would be ``4m5''.
+.PP
+Let's move some text using the command:
+.DS I 1i
+:\|\fB5,$m1
+.R
+2 lines moved
+it does illustrate the editor.
+.DE
+After executing a command that moves more than one line of the buffer,
+edit tells how many lines were affected by the move
+and prints the last moved line for your inspection.
+If you want to see more than just the last line,
+you can then
+use the print (p), z, or number (nu) command to view more text.
+The buffer should now contain:
+.DS I 1i
+This is some sample text.
+It doesn't mean much here, but
+it does illustrate the editor.
+And this is some more text.
+Text editing is nice.
+This is text added in Session 2.
+.DE
+You can restore the original order by typing:
+.DS I 1i
+:\|\fB4,$m1
+.R
+.DE
+or, combining context searching and the move command:
+.DS I 1i
+:\|\fB/And this is some/,/This is text/m/This is some sample/
+.R
+.DE
+(Do not type both examples here!)
+The problem with combining context searching
+with the move command
+is that your chance of making a typing error
+in such a long command is greater than
+if you type line numbers.
+.SH
+Copying lines (copy)
+.PP
+The
+.B copy
+command
+is used to make a second copy of specified lines,
+leaving the original lines where they were.
+Copy
+has the same format as the move command, for example:
+.DS I 1i
+:\|\fB2,5copy $
+.R
+.DE
+makes a copy of lines 2 through 5,
+placing the added lines after the buffer's end ($).
+Experiment with the copy command
+so that you can become familiar with how it works.
+Note that the shortest abbreviation for copy is
+\f3co\f1 (and
+not the letter ``c'', which has another meaning).
+.SH
+Deleting lines (d)
+.PP
+Suppose you want to delete
+the line
+.DS I 1i
+This is text added in Session 2.
+.DE
+from the buffer.
+If you know the number of the line to be deleted,
+you can type
+that number followed by
+\fBdelete\fR or \fBd\fR.
+This example deletes line 4,
+which is ``This is text added in Session 2.''
+if you typed the commands
+suggested so far.
+.DS I 1i
+:\|\fB4d
+.R
+It doesn't mean much here, but
+.DE
+Here ``4'' is the number of the line to be deleted,
+and ``delete'' or ``d'' is the command to delete the line.
+After executing the delete command,
+edit prints the line that has become the current line (``.'').
+.PP
+If you do not happen to know the line number
+you can search for the line and then delete it using this
+sequence of commands:
+.DS I 1i
+:\|\fB/added in Session 2./
+.R
+This is text added in Session 2.
+:\|\fBd
+.R
+It doesn't mean much here, but
+.DE
+The ``/added in Session 2./''
+asks edit to locate and print
+the line containing the indicated text,
+starting its search at the current line
+and moving line by line
+until it finds the text.
+Once you are sure that you have correctly specified the line
+you want to delete,
+you can enter the delete (d) command.
+In this case it is not necessary to
+specify a line number before the ``d''.
+If no line number is given,
+edit deletes the current line (``.''),
+that is, the line found by our search.
+After the deletion, your buffer should contain:
+.DS I 1i
+This is some sample text.
+And this is some more text.
+Text editing is nice.
+It doesn't mean much here, but
+it does illustrate the editor.
+And this is some more text.
+Text editing is nice.
+This is text added in Session 2.
+It doesn't mean much here, but
+.DE
+To delete both lines 2 and 3:
+.DS I 1i
+And this is some more text.
+Text editing is nice.
+.DE
+you type
+.DS I 1i
+:\|\f32,3d\f1
+2 lines deleted
+.DE
+which specifies the range of lines from 2 to 3,
+and the operation on those lines \(em ``d'' for delete.
+If you delete more than one line
+you will receive a message
+telling you the number of lines deleted,
+as indicated in the example above.
+.PP
+The previous example assumes that you know the line numbers for
+the lines to be deleted.
+If you do not you might combine the search command
+with the delete command:
+.DS I 1i
+:\|\fB/And this is some/,/Text editing is nice./d
+.R
+.DE
+.SH
+A word or two of caution
+.PP
+In using the search function to locate lines to
+be deleted you should be
+.B
+absolutely sure
+.R
+the characters you give as the basis for the search
+will take edit to the line you want deleted.
+Edit will search for the first
+occurrence of the characters starting from where
+you last edited \-
+that is, from the line you see printed if you type dot (.).
+.PP
+A search based on too few
+characters may result in the wrong lines being deleted,
+which edit will do as easily as if you had meant it.
+For this reason, it is usually safer
+to specify the search and then delete in two separate steps,
+at least until you become familiar enough with using the editor
+that you understand how best to specify searches.
+For a beginner it is not a bad idea to double-check
+each command before pressing \s-2RETURN\s+2 to send the command on its way.
+.SH
+Undo (u) to the rescue
+.PP
+The
+.B
+undo (u)
+.R
+command has the ability to
+reverse the effects of the last command that changed the buffer.
+To undo the previous command, type
+``u'' or ``undo''.
+Undo can rescue
+the contents of the buffer from many an unfortunate mistake.
+However, its powers are not unlimited,
+so it is still wise to be reasonably
+careful about the commands you give.
+.PP
+It is possible to undo only commands which
+have the power to change the buffer \(em for example,
+delete, append, move, copy, substitute, and even undo itself.
+The commands write (w) and edit (e), which interact with disk files,
+cannot be undone, nor can commands that do not change
+the buffer, such as print.
+Most importantly,
+the
+.B only
+command that can be reversed by undo
+is the
+last ``undo-able'' command you typed.
+You can use control-H and @ to change
+commands while you are typing them,
+and undo to reverse the effect of the commands
+after you have typed them and pressed \s-2RETURN\s+2.
+.PP
+To illustrate,
+let's issue an undo command.
+Recall that the last buffer-changing command we gave deleted
+the lines formerly numbered 2 and 3.
+Typing undo at this moment will reverse the effects
+of the deletion, causing those two lines to be
+replaced in the buffer.
+.DS I 1i
+:\|\fBu
+.R
+2 more lines in file after undo
+And this is some more text.
+.DE
+Here again, edit informs you if the command affects more
+than one line,
+and prints
+the text of the line which is now ``dot'' (the current line).
+.SH
+More about the dot (.) and buffer end ($)
+.PP
+The function assumed by the symbol dot depends on its context.
+It can be used:
+.IP
+1. to exit from append mode; we type dot (and only a dot) on
+a line and press \s-2RETURN\s+2;
+.IP
+2. to refer to the line we are at in the buffer.
+.LP
+Dot can also be combined with the equal sign to get
+the number of the line currently being edited:
+.DS I 1i
+:\|\fB\&.=
+.R
+.DE
+If we type ``\fB.\fR='' we are asking for the number of the line,
+and if we type ``\fB.\fR'' we are asking for the text of the line.
+.PP
+In this editing session and the last, we used the dollar
+sign to indicate the end of the buffer
+in commands such as print, copy, and move.
+The dollar sign as a command asks edit to print the last
+line in the buffer.
+If the dollar sign is combined with the equal sign (\f3$=\f1)
+edit will print the line number corresponding to the
+last line in the buffer.
+.PP
+``\fB.\fR'' and ``$'', then, represent line numbers.
+Whenever appropriate, these symbols can be used in
+place of line numbers in commands.
+For example
+.DS I 1i
+:\|\fB\s+2.\s-2,$d
+.R
+.DE
+instructs edit to delete all lines from the current line (\fB.\fR)
+to the end of the buffer.
+.SH
+Moving around in the buffer (+ and \-)
+.PP
+When you are editing
+you often want
+to go back and re-read a previous line.
+You could specify a context search for a line you want to
+read if you remember some of its text,
+but if you simply want to see what was written a few, say 3, lines
+ago, you can type
+.DS I 1i
+\-3p
+.DE
+This tells edit to move back to a position 3 lines
+before the current line (.)
+and print that line.
+You can move forward in the buffer similarly:
+.DS I 1i
++2p
+.DE
+instructs edit to print the line that is 2
+ahead of your current position.
+.PP
+You may use ``+'' and ``\-'' in any command where edit
+accepts line numbers.
+Line numbers specified with ``+'' or ``\-''
+can be combined to print a range of lines.
+The command
+.DS I 1i
+:\|\fB\-1,+2copy$
+.R
+.DE
+makes a copy of 4 lines: the current line, the line before it,
+and the two after it.
+The copied lines will be placed after the last line
+in the buffer ($),
+and the original lines referred to by ``\-1'' and ``+2''
+remain where they are.
+.PP
+Try typing only ``\-''; you will move back one line just as
+if you had typed ``\-1p''.
+Typing the command ``+'' works similarly.
+You might also try typing a few plus or minus signs in a row
+(such as ``+++'') to see edit's response.
+Typing \s-2RETURN\s+2 alone on a line is the equivalent
+of typing ``+1p''; it will move you one line ahead in the buffer
+and print that line.
+.PP
+If you are at the last line of the buffer and try
+to move further ahead, perhaps by typing a ``+'' or
+a carriage return alone on the line,
+edit will remind you that you are at the end of the buffer:
+.sp
+.nf
+.ti 1i
+At end-of-file
+.br
+or
+.ti 1i
+Not that many lines in buffer
+.fi
+.LP
+Similarly, if you try to move to a position before the first line,
+edit will print one of these messages:
+.sp
+.nf
+.ti 1i
+Nonzero address required on this command
+.br
+or
+.ti 1i
+Negative address \- first buffer line is 1
+.fi
+.LP
+The number associated with a buffer line is the line's ``address'',
+in that it can be used to locate the line.
+.SH
+Changing lines (c)
+.PP
+You can also delete certain lines and
+insert new text in their place.
+This can be accomplished easily with the
+.B "change (c)"
+command.
+The change command instructs edit to delete specified lines
+and then switch to text input mode to
+accept the text that will replace them.
+Let's say you want to change the first two lines in the buffer:
+.DS I 1i
+This is some sample text.
+And this is some more text.
+.DE
+to read
+.DS I 1i
+This text was created with the \s-2UNIX\s0 text editor.
+.DE
+To do so, you type:
+.DS I 1i
+:\|\fB1,2c
+.R
+2 lines changed
+.B
+This text was created with the \s-2UNIX\s0 text editor.
+\s+2\&.\s-2
+.R
+:
+.DE
+In the command
+.B 1,2c
+we specify that we want to change
+the range of lines beginning with 1 and ending with 2
+by giving line numbers as with the print command.
+These lines will be deleted.
+After you type \s-2RETURN\s+2 to end the change command,
+edit notifies you if more than one line will be changed
+and places you in text input mode.
+Any text typed on the following lines will be inserted into
+the position where lines were deleted by the change command.
+.B
+You will remain in text input mode until you exit in the usual way,
+by typing a period alone on a line.
+.R
+Note that the number of lines added to the buffer need not be
+the same as the number of lines deleted.
+.sp 1
+.PP
+This is the end of the third session on text editing with \s-2UNIX\s0.
+.bp
+.SH
+.ce 1
+\s+2Session 4\s0
+.sp
+.PP
+This lesson covers several topics, starting with
+commands that apply throughout the buffer,
+characters with special meanings,
+and how to issue \s-2UNIX\s0 commands while in the editor.
+The next topics deal with files:
+more on reading and writing,
+and methods of recovering files lost in a crash.
+The final section suggests sources of further information.
+.SH
+Making commands global (g)
+.PP
+One disadvantage to the commands we have used for
+searching or substituting is that if you
+have a number of instances of a word to change
+it appears that you have to type the command
+repeatedly, once for
+each time the change needs to be made.
+Edit, however, provides a way to make commands
+apply to the entire contents of the buffer \-
+the
+.B
+global (g)
+.R
+command.
+.PP
+To print all lines
+containing a certain sequence of characters
+(say, ``text'')
+the command is:
+.DS I 1i
+:\|\fBg/text/p
+.R
+.DE
+The ``g'' instructs edit to
+make a global search for all lines
+in the buffer containing the characters ``text''.
+The ``p'' prints the lines found.
+.PP
+To issue a global command, start by typing a ``g'' and then a search
+pattern identifying
+the lines to be affected.
+Then, on the same line, type the command to be
+executed for the identified lines.
+Global substitutions are frequently useful.
+For example,
+to change all instances of the word ``text'' to the word ``material''
+the command would be a combination of the global search and the
+substitute command:
+.DS I 1i
+:\|\fBg/text/s/text/material/g
+.R
+.DE
+Note the ``g'' at the end of the global command,
+which instructs edit to change
+each and every instance of ``text'' to ``material''.
+If you do not type the ``g'' at the end of the command
+only the
+.I first
+instance of ``text'' \fIin each line\fR will be changed
+(the normal result of the substitute command).
+The ``g'' at the end of the command is independent of the ``g''
+at the beginning.
+You may give a command such as:
+.DS I 1i
+:\|\fB5s/text/material/g
+.R
+.DE
+to change every instance of ``text'' in line 5 alone.
+Further, neither command will change ``text'' to ``material''
+if ``Text'' begins with a capital rather than a lower-case
+.I t.
+.PP
+Edit does not automatically print the lines modified by a
+global command.
+If you want the lines to be printed, type a ``p''
+at the end of the global command:
+.DS I 1i
+:\|\fBg/text/s/text/material/gp
+.R
+.DE
+You should be careful
+about using the global command in combination with any other \-
+in essence, be sure of what you are telling edit to do
+to the entire buffer.
+For example,
+.DS I 1i
+:\|\fBg/ /d
+.R
+72 less lines in file after global
+.DE
+will delete every line containing a blank anywhere in it.
+This could adversely affect
+your document, since most lines have spaces between words
+and thus would be deleted.
+After executing the global command,
+edit will print a warning if the command added or deleted more than one line.
+Fortunately, the undo command can reverse
+the effects of a global command.
+You should experiment with the global command
+on a small file of text to see what it can do for you.
+.SH
+More about searching and substituting
+.PP
+In using slashes to identify a character string
+that we want to search for or change,
+we have always specified the exact characters.
+There is a less tedious way to
+repeat the same string of characters.
+To change ``text'' to ``texts'' we may type either
+.DS I 1i
+:\|\fB/text/s/text/texts/
+.R
+.DE
+as we have done in the past,
+or a somewhat abbreviated command:
+.DS I 1i
+:\|\fB/text/s//texts/
+.R
+.DE
+In this example, the characters to be changed
+are not specified \-
+there are no characters, not even a space,
+between the two slash marks
+that indicate what is to be changed.
+This lack of characters between the slashes
+is taken by the editor to mean
+``use the characters we last searched for as the characters to be changed.''
+.PP
+Similarly, the last context search may be repeated
+by typing a pair of slashes with nothing between them:
+.DS I 1i
+:\|\fB/does/
+.R
+It doesn't mean much here, but
+:\|\fB//
+.R
+it does illustrate the editor.
+.DE
+(You should note that the search command found the characters ``does''
+in the word ``doesn't'' in the first search request.)
+Because no characters are specified for the second search,
+the editor scans the buffer for the next occurrence of the
+characters ``does''.
+.PP
+Edit normally searches forward through the buffer,
+wrapping around from the end of the buffer to the beginning,
+until the specified character string is found.
+If you want to search in the reverse direction,
+use question marks (?) instead of slashes
+to surround the characters you are searching for.
+.PP
+It is also possible
+to repeat the last substitution
+without having to retype the entire command.
+An ampersand (&) used as a command
+repeats the most recent substitute command,
+using the same search and replacement patterns.
+After altering the current line by typing
+.DS I 1i
+:\|\fBs/text/texts/
+.R
+.DE
+you type
+.DS I 1i
+:\|\fB/text/&
+.R
+.DE
+or simply
+.DS I 1i
+:\|\fB//&
+.R
+.DE
+to make the same change on the next line in the buffer
+containing the characters ``text''.
+.SH
+Special characters
+.PP
+Two characters have special meanings when
+used in specifying searches: ``$'' and ``^''.
+``$'' is taken by the editor to mean ``end of the line''
+and is used to identify strings
+that occur at the end of a line.
+.DS I 1i
+:\|\fBg/text.$/s//material./p
+.R
+.DE
+tells the editor to search for all lines ending in ``text.''
+(and nothing else, not even a blank space),
+to change each final ``text.'' to ``material.'',
+and print the changed lines.
+.PP
+The symbol ``^'' indicates the beginning of a line.
+Thus,
+.DS I 1i
+:\|\fBs/^/1. /
+.R
+.DE
+instructs the editor to insert ``1.'' and a space at the beginning
+of the current line.
+.PP
+The characters ``$'' and ``^'' have special meanings only in the context
+of searching.
+At other times, they are ordinary characters.
+If you ever need to search for a character that has a special meaning,
+you must indicate that the
+character is to lose temporarily
+its special significance by typing another special character,
+the backslash (\\), before it.
+.DS I 1i
+:\|\fBs/\\\\\&$/dollar/
+.R
+.DE
+looks for the character ``$'' in the current
+line and replaces it by the word ``dollar''.
+Were it not for the backslash, the ``$'' would have represented
+``the end of the line'' in your search
+rather than the character ``$''.
+The backslash retains its special significance
+unless it is preceded by another backslash.
+.SH
+Issuing \s-2UNIX\s0 commands from the editor
+.PP
+After creating several files with the editor,
+you may want to delete files
+no longer useful to you or ask for a list of your files.
+Removing and listing files are not functions of the editor,
+and so they require the use of \s-2UNIX\s0 system commands
+(also referred to as ``shell'' commands, as
+``shell'' is the name of the program that processes \s-2UNIX\s0 commands).
+You do not need to quit the editor to execute a \s-2UNIX\s0 command
+as long as you indicate that it
+is to be sent to the shell for execution.
+To use the \s-2UNIX\s0 command
+.B rm
+to remove the file named ``junk'' type:
+.DS I 1i
+:\|\fB!rm junk
+.R
+!
+:
+.DE
+The exclamation mark (!)
+indicates that the rest of the line is to be processed as a shell command.
+If the buffer contents have not been written since the last change,
+a warning will be printed before the command is executed:
+.DS I 1i
+[No write since last change]
+.DE
+The editor prints a ``!'' when the command is completed.
+Other tutorials describe useful features of the system,
+of which an editor is only one part.
+.SH
+Filenames and file manipulation
+.PP
+Throughout each editing session,
+edit keeps track of the name of the file being edited as the
+.I "current filename."
+Edit remembers as the current filename the name given
+when you entered the editor.
+The current filename changes whenever the edit (e) command
+is used to specify a new file.
+Once edit has recorded a current filename,
+it inserts that name into any command where a filename has been omitted.
+If a write command does not specify a file,
+edit, as we have seen, supplies the current filename.
+If you are editing a file named ``draft3'' having 283 lines in it,
+you can have the editor write onto a different file
+by including its name in the write command:
+.DS I 1i
+:\fB\|w chapter3
+.R
+"chapter3" [new file] 283 lines, 8698 characters
+.DE
+The current filename remembered by the editor
+.I
+will not be changed as a result of the write command.
+.R
+Thus, if the next write command
+does not specify a name,
+edit will write onto the current file (``draft3'')
+and not onto the file ``chapter3''.
+.SH
+The file (f) command
+.PP
+To ask for the current filename, type
+.B file
+(or
+.B f ).
+In response, the editor provides current information about the buffer,
+including the filename, your current position, the number of
+lines in the buffer,
+and the percent of the distance through the file
+your current location is.
+.DS I 1i
+:\|\fBf
+.R
+"text" [Modified] line 3 of 4 --75%--
+.DE
+.\"The expression ``[Edited]'' indicates that the buffer contains
+.\"either the editor's copy of the existing file ``text''
+.\"or a file which you are just now creating.
+If the contents of the buffer have changed
+since the last time the file was written,
+the editor will tell you that the file has been ``[Modified]''.
+After you save the changes by writing onto a disk file,
+the buffer will no longer be considered modified:
+.DS I 1i
+:\|\fBw
+.R
+"text" 4 lines, 88 characters
+:\|\fBf
+.R
+"text" line 3 of 4 --75%--
+.DE
+.SH
+Reading additional files (r)
+.PP
+The
+\f3read (r)\f1 command allows you to add the contents of a file
+to the buffer
+at a specified location,
+essentially copying new lines
+between two existing lines.
+To use it, specify the line after which the new text will be placed,
+the \f3read (r)\f1 command,
+and then the name of the file.
+If you have a file named ``example'', the command
+.DS I 1i
+:\|\fB$r example
+.R
+"example" 18 lines, 473 characters
+.DE
+reads the file ``example''
+and adds it to the buffer after the last line.
+The current filename is not changed by the read command.
+.SH
+Writing parts of the buffer
+.PP
+The
+.B
+write (w)
+.R
+command can write all or part of the buffer
+to a file you specify.
+We are already familiar with
+writing the entire contents of the
+buffer to a disk file.
+To write only part of the buffer onto a file,
+indicate the beginning and ending lines before the write command,
+for example
+.DS I 1i
+:\|\fB45,$w ending
+.R
+.DE
+Here all lines from 45 through the end of the buffer
+are written onto the file named
+.I ending.
+The lines remain in the buffer
+as part of the document you are editing,
+and you may continue to edit the entire buffer.
+Your original file is unaffected
+by your command to write part of the buffer
+to another file.
+Edit still remembers whether you have saved changes to the buffer
+in your original file or not.
+.SH
+Recovering files
+.PP
+Although it does not happen very often,
+there are times \s-2UNIX\s+2 stops working
+because of some malfunction.
+This situation is known as a \fIcrash\fR.
+Under most circumstances,
+edit's crash recovery feature
+is able to save work to within a few lines of changes
+before a crash (or an accidental phone hang up).
+If you lose the contents of an editing buffer in a system crash,
+you will normally receive mail when you login that gives
+the name of the recovered file.
+To recover the file,
+enter the editor and type the command
+.B recover
+(\fBrec\fR),
+followed by the name of the lost file.
+For example,
+to recover the buffer for an edit session
+involving the file ``chap6'', the command is:
+.DS I 1i
+.R
+:\|\fBrecover chap6
+.R
+.DE
+Recover is sometimes unable to save the entire buffer successfully,
+so always check the contents of the saved buffer carefully
+before writing it back onto the original file.
+For best results,
+write the buffer to a new file temporarily
+so you can examine it without risk to the original file.
+Unfortunately,
+you cannot use the recover command
+to retrieve a file you removed
+using the shell command \f3rm\f1.
+.SH
+Other recovery techniques
+.PP
+If something goes wrong when you are using the editor,
+it may be possible to save your work by using the command
+.B preserve
+(\fBpre\fR),
+which saves the buffer as if the system had crashed.
+If you are writing a file and you get the message
+``Quota exceeded'', you have tried to use more disk storage
+than is allotted to your account.
+.I
+Proceed with caution
+.R
+because it is likely that only a part
+of the editor's buffer is now present in the file you tried to write.
+In this case you should use the shell escape from the editor (!)
+to remove some files you don't need and try to write
+the file again.
+If this is not possible and you cannot find someone to help you,
+enter the command
+.DS I 1i
+:\|\fBpreserve
+.R
+.DE
+and wait for the reply,
+.DS I 1i
+File preserved.
+.DE
+If you do not receive this reply,
+seek help immediately.
+Do not simply leave the editor.
+If you do, the buffer will be lost,
+and you may not be able to save your file.
+If the reply is ``File preserved.''
+you can leave the editor
+(or logout)
+to remedy the situation.
+After a preserve, you can use the recover command
+once the problem has been corrected,
+or the \fB\-r\fR option of the edit command
+if you leave the editor and want to return.
+.PP
+If you make an undesirable change to the buffer
+and type a write command before discovering your mistake,
+the modified version will replace any previous version of the file.
+Should you ever lose a good version of a document in this way,
+do not panic and leave the editor.
+As long as you stay in the editor,
+the contents of the buffer remain accessible.
+Depending on the nature of the problem,
+it may be possible
+to restore the buffer to a more complete
+state with the undo command.
+After fixing the damaged buffer, you can again write the file
+to disk.
+.SH
+Further reading and other information
+.PP
+Edit is an editor designed for beginning and casual users.
+It is actually a version of a more powerful editor called
+.I ex.
+These lessons are intended to introduce you to the editor
+and its more commonly-used commands.
+We have not covered all of the editor's commands,
+but a selection of commands
+that should be sufficient to accomplish most of your editing tasks.
+You can find out more about the editor in the
+.I
+Ex Reference Manual,
+.R
+which is applicable to both
+.I ex
+and
+.I edit.
+One way to become familiar with the manual is to begin by reading
+the description of commands that you already know.
+.bd I 3
+.SH
+Using
+.I ex
+.fl
+.bd I
+.PP
+As you become more experienced with using the editor,
+you may still find that edit continues to meet your needs.
+However, should you become interested in using
+.I ex,
+it is easy to switch.
+To begin an editing session with
+.I ex,
+use the name
+.B ex
+in your command instead of
+.B edit.
+.PP
+Edit commands also work in
+.I ex,
+but the editing environment is somewhat different.
+You should be aware of a few differences
+between
+.I ex
+and
+.I edit.
+In edit, only the characters ``^'', ``$'', and ``\\'' have
+special meanings in searching the buffer
+or indicating characters to be changed by a substitute command.
+Several additional characters have special
+meanings in ex, as described in the
+.I
+Ex Reference Manual.
+.R
+Another feature of the edit environment prevents users from
+accidently entering two alternative modes of editing,
+.I open
+and
+.I visual,
+in which
+the editor behaves quite differently from normal command mode.
+If you are using ex and you encounter strange behavior,
+you may have accidently entered open mode by typing ``o''.
+Type the \s-2ESC\s0 key and then a ``Q''
+to get out of open or visual mode and back into
+the regular editor command mode.
+The document
+.I
+An Introduction to Display Editing with Vi\|\|
+.R
+provide full details of visual mode.
+.bp
+.SH
+.ce 1
+\s+2Index\s0
+.LP
+.sp 2
+.2C
+.nf
+addressing, \fIsee\fR line numbers
+ampersand, 20
+append mode, 6-7
+append (a) command, 6, 7, 9
+``At end of file'' (message), 18
+backslash (\\), 21
+buffer, 3
+caret (^), 10, 20
+change (c) command, 18
+command mode, 5-6
+``Command not found'' (message), 6
+context search, 10-12, 19-21
+control characters (``^'' notation), 10
+control-H, 7
+copy (co) command, 15
+corrections, 7, 16
+current filename, 21
+current line (\|.\|), 11, 17
+delete (d) command, 15-16
+dial-up, 5
+disk, 3
+documentation, 3, 23
+dollar ($), 10, 11, 17, 20-21
+dot (\f3\|.\|\f1) 11, 17
+edit (text editor), 3, 5, 23
+edit (e) command, 5, 9, 14
+editing commands:
+.in +.25i
+append (a), 6, 7, 9
+change (c), 18
+copy (co), 15
+delete (d), 15-16
+edit (text editor), 3, 5, 23
+edit (e), 5, 9, 14
+file (f), 21-22
+global (g), 19
+move (m), 14-15
+number (nu), 11
+preserve (pre), 22-23
+print (p), 10
+quit (q), 8, 13
+read (r), 22
+recover (rec), 22, 23
+substitute (s), 11-12, 19, 20
+undo (u), 16-17, 23
+write (w), 8, 13, 21, 22
+z, 12-13
+! (shell escape), 21
+$=, 17
++, 17
+\-, 17
+//, 12, 20
+??, 20
+\&., 11, 17
+\&.=, 11, 17
+.in -.25i
+entering text, 3, 6-7
+erasing
+.in +.25i
+characters (^H), 7
+lines (@), 7
+.in -.25i
+error corrections, 7, 16
+ex (text editor), 23
+\fIEx Reference Manual\fR, 23
+exclamation (!), 21
+file, 3
+file (f) command, 21-22
+file recovery, 22-23
+filename, 3, 21
+global (g) command, 19
+input mode, 6-7
+Interrupt (message), 9
+line numbers, \fIsee also\fR current line
+.in +.25i
+dollar sign ($), 10, 11, 17
+dot (\|.\|), 11, 17
+relative (+ and \-), 17
+.in -.25i
+list, 10
+logging in, 4-6
+logging out, 8
+``Login incorrect'' (message), 5
+minus (\-), 17
+move (m) command, 14-15
+``Negative address\(emfirst buffer line is 1'' (message), 18
+``No current filename'' (message), 8
+``No such file or directory'' (message), 5, 6
+``No write since last change'' (message), 21
+non-printing characters, 10
+``Nonzero address required'' (message), 18
+``Not an editor command'' (message), 6
+``Not that many lines in buffer'' (message), 18
+number (nu) command, 11
+password, 5
+period (\|.\|), 11, 17
+plus (+), 17
+preserve (pre) command, 22-23
+print (p) command, 10
+program, 3
+prompts
+.in .25i
+% (\s-2UNIX\s0), 5
+: (edit), 5, 6, 7
+\0 (append), 7
+.in -.25i
+question (?), 20
+quit (q) command, 8, 13
+read (r) command, 22
+recover (rec) command, 22, 23
+recovery, \fIsee\fR\| file recovery
+references, 3, 23
+remove (rm) command, 21, 22
+reverse command effects (undo), 16-17, 23
+searching, 10-12, 19-21
+shell, 21
+shell escape (!), 21
+slash (/), 11-12, 20
+special characters (^, $, \\), 10, 11, 17, 20-21
+substitute (s) command, 11-12, 19, 20
+terminals, 4-5
+text input mode, 7
+undo (u) command, 16-17, 23
+\s-1UNIX\s0, 3
+write (w) command, 8, 13, 21, 22
+z command, 12-13
+
diff --git a/usr.bin/vi/USD.doc/exref/Makefile b/usr.bin/vi/USD.doc/exref/Makefile
new file mode 100644
index 000000000000..11f4e6650dcc
--- /dev/null
+++ b/usr.bin/vi/USD.doc/exref/Makefile
@@ -0,0 +1,14 @@
+# @(#)Makefile 8.1 (Berkeley) 6/8/93
+
+DIR= usd/13.ex
+SRCS= ex.rm
+MACROS= -msU
+CLEANFILES=summary.*
+
+paper.ps: ${SRCS} summary.ps
+ ${ROFF} ${SRCS} > ${.TARGET}
+
+summary.ps: ex.summary
+ ${TBL} ex.summary | ${ROFF} > ${.TARGET}
+
+.include <bsd.doc.mk>
diff --git a/usr.bin/vi/USD.doc/exref/ex.rm b/usr.bin/vi/USD.doc/exref/ex.rm
new file mode 100644
index 000000000000..79670c2cf66b
--- /dev/null
+++ b/usr.bin/vi/USD.doc/exref/ex.rm
@@ -0,0 +1,2230 @@
+.\" Copyright (c) 1980, 1993
+.\" 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.
+.\"
+.\" @(#)ex.rm 8.1 (Berkeley) 6/8/93
+.\"
+.EH 'USD:13-%''Ex Reference Manual'
+.OH 'Ex Reference Manual''USD:13-%'
+.de ZP
+.nr pd \\n()P
+.nr )P 0
+.if \\n(.$=0 .IP
+.if \\n(.$=1 .IP "\\$1"
+.if \\n(.$>=2 .IP "\\$1" "\\$2"
+.nr )P \\n(pd
+.rm pd
+..
+.de LC
+.br
+.sp .1i
+.ne 4
+.LP
+.ta 4.0i
+..
+.bd S B 3
+.\".RP
+.TL
+Ex Reference Manual
+.br
+Version 3.7
+.AU
+William Joy
+.AU
+Mark Horton
+.AI
+Computer Science Division
+Department of Electrical Engineering and Computer Science
+University of California, Berkeley
+Berkeley, Ca. 94720
+.AB
+.I Ex
+a line oriented text editor, which supports both command and display
+oriented editing.
+This reference manual describes the command oriented part of
+.I ex;
+the display editing features of
+.I ex
+are described in
+.I "An Introduction to Display Editing with Vi."
+Other documents about the editor include the introduction
+.I "Edit: A tutorial",
+the
+.I "Ex/edit Command Summary",
+and a
+.I "Vi Quick Reference"
+card.
+.AE
+.NH 1
+Starting ex
+.PP
+.FS
+The financial support of an \s-2IBM\s0 Graduate Fellowship and the National
+Science Foundation under grants MCS74-07644-A03 and MCS78-07291 is gratefully
+acknowledged.
+.FE
+Each instance of the editor has a set of options,
+which can be set to tailor it to your liking.
+The command
+.I edit
+invokes a version of
+.I ex
+designed for more casual or beginning
+users by changing the default settings of some of these options.
+To simplify the description which follows we
+assume the default settings of the options.
+.PP
+When invoked,
+.I ex
+determines the terminal type from the \s-2TERM\s0 variable in the environment.
+It there is a \s-2TERMCAP\s0 variable in the environment, and the type
+of the terminal described there matches the \s-2TERM\s0 variable,
+then that description
+is used. Also if the \s-2TERMCAP\s0 variable contains a pathname (beginning
+with a \fB/\fR) then the editor will seek the description of the terminal
+in that file (rather than the default /etc/termcap).
+If there is a variable \s-2EXINIT\s0 in the environment, then the editor
+will execute the commands in that variable,
+otherwise if there is a file
+.I \&.exrc
+in your \s-2HOME\s0 directory
+.I ex
+reads commands from that file, simulating a
+.I source
+command.
+Option setting commands placed in
+\s-2EXINIT\s0 or
+.I \&.exrc
+will be executed before each editor session.
+.PP
+A command to enter
+.I ex
+has the following prototype:\(dg
+.FS
+\(dg Brackets `[' `]' surround optional parameters here.
+.FE
+.DS
+\fBex\fP [ \fB\-\fP ] [ \fB\-v\fP ] [ \fB\-t\fP \fItag\fP ] [ \fB\-r\fP ] [ \fB\-l\fP ] [ \fB\-w\fP\fIn\fP ] [ \fB\-x\fP ] [ \fB\-R\fP ] [ \fB+\fP\fIcommand\fP ] name ...
+.DE
+The most common case edits a single file with no options, i.e.:
+.DS
+\fBex\fR name
+.DE
+The
+.B \-
+command line option
+option suppresses all interactive-user feedback
+and is useful in processing editor scripts in command files.
+The
+.B \-v
+option is equivalent to using
+.I vi
+rather than
+.I ex.
+The
+.B \-t
+option is equivalent to an initial
+.I tag
+command, editing the file containing the
+.I tag
+and positioning the editor at its definition.
+The
+.B \-r
+option is used in recovering after an editor or system crash,
+retrieving the last saved version of the named file or,
+if no file is specified,
+typing a list of saved files.
+The
+.B \-l
+option sets up for editing \s-2LISP\s0, setting the
+.I showmatch
+and
+.I lisp
+options.
+The
+.B \-w
+option sets the default window size to
+.I n,
+and is useful on dialups to start in small windows.
+The
+.B \-x
+option causes
+.I ex
+to prompt for a
+.I key ,
+which is used to encrypt and decrypt the contents of the file,
+which should already be encrypted using the same key,
+see
+.I crypt (1).
+The
+.B \-R
+option sets the
+.I readonly
+option at the start.
+.I Name
+arguments indicate files to be edited.
+An argument of the form
+\fB+\fIcommand\fR
+indicates that the editor should begin by executing the specified command.
+If
+.I command
+is omitted, then it defaults to ``$'', positioning the editor at the last
+line of the first file initially. Other useful commands here are scanning
+patterns of the form ``/pat'' or line numbers, e.g. ``+100'' starting
+at line 100.
+.NH 1
+File manipulation
+.NH 2
+Current file
+.PP
+.I Ex
+is normally editing the contents of a single file,
+whose name is recorded in the
+.I current
+file name.
+.I Ex
+performs all editing actions in a buffer
+(actually a temporary file)
+into which the text of the file is initially read.
+Changes made to the buffer have no effect on the file being
+edited unless and until the buffer contents are written out to the
+file with a
+.I write
+command.
+After the buffer contents are written,
+the previous contents of the written file are no longer accessible.
+When a file is edited,
+its name becomes the current file name,
+and its contents are read into the buffer.
+.PP
+The current file is almost always considered to be
+.I edited.
+This means that the contents of the buffer are logically
+connected with the current file name,
+so that writing the current buffer contents onto that file,
+even if it exists,
+is a reasonable action.
+If the current file is not
+.I edited
+then
+.I ex
+will not normally write on it if it already exists.*
+.FS
+* The
+.I file
+command will say ``[Not edited]'' if the current file is not considered
+edited.
+.FE
+.NH 2
+Alternate file
+.PP
+Each time a new value is given to the current file name,
+the previous current file name is saved as the
+.I alternate
+file name.
+Similarly if a file is mentioned but does not become the current file,
+it is saved as the alternate file name.
+.NH 2
+Filename expansion
+.PP
+Filenames within the editor may be specified using the normal
+shell expansion conventions.
+In addition,
+the character `%' in filenames is replaced by the
+.I current
+file name and the character
+`#' by the
+.I alternate
+file name.\(dg
+.FS
+\(dg This makes it easy to deal alternately with
+two files and eliminates the need for retyping the
+name supplied on an
+.I edit
+command after a
+.I "No write since last change"
+diagnostic is received.
+.FE
+.NH 2
+Multiple files and named buffers
+.PP
+If more than one file is given on the command line,
+then the first file is edited as described above.
+The remaining arguments are placed with the first file in the
+.I "argument list."
+The current argument list may be displayed with the
+.I args
+command.
+The next file in the argument list may be edited with the
+.I next
+command.
+The argument list may also be respecified by specifying
+a list of names to the
+.I next
+command.
+These names are expanded,
+the resulting list of names becomes the new argument list,
+and
+.I ex
+edits the first file on the list.
+.PP
+For saving blocks of text while editing, and especially when editing
+more than one file,
+.I ex
+has a group of named buffers.
+These are similar to the normal buffer, except that only a limited number
+of operations are available on them.
+The buffers have names
+.I a
+through
+.I z.\(dd
+.FS
+\(dd It is also possible to refer to
+.I A
+through
+.I Z;
+the upper case buffers are the same as the lower but commands
+append to named buffers rather than replacing
+if upper case names are used.
+.FE
+.NH 2
+Read only
+.PP
+It is possible to use
+.I ex
+in
+.I "read only"
+mode to look at files that you have no intention of modifying.
+This mode protects you from accidently overwriting the file.
+Read only mode is on when the
+.I readonly
+option is set.
+It can be turned on with the
+.B \-R
+command line option,
+by the
+.I view
+command line invocation,
+or by setting the
+.I readonly
+option.
+It can be cleared by setting
+.I noreadonly .
+It is possible to write, even while in read only mode, by indicating
+that you really know what you are doing.
+You can write to a different file, or can use the ! form of write,
+even while in read only mode.
+.NH 1
+Exceptional Conditions
+.NH 2
+Errors and interrupts
+.PP
+When errors occur
+.I ex
+(optionally) rings the terminal bell and, in any case, prints an error
+diagnostic. If the primary input is from a file, editor processing
+will terminate. If an interrupt signal is received,
+.I ex
+prints ``Interrupt'' and returns to its command level. If the primary
+input is a file, then
+.I ex
+will exit when this occurs.
+.NH 2
+Recovering from hangups and crashes
+.PP
+If a hangup signal is received and the buffer has been modified since
+it was last written out, or if the system crashes, either the editor
+(in the first case) or the system (after it reboots in the second) will
+attempt to preserve the buffer. The next time you log in you should be
+able to recover the work you were doing, losing at most a few lines of
+changes from the last point before the hangup or editor crash. To
+recover a file you can use the
+.B \-r
+option. If you were editing the file
+.I resume,
+then you should change
+to the directory where you were when the crash occurred, giving the command
+.DS
+\fBex \-r\fP\fI resume\fP
+.DE
+After checking that the retrieved file is indeed ok, you can
+.I write
+it over the previous contents of that file.
+.PP
+You will normally get mail from the system telling you when a file has
+been saved after a crash. The command
+.DS
+\fBex\fP \-\fBr\fP
+.DE
+will print a list of the files which have been saved for you.
+(In the case of a hangup,
+the file will not appear in the list,
+although it can be recovered.)
+.NH 1
+Editing modes
+.PP
+.I Ex
+has five distinct modes. The primary mode is
+.I command
+mode. Commands are entered in command mode when a `:' prompt is
+present, and are executed each time a complete line is sent. In
+.I "text input"
+mode
+.I ex
+gathers input lines and places them in the file. The
+.I append,
+.I insert,
+and
+.I change
+commands use text input mode.
+No prompt is printed when you are in text input mode.
+This mode is left by typing a `.' alone at the beginning of a line, and
+.I command
+mode resumes.
+.PP
+The last three modes are
+.I open
+and
+.I visual
+modes, entered by the commands of the same name, and, within open and
+visual modes
+.I "text insertion"
+mode.
+.I Open
+and
+.I visual
+modes allow local editing operations to be performed on the text in the
+file. The
+.I open
+command displays one line at a time on any terminal while
+.I visual
+works on \s-2CRT\s0 terminals with random positioning cursors, using the
+screen as a (single) window for file editing changes.
+These modes are described (only) in
+.I "An Introduction to Display Editing with Vi."
+.NH
+Command structure
+.PP
+Most command names are English words,
+and initial prefixes of the words are acceptable abbreviations.
+The ambiguity of abbreviations is resolved in favor of the more commonly
+used commands.*
+.FS
+* As an example, the command
+.I substitute
+can be abbreviated `s'
+while the shortest available abbreviation for the
+.I set
+command is `se'.
+.FE
+.NH 2
+Command parameters
+.PP
+Most commands accept prefix addresses specifying the lines in the file
+upon which they are to have effect.
+The forms of these addresses will be discussed below.
+A number of commands also may take a trailing
+.I count
+specifying the number of lines to be involved in the command.\(dg
+.FS
+\(dg Counts are rounded down if necessary.
+.FE
+Thus the command ``10p'' will print the tenth line in the buffer while
+``delete 5'' will delete five lines from the buffer,
+starting with the current line.
+.PP
+Some commands take other information or parameters,
+this information always being given after the command name.\(dd
+.FS
+\(dd Examples would be option names in a
+.I set
+command i.e. ``set number'',
+a file name in an
+.I edit
+command,
+a regular expression in a
+.I substitute
+command,
+or a target address for a
+.I copy
+command, i.e. ``1,5 copy 25''.
+.FE
+.NH 2
+Command variants
+.PP
+A number of commands have two distinct variants.
+The variant form of the command is invoked by placing an
+`!' immediately after the command name.
+Some of the default variants may be controlled by options;
+in this case, the `!' serves to toggle the default.
+.NH 2
+Flags after commands
+.PP
+The characters `#', `p' and `l' may be placed after many commands.**
+.FS
+**
+A `p' or `l' must be preceded by a blank or tab
+except in the single special case `dp'.
+.FE
+In this case, the command abbreviated by these characters
+is executed after the command completes.
+Since
+.I ex
+normally prints the new current line after each change, `p' is rarely necessary.
+Any number of `+' or `\-' characters may also be given with these flags.
+If they appear, the specified offset is applied to the current line
+value before the printing command is executed.
+.NH 2
+Comments
+.PP
+It is possible to give editor commands which are ignored.
+This is useful when making complex editor scripts
+for which comments are desired.
+The comment character is the double quote: ".
+Any command line beginning with " is ignored.
+Comments beginning with " may also be placed at the ends
+of commands, except in cases where they could be confused as part
+of text (shell escapes and the substitute and map commands).
+.NH 2
+Multiple commands per line
+.PP
+More than one command may be placed on a line by separating each pair
+of commands by a `|' character.
+However the
+.I global
+commands,
+comments,
+and the shell escape `!'
+must be the last command on a line, as they are not terminated by a `|'.
+.NH 2
+Reporting large changes
+.PP
+Most commands which change the contents of the editor buffer give
+feedback if the scope of the change exceeds a threshold given by the
+.I report
+option.
+This feedback helps to detect undesirably large changes so that they may
+be quickly and easily reversed with an
+.I undo.
+After commands with more global effect such as
+.I global
+or
+.I visual,
+you will be informed if the net change in the number of lines
+in the buffer during this command exceeds this threshold.
+.NH 1
+Command addressing
+.NH 2
+Addressing primitives
+.IP \fB.\fR 20
+The current line.
+Most commands leave the current line as the last line which they affect.
+The default address for most commands is the current line,
+thus `\fB.\fR' is rarely used alone as an address.
+.IP \fIn\fR 20
+The \fIn\fRth line in the editor's buffer, lines being numbered
+sequentially from 1.
+.IP \fB$\fR 20
+The last line in the buffer.
+.IP \fB%\fR 20
+An abbreviation for ``1,$'', the entire buffer.
+.IP \fI+n\fR\ \fI\-n\fR 20
+An offset relative to the current buffer line.\(dg
+.FS
+\(dg
+The forms `.+3' `+3' and `+++' are all equivalent;
+if the current line is line 100 they all address line 103.
+.FE
+.IP \fB/\fIpat\fR\fB/\fR\ \fB?\fIpat\fR\fB?\fR 20
+Scan forward and backward respectively for a line containing \fIpat\fR, a
+regular expression (as defined below). The scans normally wrap around the end
+of the buffer.
+If all that is desired is to print the next line containing \fIpat\fR, then
+the trailing \fB/\fR or \fB?\fR may be omitted.
+If \fIpat\fP is omitted or explicitly empty, then the last
+regular expression specified is located.\(dd
+.FS
+\(dd The forms \fB\e/\fP and \fB\e?\fP scan
+using the last regular expression used in a scan; after a substitute
+\fB//\fP and \fB??\fP would scan using the substitute's regular expression.
+.FE
+.IP \fB\(aa\(aa\fP\ \fB\(aa\fP\fIx\fP 20
+Before each non-relative motion of the current line `\fB.\fP',
+the previous current line is marked with a tag, subsequently referred to as
+`\(aa\(aa'.
+This makes it easy to refer or return to this previous context.
+Marks may also be established by the
+.I mark
+command, using single lower case letters
+.I x
+and the marked lines referred to as
+`\(aa\fIx\fR'.
+.NH 2
+Combining addressing primitives
+.PP
+Addresses to commands consist of a series of addressing primitives,
+separated by `,' or `;'.
+Such address lists are evaluated left-to-right.
+When addresses are separated by `;' the current line `\fB.\fR'
+is set to the value of the previous addressing expression
+before the next address is interpreted.
+If more addresses are given than the command requires,
+then all but the last one or two are ignored.
+If the command takes two addresses, the first addressed line must
+precede the second in the buffer.\(dg
+.FS
+\(dg Null address specifications are permitted in a list of addresses,
+the default in this case is the current line `.';
+thus `,100' is equivalent to `\fB.\fR,100'.
+It is an error to give a prefix address to a command which expects none.
+.FE
+.NH 1
+Command descriptions
+.PP
+The following form is a prototype for all
+.I ex
+commands:
+.DS
+\fIaddress\fR \fBcommand\fR \fI! parameters count flags\fR
+.DE
+All parts are optional; the degenerate case is the empty command which prints
+the next line in the file. For sanity with use from within
+.I visual
+mode,
+.I ex
+ignores a ``:'' preceding any command.
+.PP
+In the following command descriptions, the
+default addresses are shown in parentheses,
+which are
+.I not,
+however,
+part of the command.
+.LC
+\fBabbreviate\fR \fIword rhs\fP abbr: \fBab\fP
+.ZP
+Add the named abbreviation to the current list.
+When in input mode in visual, if
+.I word
+is typed as a complete word, it will be changed to
+.I rhs .
+.LC
+( \fB.\fR ) \fBappend\fR abbr: \fBa\fR
+.br
+\fItext\fR
+.br
+\&\fB.\fR
+.ZP
+Reads the input text and places it after the specified line.
+After the command, `\fB.\fR'
+addresses the last line input or the
+specified line if no lines were input.
+If address `0' is given,
+text is placed at the beginning of the buffer.
+.LC
+\fBa!\fR
+.br
+\fItext\fR
+.br
+\&\fB.\fR
+.ZP
+The variant flag to
+.I append
+toggles the setting for the
+.I autoindent
+option during the input of
+.I text.
+.LC
+\fBargs\fR
+.ZP
+The members of the argument list are printed, with the current argument
+delimited by `[' and `]'.
+.ig
+.PP
+\fBcd\fR \fIdirectory\fR
+.ZP
+The
+.I cd
+command is a synonym for
+.I chdir.
+..
+.LC
+( \fB.\fP , \fB.\fP ) \fBchange\fP \fIcount\fP abbr: \fBc\fP
+.br
+\fItext\fP
+.br
+\&\fB.\fP
+.ZP
+Replaces the specified lines with the input \fItext\fP.
+The current line becomes the last line input;
+if no lines were input it is left as for a
+\fIdelete\fP.
+.LC
+\fBc!\fP
+.br
+\fItext\fP
+.br
+\&\fB.\fP
+.ZP
+The variant toggles
+.I autoindent
+during the
+.I change.
+.ig
+.LC
+\fBchdir\fR \fIdirectory\fR
+.ZP
+The specified \fIdirectory\fR becomes the current directory.
+If no directory is specified, the current value of the
+.I home
+option is used as the target directory.
+After a
+.I chdir
+the current file is not considered to have been
+edited so that write restrictions on pre-existing files apply.
+..
+.LC
+( \fB.\fP , \fB.\fP )\|\fBcopy\fP \fIaddr\fP \fIflags\fP abbr: \fBco\fP
+.ZP
+A
+.I copy
+of the specified lines is placed after
+.I addr,
+which may be `0'.
+The current line
+`\fB.\fR'
+addresses the last line of the copy.
+The command
+.I t
+is a synonym for
+.I copy.
+.LC
+( \fB.\fR , \fB.\fR )\|\fBdelete\fR \fIbuffer\fR \fIcount\fR \fIflags\fR abbr: \fBd\fR
+.ZP
+Removes the specified lines from the buffer.
+The line after the last line deleted becomes the current line;
+if the lines deleted were originally at the end,
+the new last line becomes the current line.
+If a named
+.I buffer
+is specified by giving a letter,
+then the specified lines are saved in that buffer,
+or appended to it if an upper case letter is used.
+.LC
+\fBedit\fR \fIfile\fR abbr: \fBe\fR
+.br
+\fBex\fR \fIfile\fR
+.ZP
+Used to begin an editing session on a new file.
+The editor
+first checks to see if the buffer has been modified since the last
+.I write
+command was issued.
+If it has been,
+a warning is issued and the
+command is aborted.
+The
+command otherwise deletes the entire contents of the editor buffer,
+makes the named file the current file and prints the new filename.
+After insuring that this file is sensible\(dg
+.FS
+\(dg I.e., that it is not a binary file such as a directory,
+a block or character special file other than
+.I /dev/tty,
+a terminal,
+or a binary or executable file
+(as indicated by the first word).
+.FE
+the editor reads the file into its buffer.
+.IP
+If the read of the file completes without error,
+the number of lines and characters read is typed.
+If there were any non-\s-2ASCII\s0 characters
+in the file they are stripped of their non-\s-2ASCII\s0
+high bits,
+and any null characters in the file are discarded.
+If none of these errors occurred, the file is considered
+.I edited.
+If the last line of the input file is missing the trailing
+newline character, it will be supplied and a complaint will be issued.
+This command leaves the current line `\fB.\fR' at the last line read.\(dd
+.FS
+\(dd If executed from within
+.I open
+or
+.I visual,
+the current line is initially the first line of the file.
+.FE
+.LC
+\fBe!\fR \fIfile\fR
+.ZP
+The variant form suppresses the complaint about modifications having
+been made and not written from the editor buffer, thus
+discarding all changes which have been made before editing the new file.
+.LC
+\fBe\fR \fB+\fIn\fR \fIfile\fR
+.ZP
+Causes the editor to begin at line
+.I n
+rather than at the last line;
+\fIn\fR may also be an editor command containing no spaces, e.g.: ``+/pat''.
+.LC
+\fBfile\fR abbr: \fBf\fR
+.ZP
+Prints the current file name,
+whether it has been `[Modified]' since the last
+.I write
+command,
+whether it is
+.I "read only" ,
+the current line,
+the number of lines in the buffer,
+and the percentage of the way through the buffer of the current line.*
+.FS
+* In the rare case that the current file is `[Not edited]' this is
+noted also; in this case you have to use the form \fBw!\fR to write to
+the file, since the editor is not sure that a \fBwrite\fR will not
+destroy a file unrelated to the current contents of the buffer.
+.FE
+.LC
+\fBfile\fR \fIfile\fR
+.ZP
+The current file name is changed to
+.I file
+which is considered
+`[Not edited]'.
+.LC
+( 1 , $ ) \fBglobal\fR /\fIpat\|\fR/ \fIcmds\fR abbr: \fBg\fR
+.ZP
+First marks each line among those specified which matches
+the given regular expression.
+Then the given command list is executed with `\fB.\fR' initially
+set to each marked line.
+.IP
+The command list consists of the remaining commands on the current
+input line and may continue to multiple lines by ending all but the
+last such line with a `\e'.
+If
+.I cmds
+(and possibly the trailing \fB/\fR delimiter) is omitted, each line matching
+.I pat
+is printed.
+.I Append,
+.I insert,
+and
+.I change
+commands and associated input are permitted;
+the `\fB.\fR' terminating input may be omitted if it would be on the
+last line of the command list.
+.I Open
+and
+.I visual
+commands are permitted in the command list and take input from the terminal.
+.IP
+The
+.I global
+command itself may not appear in
+.I cmds.
+The
+.I undo
+command is also not permitted there,
+as
+.I undo
+instead can be used to reverse the entire
+.I global
+command.
+The options
+.I autoprint
+and
+.I autoindent
+are inhibited during a
+.I global,
+(and possibly the trailing \fB/\fR delimiter) and the value of the
+.I report
+option is temporarily infinite,
+in deference to a \fIreport\fR for the entire global.
+Finally, the context mark `\'\'' is set to the value of
+`.' before the global command begins and is not changed during a global
+command,
+except perhaps by an
+.I open
+or
+.I visual
+within the
+.I global.
+.LC
+\fBg!\fR \fB/\fIpat\fB/\fR \fIcmds\fR abbr: \fBv\fR
+.IP
+The variant form of \fIglobal\fR runs \fIcmds\fR at each line not matching
+\fIpat\fR.
+.LC
+( \fB.\fR )\|\fBinsert\fR abbr: \fBi\fR
+.br
+\fItext\fR
+.br
+\&\fB.\fR
+.ZP
+Places the given text before the specified line.
+The current line is left at the last line input;
+if there were none input it is left at the line before the addressed line.
+This command differs from
+.I append
+only in the placement of text.
+.KS
+.LC
+\fBi!\fR
+.br
+\fItext\fR
+.br
+\&\fB.\fR
+.ZP
+The variant toggles
+.I autoindent
+during the
+.I insert.
+.KE
+.LC
+( \fB.\fR , \fB.\fR+1 ) \fBjoin\fR \fIcount\fR \fIflags\fR abbr: \fBj\fR
+.ZP
+Places the text from a specified range of lines
+together on one line.
+White space is adjusted at each junction to provide at least
+one blank character, two if there was a `\fB.\fR' at the end of the line,
+or none if the first following character is a `)'.
+If there is already white space at the end of the line,
+then the white space at the start of the next line will be discarded.
+.LC
+\fBj!\fR
+.ZP
+The variant causes a simpler
+.I join
+with no white space processing; the characters in the lines are simply
+concatenated.
+.LC
+( \fB.\fR ) \fBk\fR \fIx\fR
+.ZP
+The
+.I k
+command is a synonym for
+.I mark.
+It does not require a blank or tab before the following letter.
+.LC
+( \fB.\fR , \fB.\fR ) \fBlist\fR \fIcount\fR \fIflags\fR
+.ZP
+Prints the specified lines in a more unambiguous way:
+tabs are printed as `^I'
+and the end of each line is marked with a trailing `$'.
+The current line is left at the last line printed.
+.LC
+\fBmap\fR \fIlhs\fR \fIrhs\fR
+.ZP
+The
+.I map
+command is used to define macros for use in
+.I visual
+mode.
+.I Lhs
+should be a single character, or the sequence ``#n'', for n a digit,
+referring to function key \fIn\fR. When this character or function key
+is typed in
+.I visual
+mode, it will be as though the corresponding \fIrhs\fR had been typed.
+On terminals without function keys, you can type ``#n''.
+See section 6.9 of the ``Introduction to Display Editing with Vi''
+for more details.
+.LC
+( \fB.\fR ) \fBmark\fR \fIx\fR
+.ZP
+Gives the specified line mark
+.I x,
+a single lower case letter.
+The
+.I x
+must be preceded by a blank or a tab.
+The addressing form `\'x' then addresses this line.
+The current line is not affected by this command.
+.LC
+( \fB.\fR , \fB.\fR ) \fBmove\fR \fIaddr\fR abbr: \fBm\fR
+.ZP
+The
+.I move
+command repositions the specified lines to be after
+.I addr .
+The first of the moved lines becomes the current line.
+.LC
+\fBnext\fR abbr: \fBn\fR
+.ZP
+The next file from the command line argument list is edited.
+.LC
+\fBn!\fR
+.ZP
+The variant suppresses warnings about the modifications to the buffer not
+having been written out, discarding (irretrievably) any changes which may
+have been made.
+.LC
+\fBn\fR \fIfilelist\fR
+.br
+\fBn\fR \fB+\fIcommand\fR \fIfilelist\fR
+.ZP
+The specified
+.I filelist
+is expanded and the resulting list replaces the
+current argument list;
+the first file in the new list is then edited.
+If
+.I command
+is given (it must contain no spaces), then it is executed after editing the first such file.
+.LC
+( \fB.\fR , \fB.\fR ) \fBnumber\fR \fIcount\fR \fIflags\fR abbr: \fB#\fR or \fBnu\fR
+.ZP
+Prints each specified line preceded by its buffer line
+number.
+The current line is left at the last line printed.
+.KS
+.LC
+( \fB.\fR ) \fBopen\fR \fIflags\fR abbr: \fBo\fR
+.br
+( \fB.\fR ) \fBopen\fR /\fIpat\|\fR/ \fIflags\fR
+.ZP
+Enters intraline editing \fIopen\fR mode at each addressed line.
+If
+.I pat
+is given,
+then the cursor will be placed initially at the beginning of the
+string matched by the pattern.
+To exit this mode use Q.
+See
+.I "An Introduction to Display Editing with Vi"
+for more details.
+.KE
+.LC
+\fBpreserve\fR
+.ZP
+The current editor buffer is saved as though the system had just crashed.
+This command is for use only in emergencies when a
+.I write
+command has resulted in an error and you don't know how to save your work.
+After a
+.I preserve
+you should seek help.
+.LC
+( \fB.\fR , \fB.\fR )\|\fBprint\fR \fIcount\fR abbr: \fBp\fR or \fBP\fR
+.ZP
+Prints the specified lines
+with non-printing characters printed as control characters `^\fIx\fR\|';
+delete (octal 177) is represented as `^?'.
+The current line is left at the last line printed.
+.LC
+( \fB.\fR )\|\fBput\fR \fIbuffer\fR abbr: \fBpu\fR
+.ZP
+Puts back
+previously
+.I deleted
+or
+.I yanked
+lines.
+Normally used with
+.I delete
+to effect movement of lines,
+or with
+.I yank
+to effect duplication of lines.
+If no
+.I buffer
+is specified, then the last
+.I deleted
+or
+.I yanked
+text is restored.*
+.FS
+* But no modifying commands may intervene between the
+.I delete
+or
+.I yank
+and the
+.I put,
+nor may lines be moved between files without using a named buffer.
+.FE
+By using a named buffer, text may be restored that was saved there at any
+previous time.
+.LC
+\fBquit\fR abbr: \fBq\fR
+.ZP
+Causes
+.I ex
+to terminate.
+No automatic write of the editor buffer to a file is performed.
+However,
+.I ex
+issues a warning message if the file has changed
+since the last
+.I write
+command was issued, and does not
+.I quit.\(dg
+.FS
+\(dg \fIEx\fR
+will also issue a diagnostic if there are more files in the argument
+list.
+.FE
+Normally, you will wish to save your changes, and you
+should give a \fIwrite\fR command;
+if you wish to discard them, use the \fBq!\fR command variant.
+.LC
+\fBq!\fR
+.ZP
+Quits from the editor, discarding changes to the buffer without complaint.
+.LC
+( \fB.\fR ) \fBread\fR \fIfile\fR abbr: \fBr\fR
+.ZP
+Places a copy of the text of the given file in the
+editing buffer after the specified line.
+If no
+.I file
+is given the current file name is used.
+The current file name is not changed unless there is none in which
+case
+.I file
+becomes the current name.
+The sensibility restrictions for the
+.I edit
+command apply here also.
+If the file buffer is empty and there is no current name then
+.I ex
+treats this as an
+.I edit
+command.
+.IP
+Address `0' is legal for this command and causes the file to be read at
+the beginning of the buffer.
+Statistics are given as for the
+.I edit
+command when the
+.I read
+successfully terminates.
+After a
+.I read
+the current line is the last line read.\(dd
+.FS
+\(dd Within
+.I open
+and
+.I visual
+the current line is set to the first line read rather than the last.
+.FE
+.LC
+( \fB.\fR ) \fBread\fR \fB!\fR\fIcommand\fR
+.ZP
+Reads the output of the command
+.I command
+into the buffer after the specified line.
+This is not a variant form of the command, rather a read
+specifying a
+.I command
+rather than a
+.I filename;
+a blank or tab before the \fB!\fR is mandatory.
+.LC
+\fBrecover \fIfile\fR
+.ZP
+Recovers
+.I file
+from the system save area.
+Used after a accidental hangup of the phone**
+.FS
+** The system saves a copy of the file you were editing only if you
+have made changes to the file.
+.FE
+or a system crash** or
+.I preserve
+command.
+Except when you use
+.I preserve
+you will be notified by mail when a file is saved.
+.LC
+\fBrewind\fR abbr: \fBrew\fR
+.ZP
+The argument list is rewound, and the first file in the list is edited.
+.LC
+\fBrew!\fR
+.ZP
+Rewinds the argument list discarding any changes made to the current buffer.
+.LC
+\fBset\fR \fIparameter\fR
+.ZP
+With no arguments, prints those options whose values have been
+changed from their defaults;
+with parameter
+.I all
+it prints all of the option values.
+.IP
+Giving an option name followed by a `?'
+causes the current value of that option to be printed.
+The `?' is unnecessary unless the option is Boolean valued.
+Boolean options are given values either by the form
+`set \fIoption\fR' to turn them on or
+`set no\fIoption\fR' to turn them off;
+string and numeric options are assigned via the form
+`set \fIoption\fR=value'.
+.IP
+More than one parameter may be given to
+.I set \|;
+they are interpreted left-to-right.
+.LC
+\fBshell\fR abbr: \fBsh\fR
+.IP
+A new shell is created.
+When it terminates, editing resumes.
+.LC
+\fBsource\fR \fIfile\fR abbr: \fBso\fR
+.IP
+Reads and executes commands from the specified file.
+.I Source
+commands may be nested.
+.LC
+( \fB.\fR , \fB.\fR ) \fBsubstitute\fR /\fIpat\fR\|/\fIrepl\fR\|/ \fIoptions\fR \fIcount\fR \fIflags\fR abbr: \fBs\fR
+.IP
+On each specified line, the first instance of pattern
+.I pat
+is replaced by replacement pattern
+.I repl.
+If the
+.I global
+indicator option character `g'
+appears, then all instances are substituted;
+if the
+.I confirm
+indication character `c' appears,
+then before each substitution the line to be substituted
+is typed with the string to be substituted marked
+with `\(ua' characters.
+By typing an `y' one can cause the substitution to be performed,
+any other input causes no change to take place.
+After a
+.I substitute
+the current line is the last line substituted.
+.IP
+Lines may be split by substituting
+new-line characters into them.
+The newline in
+.I repl
+must be escaped by preceding it with a `\e'.
+Other metacharacters available in
+.I pat
+and
+.I repl
+are described below.
+.LC
+.B stop
+.ZP
+Suspends the editor, returning control to the top level shell.
+If
+.I autowrite
+is set and there are unsaved changes,
+a write is done first unless the form
+.B stop !
+is used.
+This commands is only available where supported by the teletype driver
+and operating system.
+.LC
+( \fB.\fR , \fB.\fR ) \fBsubstitute\fR \fIoptions\fR \fIcount\fR \fIflags\fR abbr: \fBs\fR
+.ZP
+If
+.I pat
+and
+.I repl
+are omitted, then the last substitution is repeated.
+This is a synonym for the
+.B &
+command.
+.LC
+( \fB.\fR , \fB.\fR ) \fBt\fR \fIaddr\fR \fIflags\fR
+.ZP
+The
+.I t
+command is a synonym for
+.I copy .
+.LC
+\fBta\fR \fItag\fR
+.ZP
+The focus of editing switches to the location of
+.I tag,
+switching to a different line in the current file where it is defined,
+or if necessary to another file.\(dd
+.FS
+\(dd If you have modified the current file before giving a
+.I tag
+command, you must write it out; giving another
+.I tag
+command, specifying no
+.I tag
+will reuse the previous tag.
+.FE
+.IP
+The tags file is normally created by a program such as
+.I ctags,
+and consists of a number of lines with three fields separated by blanks
+or tabs. The first field gives the name of the tag,
+the second the name of the file where the tag resides, and the third
+gives an addressing form which can be used by the editor to find the tag;
+this field is usually a contextual scan using `/\fIpat\fR/' to be immune
+to minor changes in the file. Such scans are always performed as if
+.I nomagic
+was set.
+.PP
+The tag names in the tags file must be sorted alphabetically.
+.LC
+\fBunabbreviate\fR \fIword\fP abbr: \fBuna\fP
+.ZP
+Delete
+.I word
+from the list of abbreviations.
+.LC
+\fBundo\fR abbr: \fBu\fR
+.ZP
+Reverses the changes made in the buffer by the last
+buffer editing command.
+Note that
+.I global
+commands are considered a single command for the purpose of
+.I undo
+(as are
+.I open
+and
+.I visual.)
+Also, the commands
+.I write
+and
+.I edit
+which interact with the
+file system cannot be undone.
+.I Undo
+is its own inverse.
+.IP
+.I Undo
+always marks the previous value of the current line `\fB.\fR'
+as `\'\''.
+After an
+.I undo
+the current line is the first line restored
+or the line before the first line deleted if no lines were restored.
+For commands with more global effect
+such as
+.I global
+and
+.I visual
+the current line regains it's pre-command value after an
+.I undo.
+.LC
+\fBunmap\fR \fIlhs\fR
+.ZP
+The macro expansion associated by
+.I map
+for
+.I lhs
+is removed.
+.LC
+( 1 , $ ) \fBv\fR /\fIpat\fR\|/ \fIcmds\fR
+.ZP
+A synonym for the
+.I global
+command variant \fBg!\fR, running the specified \fIcmds\fR on each
+line which does not match \fIpat\fR.
+.LC
+\fBversion\fR abbr: \fBve\fR
+.ZP
+Prints the current version number of the editor
+as well as the date the editor was last changed.
+.LC
+( \fB.\fR ) \fBvisual\fR \fItype\fR \fIcount\fR \fIflags\fR abbr: \fBvi\fR
+.ZP
+Enters visual mode at the specified line.
+.I Type
+is optional and may be `\-' , `\(ua' or `\fB.\fR'
+as in the
+.I z
+command to specify the placement of the specified line on the screen.
+By default, if
+.I type
+is omitted, the specified line is placed as the first on the screen.
+A
+.I count
+specifies an initial window size; the default is the value of the option
+.I window.
+See the document
+.I "An Introduction to Display Editing with Vi"
+for more details.
+To exit this mode, type Q.
+.LC
+\fBvisual\fP file
+.br
+\fBvisual\fP +\fIn\fP file
+.ZP
+From visual mode,
+this command is the same as edit.
+.LC
+( 1 , $ ) \fBwrite\fR \fIfile\fR abbr: \fBw\fR
+.ZP
+Writes changes made back to \fIfile\fR, printing the number of lines and
+characters written.
+Normally \fIfile\fR is omitted and the text goes back where it came from.
+If a \fIfile\fR is specified, then text will be written to that file.*
+.FS
+* The editor writes to a file only if it is
+the current file and is
+.I edited ,
+if the file does not exist,
+or if the file is actually a teletype,
+.I /dev/tty,
+.I /dev/null.
+Otherwise, you must give the variant form \fBw!\fR to force the write.
+.FE
+If the file does not exist it is created.
+The current file name is changed only if there is no current file
+name; the current line is never changed.
+.IP
+If an error occurs while writing the current and
+.I edited
+file, the editor
+considers that there has been ``No write since last change''
+even if the buffer had not previously been modified.
+.LC
+( 1 , $ ) \fBwrite>>\fR \fIfile\fR abbr: \fBw>>\fR
+.ZP
+Writes the buffer contents at the end of
+an existing file.
+.IP
+.LC
+\fBw!\fR \fIname\fR
+.ZP
+Overrides the checking of the normal \fIwrite\fR command,
+and will write to any file which the system permits.
+.LC
+( 1 , $ ) \fBw\fR \fB!\fR\fIcommand\fR
+.ZP
+Writes the specified lines into
+.I command.
+Note the difference between \fBw!\fR which overrides checks and
+\fBw\ \ !\fR which writes to a command.
+.LC
+\fBwq\fR \fIname\fR
+.ZP
+Like a \fIwrite\fR and then a \fIquit\fR command.
+.LC
+\fBwq!\fR \fIname\fR
+.ZP
+The variant overrides checking on the sensibility of the
+.I write
+command, as \fBw!\fR does.
+.LC
+\fBxit\fP \fIname\fR
+.ZP
+If any changes have been made and not written, writes the buffer out.
+Then, in any case, quits.
+.LC
+( \fB.\fR , \fB.\fR )\|\fByank\fR \fIbuffer\fR \fIcount\fR abbr: \fBya\fR
+.ZP
+Places the specified lines in the named
+.I buffer,
+for later retrieval via
+.I put.
+If no buffer name is specified, the lines go to a more volatile place;
+see the \fIput\fR command description.
+.LC
+( \fB.+1\fR ) \fBz\fR \fIcount\fR
+.ZP
+Print the next \fIcount\fR lines, default \fIwindow\fR.
+.LC
+( \fB.\fR ) \fBz\fR \fItype\fR \fIcount\fR
+.ZP
+Prints a window of text with the specified line at the top.
+If \fItype\fR is `\-' the line is placed at the bottom; a `\fB.\fR' causes
+the line to be placed in the center.*
+A count gives the number of lines to be displayed rather than
+double the number specified by the \fIscroll\fR option.
+On a \s-2CRT\s0 the screen is cleared before display begins unless a
+count which is less than the screen size is given.
+The current line is left at the last line printed.
+.FS
+* Forms `z=' and `z\(ua' also exist; `z=' places the current line in the
+center, surrounds it with lines of `\-' characters and leaves the current
+line at this line. The form `z\(ua' prints the window before `z\-'
+would. The characters `+', `\(ua' and `\-' may be repeated for cumulative
+effect.
+On some v2 editors, no
+.I type
+may be given.
+.FE
+.LC
+\fB!\fR \fIcommand\fR\fR
+.ZP
+The remainder of the line after the `!' character is sent to a shell
+to be executed.
+Within the text of
+.I command
+the characters
+`%' and `#' are expanded as in filenames and the character
+`!' is replaced with the text of the previous command.
+Thus, in particular,
+`!!' repeats the last such shell escape.
+If any such expansion is performed, the expanded line will be echoed.
+The current line is unchanged by this command.
+.IP
+If there has been ``[No\ write]'' of the buffer contents since the last
+change to the editing buffer, then a diagnostic will be printed
+before the command is executed as a warning.
+A single `!' is printed when the command completes.
+.LC
+( \fIaddr\fR , \fIaddr\fR ) \fB!\fR \fIcommand\fR\fR
+.ZP
+Takes the specified address range and supplies it as
+standard input to
+.I command;
+the resulting output then replaces the input lines.
+.LC
+( $ ) \fB=\fR
+.ZP
+Prints the line number of the
+addressed line.
+The current line is unchanged.
+.KS
+.LC
+( \fB.\fR , \fB.\fR ) \fB>\fR \fIcount\fR \fIflags\fR
+.br
+( \fB.\fR , \fB.\fR ) \fB<\fR \fIcount\fR \fIflags\fR
+.IP
+Perform intelligent shifting on the specified lines;
+\fB<\fR shifts left and \fB>\fR shift right.
+The quantity of shift is determined by the
+.I shiftwidth
+option and the repetition of the specification character.
+Only white space (blanks and tabs) is shifted;
+no non-white characters are discarded in a left-shift.
+The current line becomes the last line which changed due to the
+shifting.
+.KE
+.LC
+\fB^D\fR
+.ZP
+An end-of-file from a terminal input scrolls through the file.
+The
+.I scroll
+option specifies the size of the scroll, normally a half screen of text.
+.LC
+( \fB.\fR+1 , \fB.\fR+1 )
+.br
+( \fB.\fR+1 , \fB.\fR+1 ) |
+.ZP
+An address alone causes the addressed lines to be printed.
+A blank line prints the next line in the file.
+.LC
+( \fB.\fR , \fB.\fR ) \fB&\fR \fIoptions\fR \fIcount\fR \fIflags\fR
+.ZP
+Repeats the previous
+.I substitute
+command.
+.LC
+( \fB.\fR , \fB.\fR ) \fB\s+2~\s0\fR \fIoptions\fR \fIcount\fR \fIflags\fR
+.ZP
+Replaces the previous regular expression with the previous
+replacement pattern from a substitution.
+.NH 1
+Regular expressions and substitute replacement patterns
+.NH 2
+Regular expressions
+.PP
+A regular expression specifies a set of strings of characters.
+A member of this set of strings is said to be
+.I matched
+by the regular expression.
+.I Ex
+remembers two previous regular expressions:
+the previous regular expression used in a
+.I substitute
+command
+and the previous regular expression used elsewhere
+(referred to as the previous \fIscanning\fR regular expression.)
+The previous regular expression
+can always be referred to by a null \fIre\fR, e.g. `//' or `??'.
+.NH 2
+Magic and nomagic
+.PP
+The regular expressions allowed by
+.I ex
+are constructed in one of two ways depending on the setting of
+the
+.I magic
+option.
+The
+.I ex
+and
+.I vi
+default setting of
+.I magic
+gives quick access to a powerful set of regular expression
+metacharacters.
+The disadvantage of
+.I magic
+is that the user must remember that these metacharacters are
+.I magic
+and precede them with the character `\e'
+to use them as ``ordinary'' characters.
+With
+.I nomagic,
+the default for
+.I edit,
+regular expressions are much simpler,
+there being only two metacharacters.
+The power of the other metacharacters is still available by preceding
+the (now) ordinary character with a `\e'.
+Note that `\e' is thus always a metacharacter.
+.PP
+The remainder of the discussion of regular expressions assumes
+that
+that the setting of this option is
+.I magic.\(dg
+.FS
+\(dg To discern what is true with
+.I nomagic
+it suffices to remember that the only
+special characters in this case will be `\(ua' at the beginning
+of a regular expression,
+`$' at the end of a regular expression,
+and `\e'.
+With
+.I nomagic
+the characters `\s+2~\s0' and `&' also lose their special meanings
+related to the replacement pattern of a substitute.
+.FE
+.NH 2
+Basic regular expression summary
+.PP
+The following basic constructs are used to construct
+.I magic
+mode regular expressions.
+.IP \fIchar\fR 15
+An ordinary character matches itself.
+The characters `\(ua' at the beginning of a line,
+`$' at the end of line,
+`*' as any character other than the first,
+`.', `\e', `[', and `\s+2~\s0' are not ordinary characters and
+must be escaped (preceded) by `\e' to be treated as such.
+.IP \fB\(ua\fR
+At the beginning of a pattern
+forces the match to succeed only at the beginning of a line.
+.IP \fB$\fR
+At the end of a regular expression forces the match to
+succeed only at the end of the line.
+.IP \&\fB.\fR
+Matches any single character except
+the new-line character.
+.IP \fB\e<\fR
+Forces the match
+to occur only at the beginning of a ``variable'' or ``word'';
+that is, either at the beginning of a line, or just before
+a letter, digit, or underline and after a character not one of
+these.
+.IP \fB\e>\fR
+Similar to `\e<', but matching the end of a ``variable''
+or ``word'', i.e. either the end of the line or before character
+which is neither a letter, nor a digit, nor the underline character.
+.IP \fB[\fIstring\fR]\fR
+Matches any (single) character in the class defined by
+.I string.
+Most characters in
+.I string
+define themselves.
+A pair of characters separated by `\-' in
+.I string
+defines the set of characters collating between the specified lower and upper
+bounds, thus `[a\-z]' as a regular expression matches
+any (single) lower-case letter.
+If the first character of
+.I string
+is an `\(ua' then the construct
+matches those characters which it otherwise would not;
+thus `[\(uaa\-z]' matches anything but a lower-case letter (and of course a
+newline).
+To place any of the characters
+`\(ua', `[', or `\-' in
+.I string
+you must escape them with a preceding `\e'.
+.NH 2
+Combining regular expression primitives
+.PP
+The concatenation of two regular expressions matches the leftmost and
+then longest string
+which can be divided with the first piece matching the first regular
+expression and the second piece matching the second.
+Any of the (single character matching) regular expressions mentioned
+above may be followed by the character `*' to form a regular expression
+which matches any number of adjacent occurrences (including 0) of characters
+matched by the regular expression it follows.
+.PP
+The character `\s+2~\s0' may be used in a regular expression,
+and matches the text which defined the replacement part
+of the last
+.I substitute
+command.
+A regular expression may be enclosed between the sequences
+`\e(' and `\e)' with side effects in the
+.I substitute
+replacement patterns.
+.NH 2
+Substitute replacement patterns
+.PP
+The basic metacharacters for the replacement pattern are
+`&' and `~'; these are
+given as `\e&' and `\e~' when
+.I nomagic
+is set.
+Each instance of `&' is replaced by the characters
+which the regular expression matched.
+The metacharacter `~' stands, in the replacement pattern,
+for the defining text of the previous replacement pattern.
+.PP
+Other metasequences possible in the replacement pattern
+are always introduced by the escaping character `\e'.
+The sequence `\e\fIn\fR' is replaced by the text matched
+by the \fIn\fR-th regular subexpression enclosed between
+`\e(' and `\e)'.\(dg
+.FS
+\(dg When nested, parenthesized subexpressions are present,
+\fIn\fR is determined by counting occurrences of `\e(' starting from the left.
+.FE
+The sequences `\eu' and `\el' cause the immediately following character in
+the replacement to be converted to upper- or lower-case respectively
+if this character is a letter.
+The sequences `\eU' and `\eL' turn such conversion on, either until
+`\eE' or `\ee' is encountered, or until the end of the replacement pattern.
+.de LC
+.br
+.sp .1i
+.ne 4
+.LP
+.ta 3i
+..
+.NH 1
+Option descriptions
+.PP
+.LC
+\fBautoindent\fR, \fBai\fR default: noai
+.ZP
+Can be used to ease the preparation of structured program text.
+At the beginning of each
+.I append ,
+.I change
+or
+.I insert
+command
+or when a new line is
+.I opened
+or created by an
+.I append ,
+.I change ,
+.I insert ,
+or
+.I substitute
+operation within
+.I open
+or
+.I visual
+mode,
+.I ex
+looks at the line being appended after,
+the first line changed
+or the line inserted before and calculates the amount of white space
+at the start of the line.
+It then aligns the cursor at the level of indentation so determined.
+.IP
+If the user then types lines of text in,
+they will continue to be justified at the displayed indenting level.
+If more white space is typed at the beginning of a line,
+the following line will start aligned with the first non-white character
+of the previous line.
+To back the cursor up to the preceding tab stop one can hit
+\fB^D\fR.
+The tab stops going backwards are defined at multiples of the
+.I shiftwidth
+option.
+You
+.I cannot
+backspace over the indent,
+except by sending an end-of-file with a \fB^D\fR.
+.IP
+Specially processed in this mode is a line with no characters added
+to it, which turns into a completely blank line (the white
+space provided for the
+.I autoindent
+is discarded.)
+Also specially processed in this mode are lines beginning with
+an `\(ua' and immediately followed by a \fB^D\fR.
+This causes the input to be repositioned at the beginning of the line,
+but retaining the previous indent for the next line.
+Similarly, a `0' followed by a \fB^D\fR
+repositions at the beginning but without
+retaining the previous indent.
+.IP
+.I Autoindent
+doesn't happen in
+.I global
+commands or when the input is not a terminal.
+.LC
+\fBautoprint\fR, \fBap\fR default: ap
+.ZP
+Causes the current line to be printed after each
+.I delete ,
+.I copy ,
+.I join ,
+.I move ,
+.I substitute ,
+.I t ,
+.I undo
+or
+shift command.
+This has the same effect as supplying a trailing `p'
+to each such command.
+.I Autoprint
+is suppressed in globals,
+and only applies to the last of many commands on a line.
+.LC
+\fBautowrite\fR, \fBaw\fR default: noaw
+.ZP
+Causes the contents of the buffer to be written to the current file
+if you have modified it and give a
+.I next,
+.I rewind,
+.I stop,
+.I tag,
+or
+.I !
+command, or a \fB^\(ua\fR (switch files) or \fB^]\fR (tag goto) command
+in
+.I visual.
+Note, that the
+.I edit
+and
+.I ex
+commands do
+.B not
+autowrite.
+In each case, there is an equivalent way of switching when autowrite
+is set to avoid the
+.I autowrite
+(\fIedit\fR
+for
+.I next ,
+.I rewind!
+for .I rewind ,
+.I stop!
+for
+.I stop ,
+.I tag!
+for
+.I tag ,
+.I shell
+for
+.I ! ,
+and
+\fB:e\ #\fR and a \fB:ta!\fR command from within
+.I visual).
+.LC
+\fBbeautify\fR, \fBbf\fR default: nobeautify
+.ZP
+Causes all control characters except tab, newline and form-feed
+to be discarded from the input.
+A complaint is registered the first time a
+backspace character is discarded.
+.I Beautify
+does not apply to command input.
+.LC
+\fBdirectory\fR, \fBdir\fR default: dir=/tmp
+.ZP
+Specifies the directory in which
+.I ex
+places its buffer file.
+If this directory in not
+writable, then the editor will exit abruptly when it fails to be
+able to create its buffer there.
+.LC
+\fBedcompatible\fR default: noedcompatible
+.ZP
+Causes the presence of absence of
+.B g
+and
+.B c
+suffixes on substitute commands to be remembered, and to be toggled
+by repeating the suffices. The suffix
+.B r
+makes the substitution be as in the
+.I ~
+command, instead of like
+.I &.
+.LC
+\fBerrorbells\fR, \fBeb\fR default: noeb
+.ZP
+Error messages are preceded by a bell.*
+.FS
+* Bell ringing in
+.I open
+and
+.I visual
+on errors is not suppressed by setting
+.I noeb.
+.FE
+If possible the editor always places the error message in a standout mode of the
+terminal (such as inverse video) instead of ringing the bell.
+.LC
+\fBhardtabs\fR, \fBht\fR default: ht=8
+.ZP
+Gives the boundaries on which terminal hardware tabs are set (or
+on which the system expands tabs).
+.LC
+\fBignorecase\fR, \fBic\fR default: noic
+.ZP
+All upper case characters in the text are mapped to lower case in regular
+expression matching.
+In addition, all upper case characters in regular expressions are mapped
+to lower case except in character class specifications.
+.LC
+\fBlisp\fR default: nolisp
+.ZP
+\fIAutoindent\fR indents appropriately for
+.I lisp
+code, and the \fB( ) { } [[\fR and \fB]]\fR commands in
+.I open
+and
+.I visual
+are modified to have meaning for \fIlisp\fR.
+.LC
+\fBlist\fR default: nolist
+.ZP
+All printed lines will be displayed (more) unambiguously,
+showing tabs and end-of-lines as in the
+.I list
+command.
+.LC
+\fBmagic\fR default: magic for \fIex\fR and \fIvi\fR\(dg
+.FS
+\(dg \fINomagic\fR for \fIedit\fR.
+.FE
+.ZP
+If
+.I nomagic
+is set, the number of regular expression metacharacters is greatly reduced,
+with only `\(ua' and `$' having special effects.
+In addition the metacharacters
+`~'
+and
+`&'
+of the replacement pattern are treated as normal characters.
+All the normal metacharacters may be made
+.I magic
+when
+.I nomagic
+is set by preceding them with a `\e'.
+.LC
+\fBmesg\fR default: mesg
+.ZP
+Causes write permission to be turned off to the terminal
+while you are in visual mode, if
+.I nomesg
+is set.
+.LC
+\fBmodeline\fR default: nomodeline
+.ZP
+If
+.I modeline
+is set, then the first 5 lines and the last five lines of the file
+will be checked for ex command lines and the comands issued.
+To be recognized as a command line, the line must have the string
+.B ex:
+or
+.B vi:
+preceeded by a tab or a space. This string may be anywhere in the
+line and anything after the
+.I :
+is interpeted as editor commands. This option defaults to off because
+of unexpected behavior when editting files such as
+.I /etc/passwd.
+.LC
+\fBnumber, nu\fR default: nonumber
+.ZP
+Causes all output lines to be printed with their
+line numbers.
+In addition each input line will be prompted for by supplying the line number
+it will have.
+.LC
+\fBopen\fR default: open
+.ZP
+If \fInoopen\fR, the commands
+.I open
+and
+.I visual
+are not permitted.
+This is set for
+.I edit
+to prevent confusion resulting from accidental entry to
+open or visual mode.
+.LC
+\fBoptimize, opt\fR default: optimize
+.ZP
+Throughput of text is expedited by setting the terminal
+to not 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.
+.LC
+\fBparagraphs,\ para\fR default: para=IPLPPPQPP\0LIbp
+.ZP
+Specifies the paragraphs for the \fB{\fR and \fB}\fR operations in
+.I open
+and
+.I visual.
+The pairs of characters in the option's value are the names
+of the macros which start paragraphs.
+.LC
+\fBprompt\fR default: prompt
+.ZP
+Command mode input is prompted for with a `:'.
+.LC
+\fBredraw\fR default: noredraw
+.ZP
+The editor simulates (using great amounts of output), an intelligent
+terminal on a dumb terminal (e.g. during insertions in
+.I visual
+the characters to the right of the cursor position are refreshed
+as each input character is typed.)
+Useful only at very high speed.
+.LC
+\fBremap\fP default: remap
+.ZP
+If on, macros are repeatedly tried until they are unchanged.
+For example, if
+.B o
+is mapped to
+.B O ,
+and
+.B O
+is mapped to
+.B I ,
+then if
+.I remap
+is set,
+.B o
+will map to
+.B I ,
+but if
+.I noremap
+is set, it will map to
+.B O .
+.LC
+\fBreport\fR default: report=5\(dg
+.FS
+\(dg 2 for \fIedit\fR.
+.FE
+.ZP
+Specifies a threshold for feedback from commands.
+Any command which modifies more than the specified number of lines
+will provide feedback as to the scope of its changes.
+For commands such as
+.I global ,
+.I open ,
+.I undo ,
+and
+.I visual
+which have potentially more far reaching scope,
+the net change in the number of lines in the buffer is
+presented at the end of the command, subject to this same threshold.
+Thus notification is suppressed during a
+.I global
+command on the individual commands performed.
+.LC
+\fBscroll\fR default: scroll=\(12 window
+.ZP
+Determines the number of logical lines scrolled when an end-of-file
+is received from a terminal input in command mode,
+and the number of lines printed by a command mode
+.I z
+command (double the value of
+.I scroll ).
+.LC
+\fBsections\fR default: sections=SHNHH\0HU
+.ZP
+Specifies the section macros for the \fB[[\fR and \fB]]\fR operations
+in
+.I open
+and
+.I visual.
+The pairs of characters in the options's value are the names
+of the macros which start paragraphs.
+.LC
+\fBshell\fR, \fBsh\fR default: sh=/bin/sh
+.ZP
+Gives the path name of the shell forked for
+the shell escape command `!', and by the
+.I shell
+command.
+The default is taken from SHELL in the environment, if present.
+.LC
+\fBshiftwidth\fR, \fBsw\fR default: sw=8
+.ZP
+Gives the width a software tab stop,
+used in reverse tabbing with \fB^D\fR when using
+.I autoindent
+to append text,
+and by the shift commands.
+.LC
+\fBshowmatch, sm\fR default: nosm
+.ZP
+In
+.I open
+and
+.I visual
+mode, when a \fB)\fR or \fB}\fR is typed, move the cursor to the matching
+\fB(\fR or \fB{\fR for one second if this matching character is on the
+screen. Extremely useful with
+.I lisp.
+.LC
+\fBslowopen, slow\fR terminal dependent
+.ZP
+Affects the display algorithm used in
+.I visual
+mode, holding off display updating during input of new text to improve
+throughput when the terminal in use is both slow and unintelligent.
+See
+.I "An Introduction to Display Editing with Vi"
+for more details.
+.LC
+\fBtabstop,\ ts\fR default: ts=8
+.ZP
+The editor expands tabs in the input file to be on
+.I tabstop
+boundaries for the purposes of display.
+.LC
+\fBtaglength,\ tl\fR default: tl=0
+.ZP
+Tags are not significant beyond this many characters.
+A value of zero (the default) means that all characters are significant.
+.LC
+\fBtags\fR default: tags=tags /usr/lib/tags
+.ZP
+A path of files to be used as tag files for the
+.I tag
+command.
+A requested tag is searched for in the specified files, sequentially.
+By default, files called
+.B tags
+are searched for in the current directory and in /usr/lib
+(a master file for the entire system).
+.LC
+\fBterm\fR from environment TERM
+.ZP
+The terminal type of the output device.
+.LC
+\fBterse\fR default: noterse
+.ZP
+Shorter error diagnostics are produced for the experienced user.
+.LC
+\fBwarn\fR default: warn
+.ZP
+Warn if there has been `[No write since last change]' before a `!'
+command escape.
+.LC
+\fBwindow\fR default: window=speed dependent
+.ZP
+The number of lines in a text window in the
+.I visual
+command.
+The default is 8 at slow speeds (600 baud or less),
+16 at medium speed (1200 baud),
+and the full screen (minus one line) at higher speeds.
+.LC
+\fBw300,\ w1200\, w9600\fR
+.ZP
+These are not true options but set
+.B window
+only if the speed is slow (300), medium (1200), or high (9600),
+respectively.
+They are suitable for an EXINIT
+and make it easy to change the 8/16/full screen rule.
+.LC
+\fBwrapscan\fR, \fBws\fR default: ws
+.ZP
+Searches using the regular expressions in addressing
+will wrap around past the end of the file.
+.LC
+\fBwrapmargin\fR, \fBwm\fR default: wm=0
+.ZP
+Defines a margin for automatic wrapover of text during input in
+.I open
+and
+.I visual
+modes. See
+.I "An Introduction to Text Editing with Vi"
+for details.
+.LC
+\fBwriteany\fR, \fBwa\fR default: nowa
+.IP
+Inhibit the checks normally made before
+.I write
+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.
+.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
+.I ex
+version 1.
+Bill Joy wrote versions 1 and 2.0 through 2.7,
+and created the framework that users see in the present editor.
+Mark Horton added macros and other features and made the
+editor work on a large number of terminals and Unix systems.
diff --git a/usr.bin/vi/USD.doc/exref/ex.summary b/usr.bin/vi/USD.doc/exref/ex.summary
new file mode 100644
index 000000000000..618da07c7420
--- /dev/null
+++ b/usr.bin/vi/USD.doc/exref/ex.summary
@@ -0,0 +1,734 @@
+.\" Copyright (c) 1980, 1993
+.\" 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.
+.\"
+.\" @(#)ex.summary 8.1 (Berkeley) 6/8/93
+.\"
+.ds p \v'-0.2'.\v'+0.2'
+.ds U \s-2UNIX\s+2
+.ds c \v'-0.2':\v'+0.2'
+.nr PO .25i
+.nr LL 6.75i
+.lt 6.75i
+.ll 6.75i
+.ds CH
+.ds LF Computing Services, U.C. Berkeley
+.ds RF April 3, 1979
+.de SP
+.sp 1v
+..
+.nr PI 3n
+.nr PD 0
+.ND
+.ps 12
+.ft B
+.ce 1
+Ex/Edit Command Summary (Version 2.0)
+.ft R
+.nr VS 11
+.nr PS 9
+.nr HM 0.5i
+.nr CW
+.2C
+.PP
+.I Ex
+and
+.I edit
+are text editors, used for creating
+and modifying files of text on the \*U
+computer system.
+.I Edit
+is a variant of
+.I ex
+with features designed to
+make it less complicated
+to learn and use.
+In terms of command syntax and effect
+the editors are essentially identical,
+and this command summary applies to both.
+.PP
+The summary is meant as a quick reference
+for users already acquainted
+with
+.I edit
+or \fIex\fP.
+Fuller explanations of the editors are available
+in the documents
+.I
+Edit: A Tutorial
+.R
+(a self-teaching introduction) and the
+.I
+Ex Reference Manual
+.R
+(the comprehensive reference source for
+both \fIedit\fP and \fIex\fP).
+Both of these writeups are available in the
+Computing Services Library.
+.PP
+In the examples included with the
+summary, commands and text entered by
+the user are printed in \fBboldface\fR to
+distinguish them from responses printed
+by the computer.
+.sp 0.45v
+.LP
+.B
+The Editor Buffer
+.PP
+In order to perform its tasks
+the editor sets aside a temporary
+work space,
+called a \fIbuffer\fR,
+separate from the user's permanent
+file.
+Before starting to work on an existing
+file the editor makes a copy of it in the
+buffer, leaving the original untouched.
+All editing changes are made to the
+buffer copy, which must then
+be written back to the permanent
+file in order to update the
+old version.
+The buffer disappears
+at the end of the editing session.
+.sp 0.45v
+.LP
+.B
+Editing: Command and Text Input Modes
+.PP
+.R
+During an editing session there are
+two usual modes of operation:
+\fIcommand\fP mode and \fItext input\fP
+mode.
+(This disregards, for the moment,
+.I open
+and
+.I visual
+modes, discussed below.)
+In command mode, the editor issues a
+colon prompt (:)
+to show that it is ready to
+accept and execute a command.
+In text input mode, on the other hand, there is
+no prompt and the editor merely accepts text to
+be added to the buffer.
+Text input mode is initiated by the commands
+\fIappend\fP, \fIinsert\fP, and \fIchange\fP,
+and is terminated by typing a period as the
+first and only character on a line.
+.sp 0.45v
+.LP
+.B
+Line Numbers and Command Syntax
+.PP
+.R
+The editor keeps track of lines of text
+in the buffer by numbering them consecutively
+starting with 1 and renumbering
+as lines are added or deleted.
+At any given time the editor is positioned
+at one of these lines; this position is
+called the \fIcurrent line\fP.
+Generally, commands that change the
+contents of the buffer print the
+new current line at the end of their
+execution.
+.PP
+Most commands can be preceded by one or two
+line-number addresses which indicate the lines
+to be affected.
+If one number is given the command operates on
+that line only; if two, on an inclusive range
+of lines.
+Commands that can take line-number prefixes also
+assume default prefixes if none are given.
+The default assumed by each command is designed
+to make it convenient to use in many instances
+without any line-number prefix.
+For the most part, a command used without a
+prefix operates on the current line,
+though exceptions to this rule should be noted.
+The \fIprint\fP command
+by itself, for instance, causes
+one line, the current line, to be
+printed at the terminal.
+.PP
+The summary shows the number of line addresses
+that can be
+prefixed to each command as well as
+the defaults assumed if they are omitted.
+For example,
+.I (.,.)
+means that up to 2 line-numbers may be given,
+and that if none is given the
+command operates on the current line.
+(In the address prefix notation, ``.'' stands
+for the current line and ``$'' stands for
+the last line of the buffer.)
+If no such notation appears, no
+line-number prefix may be used.
+.PP
+Some commands take trailing
+information;
+only
+the more important instances of this
+are mentioned in the summary.
+.sp 0.25v
+.LP
+.B
+Open and Visual Modes
+.PP
+.R
+Besides command and text input modes,
+.I ex
+and
+.I edit
+provide on some CRT terminals other modes of editing,
+.I open
+and
+.I visual .
+In these modes the cursor can
+be moved to individual words
+or characters in a line.
+The commands then given are very different
+from the standard editor commands; most do not appear on the screen when
+typed.
+.I
+An Introduction to Display Editing with Vi
+.R
+provides a full discussion.
+.sp 0.25v
+.LP
+.B
+Special Characters
+.PP
+.R
+.fi
+Some characters take on special meanings
+when used in context searches
+and in patterns given to the \fIsubstitute\fP command.
+For \fIedit\fR, these are ``^'' and ``$'',
+meaning the beginning and end of a line,
+respectively.
+.I Ex
+has the following additional special characters:
+.B
+.ce 1
+\&. & * [ ] ~
+.R
+To use one of the special characters as its
+simple graphic representation
+rather than with its special meaning,
+precede it by a backslash (\\).
+The backslash always has a special meaning.
+.1C
+.rm LF
+.rm RF
+.rm CF
+.nr FM 0.4
+.TS
+cp10 cp10 cp10 cp10
+ltw(1.0i) lt2w(0.40i)fB ltw(3.0i) ltw(1.8i).
+Name Abbr Description Examples
+.sp 1.75
+(.)\fBappend a T{
+Begins text input mode,
+adding lines to the buffer after
+the line specified. Appending continues
+until ``.'' is typed alone at the
+beginning of a new line, followed by
+a carriage return. \fI0a\fR places
+lines at the beginning of the buffer.
+T} T{
+.nf
+\fR:\fBa
+Three lines of text
+are added to the buffer
+after the current line.
+\*p
+.R
+\*c
+.fi
+T}
+.SP
+\fR(.,.)\fBchange c T{
+Deletes indicated line(s) and
+initiates text input mode to
+replace them with new text which follows.
+New text is terminated the same way
+as with \fIappend\fR.
+T} T{
+.nf
+:\fB5,6c
+Lines 5 and 6 are
+deleted and replaced by
+these three lines.
+\*p
+.R
+\*c
+.fi
+T}
+.SP
+\fR(.,.)\fBcopy \fIaddr co T{
+Places a copy of the specified lines
+after the line indicated by \fIaddr\fR.
+The example places a copy of lines 8 through
+12, inclusive, after line 25.
+T} T{
+.nf
+\fR:\fB8,12co 25
+\fRLast line copied is printed
+\fR\*c
+.fi
+T}
+.SP
+\fR(.,.)\fBdelete d T{
+Removes lines from the buffer
+and prints the current line after the deletion.
+T} T{
+.nf
+\fR:\fB13,15d
+\fRNew current line is printed
+\*c
+.fi
+T}
+.TE
+.sp 0.5v
+.TS
+ltw(1.0i) lt2w(0.40i)fB ltw(3.0i) ltw(1.8i).
+T{
+\fBedit \fIfile\fP
+.br
+\fBedit! \fIfile\fP
+T} T{
+e
+.br
+e!
+T} T{
+.fi
+\fRClears the editor buffer and then
+copies into it the named \fIfile\fR,
+which becomes the current file.
+This is a way of shifting to a different
+file
+without leaving the editor.
+The editor issues a warning
+message if this command is used before
+saving changes
+made to the file already in the buffer;
+using the form \fBe!\fR overrides this protective mechanism.
+T} T{
+.nf
+\fR:\fBe ch10\fR
+No write since last change
+:\fBe! ch10\fR
+"ch10" 3 lines, 62 characters
+\*c
+.fi
+T}
+.SP
+\fBfile \fIname\fR f T{
+\fRIf followed by a \fIname\fR, renames
+the current file to \fIname\fR.
+If used without \fIname\fR, prints
+the name of the current file.
+T} T{
+.nf
+\fR:\fBf ch9
+\fR"ch9" [Modified] 3 lines ...
+:\fBf
+\fR"ch9" [Modified] 3 lines ...
+\*c
+.fi
+T}
+.SP
+(1,$)\fBglobal g \fBglobal/\fIpattern\fB/\fIcommands T{
+.nf
+:\fBg/nonsense/d
+\fR\*c
+.fi
+T}
+\fR(1,$)\fBglobal! g!\fR or \fBv T{
+Searches the entire buffer (unless a smaller
+range is specified by line-number prefixes) and
+executes \fIcommands\fR on every line with
+an expression matching \fIpattern\fR.
+The second form, abbreviated
+either \fBg!\fR or \fBv\fR,
+executes \fIcommands\fR on lines that \fIdo
+not\fR contain the expression \fIpattern\fR.
+T} \^
+.SP
+\fR(.)\fBinsert i T{
+Inserts new lines of text immediately before the specified line.
+Differs from
+.I append
+only in that text is placed before, rather than after, the indicated line.
+In other words, \fB1i\fR has the same effect as \fB0a\fR.
+T} T{
+.nf
+:\fB1i
+These lines of text will
+be added prior to line 1.
+\&.
+\fR:
+.fi
+T} \^
+.SP
+\fR(.,.+1)\fBjoin j T{
+Join lines together, adjusting white space (spaces
+and tabs) as necessary.
+T} T{
+.nf
+:\fB2,5j\fR
+Resulting line is printed
+:
+.fi
+T} \^
+.TE
+.bp
+.TS
+cp10 cp10 cp10 cp10
+ltw(1.0i) lt2w(0.40i)fB ltw(3.0i) ltw(1.8i).
+Name Abbr Description Examples
+.sp 1.75
+\fR(.,.)\fBlist l T{
+\fRPrints lines in a more
+unambiguous way than the \fIprint\fR
+command does. The end of a line,
+for example, is marked with a ``$'',
+and tabs printed as ``^I''.
+T} T{
+.nf
+:\fB9l
+\fRThis is line 9$
+\*c
+.fi
+T}
+.TE
+.sp 0.5v
+.TS
+ltw(1.0i) lt2w(0.40i)fB ltw(3.0i) ltw(1.8i).
+\fR(.,.)\fBmove \fIaddr\fB m T{
+\fRMoves the specified lines
+to a position after the line
+indicated by \fIaddr\fR.
+T} T{
+.nf
+\fR:\fB12,15m 25\fR
+New current line is printed
+\*c
+.fi
+T}
+.SP
+\fR(.,.)\fBnumber nu T{
+Prints each line preceded
+by its buffer line number.
+T} T{
+.nf
+\fR:\fBnu
+\0\0\fR10\0 This is line 10
+\*c
+.fi
+T}
+.SP
+\fR(.)\fBopen o T{
+Too involved to discuss here,
+but if you enter open mode
+accidentally, press
+the \s-2ESC\s0 key followed by
+\fBq\fR to
+get back into normal editor
+command mode.
+\fIEdit\fP is designed to
+prevent accidental use of
+the open command.
+T}
+.SP
+\fBpreserve pre T{
+Saves a copy of the current buffer contents as though the system had
+just crashed. This is for use in an emergency when a
+.I write
+command has failed and you don't know how else to save your work.\(dg
+T} T{
+.nf
+:\fBpreserve\fR
+File preserved.
+:
+.fi
+T}
+.SP
+\fR(.,.)\fBprint p Prints the text of line(s). T{
+.nf
+:\fB+2,+3p\fR
+The second and third lines
+after the current line
+:
+.fi
+T}
+.TE
+.FS
+\(dg Seek assistance from a consultant as soon as possible
+after saving a file with the
+.I preserve
+command, because the file is saved on system storage space for only one week.
+.FE
+.SP
+.nf
+.TS
+ltw(1.0i) lt2w(0.40i)fB ltw(3.0i) ltw(1.8i).
+T{
+.nf
+\fBquit
+quit!
+.fi
+T} T{
+.nf
+q
+q!
+T} T{
+.fi
+\fREnds the editing session.
+You will receive a
+warning if you have changed the buffer
+since last writing its contents
+to the file. In this event you
+must either type \fBw\fR to write,
+or type \fBq!\fR to exit from
+the editor without saving your changes.
+T} T{
+.nf
+\fR:\fBq
+\fRNo write since last change
+:\fBq!
+\fR%
+.fi
+T}
+.SP
+\fR(.)\fBread \fIfile\fP r T{
+.fi
+\fRPlaces a copy of \fIfile\fR in the
+buffer after the specified line.
+Address 0 is permissible and causes
+the copy of \fIfile\fR to be placed
+at the beginning of the buffer.
+The \fIread\fP command does not
+erase any text already in the buffer.
+If no line number is specified,
+\fIfile\fR is placed after the
+current line.
+T} T{
+.nf
+\fR:\fB0r newfile
+\fR"newfile" 5 lines, 86 characters
+\*c
+.fi
+T}
+.SP
+\fBrecover \fIfile\fP rec T{
+.fi
+Retrieves a copy of the editor buffer
+after a system crash, editor crash,
+phone line disconnection, or
+\fIpreserve\fR command.
+T}
+.SP
+\fR(.,.)\fBsubstitute s T{
+.nf
+\fBsubstitute/\fIpattern\fB/\fIreplacement\fB/
+substitute/\fIpattern\fB/\fIreplacement\fB/gc
+.fi
+\fRReplaces the first occurrence of \fIpattern\fR
+on a line
+with \fIreplacement\fP.
+Including a \fBg\fR after the command
+changes all occurrences of \fIpattern\fP
+on the line.
+The \fBc\fR option allows the user to
+confirm each substitution before it is
+made; see the manual for details.
+T} T{
+.nf
+:\fB3p
+\fRLine 3 contains a misstake
+:\fBs/misstake/mistake/
+\fRLine 3 contains a mistake
+\*c
+.fi
+T}
+.TE
+.bp
+.TS
+cp10 cp10 cp10 cp10
+ltw(1.0i) lt2w(0.40i)fB ltw(3.0i) ltw(1.8i).
+Name Abbr Description Examples
+.sp 1.75
+\fBundo u T{
+.fi
+\fRReverses the changes made in
+the buffer by the last buffer-editing
+command.
+Note that this example contains
+a notification about the number of
+lines affected.
+T} T{
+.nf
+\fR:\fB1,15d
+\fR15 lines deleted
+new line number 1 is printed
+:\fBu
+\fR15 more lines in file ...
+old line number 1 is printed
+\*c
+.fi
+T}
+.SP
+\fR(1,$)\fBwrite \fIfile\fR w T{
+.fi
+\fRCopies data from the buffer onto
+a permanent file. If no \fIfile\fR
+is named, the current filename
+is used.
+The file is automatically created
+if it does not yet exist.
+A response containing the number of
+lines and characters in the file
+indicates that the write
+has been completed successfully.
+The editor's built-in protections
+against overwriting existing files
+will in some circumstances
+inhibit a write.
+The form \fBw!\fR forces the
+write, confirming that
+an existing file is to be overwritten.
+T} T{
+.nf
+\fR:\fBw
+\fR"file7" 64 lines, 1122 characters
+:\fBw file8
+\fR"file8" File exists ...
+:\fBw! file8
+\fR"file8" 64 lines, 1122 characters
+\*c
+.fi
+T}
+\fR(1,$)\fBwrite! \fIfile\fP w! \^ \^
+.TE
+.sp 0.5v
+.TS
+ltw(1.0i) lt2w(0.40i)fB ltw(3.0i) ltw(1.8i).
+\fR(.)\fBz \fIcount\fP z T{
+.fi
+\fRPrints a screen full of text starting
+with the line indicated;
+or, if \fIcount\fR is specified,
+prints that number of lines.
+Variants of the \fIz\fR command
+are described in the manual.
+T}
+.SP
+\fB!\fIcommand T{
+.fi
+Executes the remainder of the line
+after \fB!\fR as a \*U command.
+The buffer is unchanged by this, and
+control is returned to the editor when
+the execution of \fIcommand\fR is complete.
+T} T{
+.nf
+\fR:\fB!date
+\fRFri Jun 9 12:15:11 PDT 1978
+!
+\*c
+.fi
+T}
+.SP
+\fRcontrol-d T{
+.fi
+Prints the next \fIscroll\fR of text,
+normally half of a screen. See the
+manual for details of the \fIscroll\fR
+option.
+T}
+.SP
+\fR(.+1)<cr> T{
+.fi
+An address alone followed by a carriage
+return causes the line to be printed.
+A carriage return by itself prints the
+line following the current line.
+T} T{
+.nf
+:\fR<cr>
+the line after the current line
+\*c
+.fi
+T}
+.TE
+.sp 0.5v
+.TS
+ltw(1.0i) lt2w(0.40i)fB ltw(3.0i) ltw(1.8i).
+\fB/\fIpattern\fB/ T{
+.fi
+\fRSearches for the next line in which
+\fIpattern\fR occurs and prints it.
+T} T{
+.nf
+\fR:\fB/This pattern/
+\fRThis pattern next occurs here.
+\*c
+.fi
+T}
+.SP
+\fB// T{
+Repeats the most recent search.
+T} T{
+.nf
+\fR:\fB//
+\fRThis pattern also occurs here.
+\*c
+.fi
+T}
+.SP
+\fB?\fIpattern\fB? T{
+Searches in the reverse direction
+for \fIpattern\fP.
+T}
+.SP
+\fB?? T{
+Repeats the most recent search,
+moving in the reverse direction
+through the buffer.
+T}
+.TE
+
diff --git a/usr.bin/vi/USD.doc/vi.man/Makefile b/usr.bin/vi/USD.doc/vi.man/Makefile
new file mode 100644
index 000000000000..fd89b8e3169f
--- /dev/null
+++ b/usr.bin/vi/USD.doc/vi.man/Makefile
@@ -0,0 +1,14 @@
+# @(#)Makefile 8.5 (Berkeley) 7/16/94
+
+SRCS= vi.1
+DOCS= vi.0 vi.0.ps
+
+all: ${DOCS}
+
+vi.0: vi.1
+ groff -man -Tascii < vi.1 > $@
+vi.0.ps: vi.1
+ groff -man < vi.1 > $@
+
+clean:
+ rm -f ${DOCS}
diff --git a/usr.bin/vi/USD.doc/vi.man/vi.0 b/usr.bin/vi/USD.doc/vi.man/vi.0
new file mode 100644
index 000000000000..e6d9972e390b
--- /dev/null
+++ b/usr.bin/vi/USD.doc/vi.man/vi.0
@@ -0,0 +1,798 @@
+EX/VI(1) BSD Reference Manual EX/VI(1)
+
+NNAAMMEE
+ eexx,, vvii,, vviieeww - text editors
+
+SSYYNNOOPPSSIISS
+ eexx [--eeFFRRrrssvv] [--cc _c_m_d] [--tt _t_a_g] [--ww _s_i_z_e] [_f_i_l_e _._._.]
+ vvii [--eeFFRRrrvv] [--cc _c_m_d] [--tt _t_a_g] [--ww _s_i_z_e] [_f_i_l_e _._._.]
+ vviieeww [--eeFFRRrrvv] [--cc _c_m_d] [--tt _t_a_g] [--ww _s_i_z_e] [_f_i_l_e _._._.]
+
+DDEESSCCRRIIPPTTIIOONN
+ VVii is a screen oriented text editor. EExx is a line-oriented text editor.
+ EExx and vvii are different interfaces to the same program, and it is possi-
+ ble to switch back and forth during an edit session. VViieeww is the equiva-
+ lent of using the --RR (read-only) option of vvii.
+
+ This manual page is the one provided with the nneexx//nnvvii versions of the
+ eexx//vvii text editors. NNeexx//nnvvii are intended as bug-for-bug compatible re-
+ placements for the original Fourth Berkeley Software Distribution (4BSD)
+ eexx and vvii programs. For the rest of this manual page, nneexx//nnvvii is used
+ only when it's necessary to distinguish it from the historic implementa-
+ tions of eexx//vvii.
+
+ This manual page is intended for users already familiar with eexx//vvii. Any-
+ one else should almost certainly read a good tutorial on the editor be-
+ fore 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 _c_m_d immediately after starting the edit session. Partic-
+ ularly useful for initial positioning in the file, however _c_m_d is
+ not limited to positioning commands. This is the POSIX 1003.2
+ interface for the historic ``+cmd'' syntax. NNeexx//nnvvii supports
+ both the old and new syntax.
+
+ --ee Start editing in ex mode, as if the command name were eexx.
+
+ --FF Don't copy the entire file when first starting to edit. (The de-
+ fault is to make a copy in case someone else modifies the file
+ during your edit session.)
+
+ --RR Start editing in read-only mode, as if the command name was vviieeww,
+ or the readonly option was set.
+
+ --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 eexx edit sessions. Batch
+ mode is useful when running eexx 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. NNeexx//nnvvii
+ supports both the old and new syntax.
+
+ --tt Start editing at the specified tag. (See ctags(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 vvii or vviieeww.
+
+ --XX Reserved for X11 interfaces. _N_o _X_1_1 _s_u_p_p_o_r_t _i_s _c_u_r_r_e_n_t_l_y
+ _i_m_p_l_e_m_e_n_t_e_d_.
+
+ Command input for eexx//vvii is read from the standard input. In the vvii in-
+ terface, it is an error if standard input is not a terminal. In the eexx
+ interface, if standard input is not a terminal, eexx will read commands
+ from it regardless, however, the session will be a batch mode session,
+ exactly as if the --ss option had been specified.
+
+ EExx//vvii 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 vvii. If you've never used any screen editor before,
+ you're likely to have problems even with this simple introduction. In
+ that case you should find someone that already knows vvii and have them
+ walk you through this section.
+
+ VVii 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 vvii, and for vvii to give information to you.
+
+ The other fact that you need to understand is that vvii is a modeful edi-
+ tor, 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 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, usually labeled ``esc'' on your terminal's keyboard.) If
+ you're ever confused as to which mode you're in, keep entering the <es-
+ cape> key until vvii beeps at you. (Generally, vvii will beep at you if you
+ try and do something that's not allowed. It will also display error mes-
+ sages.)
+
+ 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 showmode<carriage-return>''. This will make the editor
+ give you verbose error messages and display the current mode at the bot-
+ tom 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 entering text and return to command
+ mode.
+
+ The commands to copy text are:
+ yyyy Copy the line the cursor is on.
+ 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 vvii command 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, vvii 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 vvii editor. In each entry below, the tag line is a usage syn-
+ opsis for the command character.
+
+ [[ccoouunntt]] <<ccoonnttrrooll--AA>>
+ Search forward count times for the current word.
+ [[ccoouunntt]] <<ccoonnttrrooll--BB>>
+ Page backwards count screens.
+ [[ccoouunntt]] <<ccoonnttrrooll--DD>>
+ Scroll forward count lines.
+ [[ccoouunntt]] <<ccoonnttrrooll--EE>>
+ Scroll forward count lines, leaving the current line and column as
+ is, if possible.
+ [[ccoouunntt]] <<ccoonnttrrooll--FF>>
+ Page forward count screens.
+ <<ccoonnttrrooll--GG>>
+ Display the file information.
+ <<ccoonnttrrooll--HH>>
+ [[ccoouunntt]] hh
+ Move the cursor back count characters in the current line.
+ [[ccoouunntt]] <<ccoonnttrrooll--JJ>>
+ [[ccoouunntt]] <<ccoonnttrrooll--NN>>
+ [[ccoouunntt]] jj
+ Move the cursor down count lines without changing the current col-
+ umn.
+ <<ccoonnttrrooll--LL>>
+ <<ccoonnttrrooll--RR>>
+ Repaint the screen.
+ [[ccoouunntt]] <<ccoonnttrrooll--MM>>
+ [[ccoouunntt]] ++
+ Move the cursor down count lines to the first nonblank character of
+ that line.
+ [[ccoouunntt]] <<ccoonnttrrooll--PP>>
+ [[ccoouunntt]] kk
+ Move the cursor up count lines, without changing the current col-
+
+ umn.
+ <<ccoonnttrrooll--TT>>
+ Return to the most recent tag context.
+ <<ccoonnttrrooll--UU>>
+ Scroll backwards count 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 count lines, leaving the current line and column
+ as is, if possible.
+ <<ccoonnttrrooll--ZZ>>
+ Suspend the current editor session.
+ <<eessccaappee>>
+ Execute eexx 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 count characters without changing the cur-
+ rent 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 <character>.
+ [[ccoouunntt]] ((
+ Back up count sentences.
+ [[ccoouunntt]] ))
+ Move forward count sentences.
+ [[ccoouunntt]] ,,
+ Reverse find character count times.
+ [[ccoouunntt]] --
+ Move to first nonblank of the previous line, count times.
+ [[ccoouunntt]] ..
+ Repeat the last vvii 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 expression.
+ 00 Move to the first character in the current line.
+ : Execute an ex command.
+ [[ccoouunntt]] ;;
+ Repeat the last character find count 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 count 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 count end-of-bigwords.
+ [[ccoouunntt]] FF <<cchhaarraacctteerr>>
+ Search count times backward through the current line for
+ <character>.
+ [[ccoouunntt]] GG
+ Move to line count, or the last line of the file if count not spec-
+ ified.
+ [[ccoouunntt]] HH
+ Move to the screen line count - 1 lines below the top of the
+ screen.
+ [[ccoouunntt]] II
+ Enter input mode, inserting the text at the beginning of the line.
+ [[ccoouunntt]] JJ
+ Join lines.
+ [[ccoouunntt]] LL
+ Move to the screen line count - 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 vvii (or visual) mode and switch to eexx mode.
+ [[ccoouunntt]] RR
+ Enter input mode, replacing the characters in the current line.
+ [[bbuuffffeerr]] [[ccoouunntt]] SS
+ Substitute count lines.
+ [[ccoouunntt]] TT <<cchhaarraacctteerr>>
+ Search backwards, count times, through the current line for the
+ character _a_f_t_e_r the specified <character>.
+ UU Restore the current line to its state before the cursor last moved
+ to it.
+ [[ccoouunntt]] WW
+ Move forward count bigwords.
+ [[bbuuffffeerr]] [[ccoouunntt]] XX
+ Delete count characters before the cursor.
+ [[bbuuffffeerr]] [[ccoouunntt]] YY
+ Copy (or ``yank'') count lines into the specified buffer.
+ ZZZZ Write the file and exit vvii.
+ [[ccoouunntt]] [[[[
+ Back up count section boundaries.
+ [[ccoouunntt]] ]]]]
+ Move forward count section boundaries.
+ ^^ Move to first nonblank character on the current line.
+ [[ccoouunntt]] __
+ Move down count - 1 lines, to the first nonblank character.
+ [[ccoouunntt]] aa
+ Enter input mode, appending the text after the cursor.
+ [[ccoouunntt]] bb
+ Move backwards count words.
+ [[bbuuffffeerr]] [[ccoouunntt]] cc mmoottiioonn
+ Change a region of text.
+ [[bbuuffffeerr]] [[ccoouunntt]] dd mmoottiioonn
+ Delete a region of text.
+ [[ccoouunntt]] ee
+ Move forward count end-of-words.
+ [[ccoouunntt]] ff<<cchhaarraacctteerr>>
+ Search forward, count times, through the rest of the current line
+ for <character>.
+ [[ccoouunntt]] ii
+
+ Enter input mode, inserting the text before the cursor.
+ mm <<cchhaarraacctteerr>>
+ Save the current context (line and column) as <character>.
+ [[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 count characters.
+ [[bbuuffffeerr]] [[ccoouunntt]] ss
+ Substitute count characters in the current line starting with the
+ current character.
+ [[ccoouunntt]] tt <<cchhaarraacctteerr>>
+ Search forward, count times, through the current line for the char-
+ acter immediately _b_e_f_o_r_e <character>.
+ uu Undo the last change made to the file.
+ [[ccoouunntt]] ww
+ Move forward count words.
+ [[bbuuffffeerr]] [[ccoouunntt]] xx
+ Delete count characters.
+ [[bbuuffffeerr]] [[ccoouunntt]] yy mmoottiioonn
+ Copy (or ``yank'') a text region specified by the count and motion
+ into a buffer.
+ [[ccoouunntt11]] zz [[ccoouunntt22]] --||..||++||^^||<<ccaarrrriiaaggee--rreettuurrnn>>
+ Redraw, optionally repositioning and resizing the screen.
+ [[ccoouunntt]] {{
+ Move backward count paragraphs.
+ [[ccoouunntt]] ||
+ Move to a specific _c_o_l_u_m_n position on the current line.
+ [[ccoouunntt]] }}
+ Move forward count paragraphs.
+ [[ccoouunntt]] ~~
+ Reverse the case of the next count character(s).
+ [[ccoouunntt]] ~~ mmoottiioonn
+ Reverse the case of the characters in a text region specified by
+ the count and motion.
+ <<iinntteerrrruupptt>>
+ Interrupt the current operation.
+
+VVII TTEEXXTT IINNPPUUTT CCOOMMMMAANNDDSS
+ The following section describes the commands available in the text input
+ mode of the vvii editor.
+
+ <<nnuull>>
+ Replay the previous input.
+ <<ccoonnttrrooll--DD>>
+ Erase the previous autoindent character.
+ ^^<<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 <tab> and <space> characters to move the cursor
+ forward to a column immediately after the next column which is an
+ even multiple of the sshhiiffttwwiiddtthh option.
+ <<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 eexx 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 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.
+ [[rraannggee]] dd[[eelleettee]] [[bbuuffffeerr]] [[ccoouunntt]] [[ffllaaggss]]
+ Delete the lines from the file.
+ ddii[[ssppllaayy]] bb[[uuffffeerrss]] || ss[[ccrreeeennss]] || tt[[aaggss]]
+ Display buffers, screens or tags.
+ ee[[ddiitt]][[!!]] [[++ccmmdd]] [[ffiillee]]
+ eexx[[!!]] [[++ccmmdd]] [[ffiillee]]
+ Edit a different file.
+ eexxuu[[ssaaggee]] [[ccoommmmaanndd]]
+ Display usage for an eexx command.
+ ff[[iillee]] [[ffiillee]]
+ Display and optionally change the file name.
+ ffgg [[nnaammee]]
+ VVii 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.
+ [[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 vvii only).
+ [[lliinnee]] mmaa[[rrkk]] <<cchhaarraacctteerr>>
+ [[lliinnee]] kk <<cchhaarraacctteerr>>
+ Mark the line with the mark <character>.
+ [[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 eexx --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 file if it was previously saved.
+ rreess[[iizzee]] [[++||--]]ssiizzee
+ VVii 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 eexx commands from a file.
+ sspp[[lliitt]] [[ffiillee ......]]
+ VVii mode only. Split the screen.
+ [[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.
+ ttaaggpp[[oopp]][[!!]] [[ffiillee || nnuummbbeerr]]
+ Pop to the specified tag in the tags stack.
+ uunnmm[[aapp]][[!!]] llhhss
+ Unmap a mapped string.
+ vvee[[rrssiioonn]]
+ Display the version of the eexx//vvii editor.
+ [[lliinnee]] vvii[[ssuuaall]] [[ttyyppee]] [[ccoouunntt]] [[ffllaaggss]]
+ EExx mode only. Enter vvii.
+ vvii[[ssuuaall]][[!!]] [[++ccmmdd]] [[ffiillee]]
+ VVii mode only. Edit a new file.
+ vviiuu[[ssaaggee]] [[ccoommmmaanndd]]
+ Display usage for a vvii 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 abbre-
+ viations 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. 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 otherwise specified.
+
+ aallttwweerraassee [[ooffff]]
+ VVii only. Select an alternate word erase algorithm.
+ aauuttooiinnddeenntt,, aaii [[ooffff]]
+ Automatically indent new lines.
+ aauuttoopprriinntt,, aapp [[ooffff]]
+ EExx only. Display the current line automatically.
+ aauuttoowwrriittee,, aaww [[ooffff]]
+ Write modified files automatically when changing files.
+ bbeeaauuttiiffyy,, bbff [[ooffff]]
+ Discard control characters.
+ ccddppaatthh [[eennvviirroonnmmeenntt vvaarriiaabbllee CCDDPPAATTHH,, oorr ccuurrrreenntt ddiirreeccttoorryy]]
+ The directory paths used as path prefixes for the ccdd command.
+ ccoolluummnnss,, ccoo [[8800]]
+ Set the number of columns in the screen.
+ ccoommmmeenntt [[ooffff]]
+ VVii 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]]
+ EExx only. Announce error messages with a bell.
+ eexxrrcc,, eexx [[ooffff]]
+ Never read startup files in the local directory.
+ eexxtteennddeedd [[ooffff]]
+ Regular expressions are extended (i.e. egrep(1) style) expres-
+ sions.
+ ffllaasshh [[oonn]]
+ Flash the screen instead of beeping the keyboard on error.
+ hhaarrddttaabbss,, hhtt [[88]]
+ Set the spacing between hardware tab settings.
+ iiggnnoorreeccaassee,, iicc [[ooffff]]
+ Ignore case differences in regular expressions.
+ kkeeyyttiimmee [[66]]
+ The 10th's of a second eexx//vvii waits for a subsequent key to complete
+ a key mapping.
+ lleeffttrriigghhtt [[ooffff]]
+ VVii only. Do left-right scrolling.
+ lliinneess,, llii [[2244]]
+ VVii only. Set the number of lines in the screen.
+ lliisspp [[ooffff]]
+ VVii 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.
+ mmaaggiicc [[oonn]]
+ Treat certain characters specially in regular expressions.
+ mmaattcchhttiimmee [[77]]
+ VVii only. The 10th's of a second eexx//vvii pauses on the matching char-
+ acter 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 eexx 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_.
+ 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.
+ ooppeenn [[oonn]]
+ EExx only. If this option is not set, the ooppeenn and vviissuuaall commands
+ are disallowed.
+ ooppttiimmiizzee,, oopptt [[oonn]]
+ VVii only. Optimize text throughput to dumb terminals.
+
+ _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]]
+ VVii only. Define additional paragraph boundaries for the {{ and }}
+ commands.
+ pprroommpptt [[oonn]]
+ EExx only. Display a command prompt.
+ rreeaaddoonnllyy,, rroo [[ooffff]]
+ Mark the file as read-only.
+ rreeccddiirr [[//vvaarr//ttmmpp//vvii..rreeccoovveerr]]
+ The directory where recovery files are stored.
+ rreeddrraaww,, rree [[ooffff]]
+ VVii 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]]
+ VVii only. Display a row/column ruler on the colon command line.
+ ssccrroollll,, ssccrr [[wwiinnddooww // 22]]
+ Set the number of lines scrolled.
+ sseeccttiioonnss,, sseecctt [[NNHHSSHHHH HHUUnnhhsshh]]
+ VVii only. Define additional section boundaries for the [[[[ and ]]]]
+ commands.
+ sshheellll,, sshh [[eennvviirroonnmmeenntt vvaarriiaabbllee SSHHEELLLL,, oorr //bbiinn//sshh]]
+ Select the shell used by the editor.
+ sshhiiffttwwiiddtthh,, ssww [[88]]
+ Set the autoindent and shift command indentation width.
+ sshhoowwddiirrttyy [[ooffff]]
+ VVii only. Display an asterisk on the colon command line if the file
+ has been modified.
+ sshhoowwmmaattcchh,, ssmm [[ooffff]]
+ VVii only. Note matching ``{'' and ``('' for ``}'' and ``)'' charac-
+ ters.
+ sshhoowwmmooddee [[ooffff]]
+ VVii only. Display the current editor mode (command or input).
+ ssiiddeessccrroollll [[1166]]
+ VVii 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 implementation.
+ ttiillddeeoopp
+ Modify the ~~ command to take an associated motion.
+ ttiimmeeoouutt,, ttoo [[oonn]]
+ Time out on keys which may be mapped.
+ ttttyywweerraassee [[ooffff]]
+ VVii only. Select an alternate erase algorithm.
+ vveerrbboossee [[ooffff]]
+ only. Display an error message for every error.
+ ww330000 [[nnoo ddeeffaauulltt]]
+ VVii only. Set the window size if the baud rate is less than 1200
+ baud.
+ ww11220000 [[nnoo ddeeffaauulltt]]
+ VVii only. Set the window size if the baud rate is equal to 1200
+ baud.
+ ww99660000 [[nnoo ddeeffaauulltt]]
+ VVii only. Set the window size if the baud rate is greater than 1200
+ baud.
+ 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]]
+ Set the window size for the screen.
+ wwrraappmmaarrggiinn,, wwmm [[00]]
+ VVii only. Break lines automatically when they reach the right-hand
+ margin.
+ 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
+ COLUMNS The number of columns on the screen. This value overrides any
+ system or terminal specific values. If the COLUMNS environ-
+ mental variable is not set when eexx//vvii runs, or the ccoolluummnnss op-
+ tion is explicitly reset by the user, eexx//vvii enters the value
+ into the environment.
+ EXINIT A list of eexx startup commands, read if the variable NEXINIT is
+ not set.
+ HOME The user's home directory, used as the initial directory path
+ for the startup _$_H_O_M_E_/_._n_e_x_r_c and _$_H_O_M_E_/_._e_x_r_c files. This val-
+ ue is also used as the default directory for the vvii ccdd com-
+ mand.
+ LINES The number of rows on the screen. This value overrides any
+ system or terminal specific values. If the LINES environmen-
+ tal variable is not set when eexx//vvii runs, or the lliinneess option
+ is explicitly reset by the user, eexx//vvii enters the value into
+ the environment.
+ NEXINIT A list of eexx startup commands.
+ SHELL The user's shell of choice (see also the sshheellll option).
+ TERM The user's terminal type. The default is the type
+ ``unknown''. If the TERM environmental variable is not set
+ when eexx//vvii runs, or the tteerrmm option is explicitly reset by the
+ user, eexx//vvii enters the value into the environment.
+ TMPDIR The location used to stored temporary files (see also the
+ ddiirreeccttoorryy option).
+
+AASSYYNNCCHHRROONNOOUUSS EEVVEENNTTSS
+ SIGALRM VVii//eexx uses this signal for periodic backups of file modifica-
+ tions 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 recovered. See the vvii//eexx Reference
+ manual section entitled ``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 vvii//eexx Reference manual sec-
+ tion entitled ``Sizing the Screen'' for more information.
+ SIGCONT
+ SIGQUIT
+ SIGTSTP VVii//eexx ignores these signals.
+
+BBUUGGSS
+ See the file _n_v_i_/_d_o_c_s_/_b_u_g_s_._c_u_r_r_e_n_t for a list of the known bugs in this
+ version.
+
+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
+ ctags(1), more(1), curses(3), dbopen(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 vvii 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 eexx editor, as dis-
+ tributed 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 intro-
+ duction to a simple version of the eexx screen editor.
+
+ ``Ex/Vi Reference Manual'', found in the ``UNIX User's Manual
+ Supplementary Documents'' section of the 4.4BSD manual set. This docu-
+ ment is the final reference for the nneexx//nnvvii text editors, as distributed
+ in 4.4BSD and 4.4BSD-Lite.
+
+ RRooffff source for all of these documents is distributed with nneexx//nnvvii in the
+ _n_v_i_/_U_S_D_._d_o_c directory of the nneexx//nnvvii 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 nneexx//nnvvii source code.
+
+HHIISSTTOORRYY
+ The nneexx//nnvvii replacements for the eexx//vvii editor first appeared in 4.4BSD.
+
+SSTTAANNDDAARRDDSS
+ NNeexx//nnvvii is close to IEEE Std1003.2 (``POSIX''). That document differs
+ from historical eexx//vvii practice in several places; there are changes to be
+ made on both sides.
+
+4.4BSD July 15, 1994 13
diff --git a/usr.bin/vi/USD.doc/vi.man/vi.0.ps b/usr.bin/vi/USD.doc/vi.man/vi.0.ps
new file mode 100644
index 000000000000..f6cfc03ea937
--- /dev/null
+++ b/usr.bin/vi/USD.doc/vi.man/vi.0.ps
@@ -0,0 +1,1063 @@
+%!PS-Adobe-3.0
+%%Creator: groff version 1.08
+%%DocumentNeededResources: font Times-Roman
+%%+ font Times-Bold
+%%+ font Courier-Bold
+%%+ font Courier-Oblique
+%%+ font Courier
+%%+ font Times-Italic
+%%+ font Symbol
+%%DocumentSuppliedResources: procset grops 1.08 0
+%%Pages: 14
+%%PageOrder: Ascend
+%%Orientation: Portrait
+%%EndComments
+%%BeginProlog
+%%BeginResource: procset grops 1.08 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
+/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 Courier-Bold
+%%IncludeResource: font Courier-Oblique
+%%IncludeResource: font Courier
+%%IncludeResource: font Times-Italic
+%%IncludeResource: font Symbol
+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
+/Courier@0 ENC0/Courier RE/Courier-Oblique@0 ENC0/Courier-Oblique RE
+/Courier-Bold@0 ENC0/Courier-Bold 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 -.834(EX/VI \( 1 \))72 48 R(BSD Reference Manual)
+258.235 48 Q -.834(EX/VI \( 1 \))496.682 48 R/F1 10/Times-Bold@0 SF -.2(NA)72
+108 S(ME).2 E/F2 10/Courier-Bold@0 SF(ex, vi, view)102 120 Q F0 2.5<ad74>2.5 G
+-.15(ex)187.42 120 S 2.5(te).15 G(ditors)206.43 120 Q F1(SYNOPSIS)72 144 Q F2
+(ex)102 156 Q F0([)3.333 E F2(\255eFRrsv)2.499 E F0 3.333(][).833 G F2<ad63>
+-.834 E/F3 10/Courier-Oblique@0 SF(cmd)6 E F0 3.333(][).833 G F2<ad74>-.834 E
+F3(tag)6 E F0 3.333(][).833 G F2<ad77>-.834 E F3(size)6 E F0 3.333(][).833 G F3
+(file ...)330.796 156 Q F0(]).833 E F2(vi)102 168 Q F0([)3.333 E F2(\255eFRrv)
+2.499 E F0 3.333(][).833 G F2<ad63>-.834 E F3(cmd)6 E F0 3.333(][).833 G F2
+<ad74>-.834 E F3(tag)6 E F0 3.333(][).833 G F2<ad77>-.834 E F3(size)6 E F0
+3.333(][).833 G F3(file ...)324.796 168 Q F0(]).833 E F2(view)102 180 Q F0([)
+3.333 E F2(\255eFRrv)2.499 E F0 3.333(][).833 G F2<ad63>-.834 E F3(cmd)6 E F0
+3.333(][).833 G F2<ad74>-.834 E F3(tag)6 E F0 3.333(][).833 G F2<ad77>-.834 E
+F3(size)6 E F0 3.333(][).833 G F3(file ...)336.796 180 Q F0(]).833 E F1
+(DESCRIPTION)72 204 Q F2(Vi)102 216 Q F0 .176(is a screen oriented te)2.676 F
+.176(xt editor)-.15 F(.)-.55 E F2(Ex)5.176 E F0 .176(is a line-oriented te)
+2.676 F .175(xt editor)-.15 F(.)-.55 E F2(Ex)5.175 E F0(and)2.675 E F2(vi)2.675
+E F0 .175(are dif)2.675 F .175(ferent interf)-.25 F .175(aces to the)-.1 F .56
+(same program, and it is possible to switch back and forth during an edit sess\
+ion.)102 228 R F2(View)5.561 E F0 .561(is the equi)3.061 F -.25(va)-.25 G .561
+(lent of).25 F(using the)102 240 Q F2<ad52>4.166 E F0(\(read-only\) option of)
+2.5 E F2(vi)2.5 E F0(.)A .216(This manual page is the one pro)102 258 R .215
+(vided with the)-.15 F F2(nex/nvi)2.715 E F0 -.15(ve)2.715 G .215
+(rsions of the).15 F F2(ex/vi)2.715 E F0(te)2.715 E .215(xt editors.)-.15 F F2
+(Nex/nvi)5.215 E F0(are)2.715 E 1.937(intended as b)102 270 R(ug-for)-.2 E(-b)
+-.2 E 1.937(ug compatible replacements for the original F)-.2 F 1.938
+(ourth Berk)-.15 F(ele)-.1 E 4.438(yS)-.15 G(oftw)456.982 270 Q 1.938
+(are Distrib)-.1 F(ution)-.2 E(\(4BSD\))102 282 Q F2(ex)3.008 E F0(and)3.008 E
+F2(vi)3.008 E F0 3.008(programs. F)3.008 F .508
+(or the rest of this manual page,)-.15 F F2(nex/nvi)3.008 E F0 .507
+(is used only when it')3.008 F 3.007(sn)-.55 G(ecessary)506.13 282 Q
+(to distinguish it from the historic implementations of)102 294 Q F2(ex/vi)2.5
+E F0(.)A .961(This manual page is intended for users already f)102 312 R .961
+(amiliar with)-.1 F F2(ex/vi)3.461 E F0 3.462(.A)C -.15(ny)397.982 312 S .962
+(one else should almost certainly).15 F .582
+(read a good tutorial on the editor before this manual page.)102 324 R .582
+(If you')5.582 F .581(re in an unf)-.5 F .581(amiliar en)-.1 F .581
+(vironment, and you)-.4 F .799(absolutely ha)102 336 R 1.099 -.15(ve t)-.2 H
+3.299(og).15 G .799(et w)184.317 336 R .799(ork done immediately)-.1 F 3.299
+(,r)-.65 G .8(ead the section after the options description, entitled `)299.803
+336 R(`F)-.74 E(ast)-.15 E(Startup')102 348 Q('. It')-.74 E 2.5(sp)-.55 G
+(robably enough to get you going.)162.09 348 Q(The follo)102 366 Q
+(wing options are a)-.25 E -.25(va)-.2 G(ilable:).25 E F2<ad63>103.666 384 Q F0
+(Ex)137 384 Q(ecute)-.15 E F3(cmd)2.675 E F0 .175
+(immediately after starting the edit session.)2.675 F -.15(Pa)5.175 G .174
+(rticularly useful for initial positioning in).15 F .624(the \214le, ho)137 396
+R(we)-.25 E -.15(ve)-.25 G(r).15 E F3(cmd)3.124 E F0 .625
+(is not limited to positioning commands.)3.124 F .625
+(This is the POSIX 1003.2 interf)5.625 F(ace)-.1 E(for the historic `)137 408 Q
+(`+cmd')-.74 E 2.5('s)-.74 G(yntax.)239.47 408 Q F2(Nex/nvi)5 E F0
+(supports both the old and ne)2.5 E 2.5(ws)-.25 G(yntax.)440.1 408 Q F2<ad65>
+103.666 426 Q F0(Start editing in e)137 426 Q 2.5(xm)-.15 G
+(ode, as if the command name were)218.52 426 Q F2(ex)2.5 E F0(.)A F2<ad46>
+103.666 444 Q F0(Don')137 444 Q 2.677(tc)-.18 G(op)167.267 444 Q 2.677(yt)-.1 G
+.177(he entire \214le when \214rst starting to edit.)187.624 444 R .177
+(\(The def)5.177 F .177(ault is to mak)-.1 F 2.677(eac)-.1 G(op)456.532 444 Q
+2.676(yi)-.1 G 2.676(nc)476.888 444 S .176(ase someone)489.004 444 R
+(else modi\214es the \214le during your edit session.\))137 456 Q F2<ad52>
+103.666 474 Q F0 .184
+(Start editing in read-only mode, as if the command name w)137 474 R(as)-.1 E
+F2(view)2.685 E F0 2.685(,o)C 2.685(rt)421.415 474 S .185(he readonly option w)
+430.21 474 R .185(as set.)-.1 F F2<ad72>103.666 492 Q F0(Reco)137 492 Q -.15
+(ve)-.15 G 2.627(rt).15 G .127(he speci\214ed \214les, or)175.427 492 R 2.627
+(,i)-.4 G 2.627(fn)263.305 492 S 2.627<6f8c>274.262 492 S .127
+(les are speci\214ed, list the \214les that could be reco)287.449 492 R -.15
+(ve)-.15 G 2.626(red. If).15 F .126(no re-)2.626 F(co)137 504 Q -.15(ve)-.15 G
+.4(rable \214les by the speci\214ed name e).15 F .401
+(xist, the \214le is edited as if the)-.15 F F2<ad72>4.567 E F0 .401
+(option had not been speci-)2.901 F(\214ed.)137 516 Q F2<ad73>103.666 534 Q F0
+1.621(Enter batch mode; applicable only to)137 534 R F2(ex)4.121 E F0 1.621
+(edit sessions.)4.121 F 1.62(Batch mode is useful when running)6.621 F F2(ex)
+4.12 E F0 2.647(scripts. Prompts,)137 546 R(informati)2.647 E .447 -.15(ve m)
+-.25 H .147(essages and other user oriented message are turned of).15 F .148
+(f, and no start-)-.25 F .067(up \214les or en)137 558 R .067(vironmental v)-.4
+F .066(ariables are read.)-.25 F .066(This is the POSIX 1003.2 interf)5.066 F
+.066(ace for the historic `)-.1 F(`\255')-.74 E(')-.74 E(ar)137 570 Q(gument.)
+-.18 E F2(Nex/nvi)5 E F0(supports both the old and ne)2.5 E 2.5(ws)-.25 G
+(yntax.)353 570 Q F2<ad74>103.666 588 Q F0
+(Start editing at the speci\214ed tag.)137 588 Q(\(See)5 E/F4 10/Courier@0 SF
+(ctags)2.5 E F0(\(1\)\).)A F2<ad77>103.666 606 Q F0(Set the initial windo)137
+606 Q 2.5(ws)-.25 G(ize to the speci\214ed number of lines.)231.2 606 Q F2
+<ad76>103.666 624 Q F0(Start editing in vi mode, as if the command name w)137
+624 Q(as)-.1 E F2(vi)2.5 E F0(or)2.5 E F2(view)2.5 E F0(.)A F2<ad58>103.666 642
+Q F0(Reserv)137 642 Q(ed for X11 interf)-.15 E(aces.)-.1 E/F5 10/Times-Italic@0
+SF(No X11 support is curr)5 E(ently implemented.)-.37 E F0 .35
+(Command input for)102 660 R F2(ex/vi)2.85 E F0 .35
+(is read from the standard input.)2.85 F .35(In the)5.35 F F2(vi)2.85 E F0
+(interf)2.85 E .35(ace, it is an error if standard in-)-.1 F .343
+(put is not a terminal.)102 672 R .343(In the)5.343 F F2(ex)2.843 E F0(interf)
+2.843 E .343(ace, if standard input is not a terminal,)-.1 F F2(ex)2.843 E F0
+.342(will read commands from it)2.843 F(re)102 684 Q -.05(ga)-.15 G .137
+(rdless, ho).05 F(we)-.25 E -.15(ve)-.25 G .937 -.4(r, t).15 H .137
+(he session will be a batch mode session, e).4 F .138(xactly as if the)-.15 F
+F2<ad73>4.304 E F0 .138(option had been speci\214ed.)2.638 F 172.465
+(4.4BSD July)72 750 R(15, 1994)2.5 E(1)535 750 Q EP
+%%Page: 2 2
+%%BeginPageSetup
+BP
+%%EndPageSetup
+/F0 10/Times-Roman@0 SF -.834(EX/VI \( 1 \))72 48 R(BSD Reference Manual)
+258.235 48 Q -.834(EX/VI \( 1 \))496.682 48 R/F1 10/Courier-Bold@0 SF(Ex/vi)102
+96 Q F0 -.15(ex)2.5 G(its 0 on success, and greater than 0 if an error occurs.)
+.15 E/F2 10/Times-Bold@0 SF -.9(FA)72 120 S 1.666(ST ST).9 F(AR)-.9 E(TUP)-.4 E
+F0 .467(This section will tell you the minimum amount that you need to do simp\
+le editing tasks using)102 132 R F1(vi)2.966 E F0 2.966(.I)C 2.966(fy)506.584
+132 S(ou')517.88 132 Q -.15(ve)-.5 G(ne)102 144 Q -.15(ve)-.25 G 3.453(ru).15 G
+.953(sed an)132.263 144 R 3.453(ys)-.15 G .953(creen editor before, you')
+170.679 144 R .953(re lik)-.5 F .953(ely to ha)-.1 F 1.253 -.15(ve p)-.2 H .953
+(roblems e).15 F -.15(ve)-.25 G 3.453(nw).15 G .953
+(ith this simple introduction.)412.286 144 R(In)5.954 E
+(that case you should \214nd someone that already kno)102 156 Q(ws)-.25 E F1
+(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 F1(Vi)102 174 Q F0 .294
+(is a screen editor)2.794 F 5.294(.T)-.55 G .294(his means that it tak)198.51
+174 R .293
+(es up almost the entire screen, displaying part of the \214le on each)-.1 F
+.001(screen line, e)102 186 R .001(xcept for the last line of the screen.)-.15
+F .002(The last line of the screen is used for you to gi)5.001 F .302 -.15
+(ve c)-.25 H(ommands).15 E(to)102 198 Q F1(vi)2.5 E F0 2.5(,a)C(nd for)133.72
+198 Q F1(vi)2.5 E F0(to gi)2.5 E .3 -.15(ve i)-.25 H(nformation to you.).15 E
+.585(The other f)102 216 R .585(act that you need to understand is that)-.1 F
+F1(vi)3.085 E F0 .585(is a modeful editor)3.085 F 3.085(,i)-.4 G .584
+(.e. you are either entering te)406.125 216 R .584(xt or)-.15 F .836(you are e)
+102 228 R -.15(xe)-.15 G .836(cuting commands, and you ha).15 F 1.137 -.15
+(ve t)-.2 H 3.337(ob).15 G 3.337(ei)301.062 228 S 3.337(nt)311.619 228 S .837
+(he right mode to do one or the other)322.736 228 R 5.837(.Y)-.55 G .837
+(ou will be in)487.209 228 R 1.094
+(command mode when you \214rst start editing a \214le.)102 240 R 1.093
+(There are commands that switch you into input mode.)6.094 F .084
+(There is only one k)102 252 R .384 -.15(ey t)-.1 H .085(hat tak).15 F .085
+(es you out of input mode, and that is the <escape> k)-.1 F -.15(ey)-.1 G 5.085
+(.\()-.5 G -2.15 -.25(Ke y)449.895 252 T .085(names are written)2.835 F 1.473
+(using less-than and greater)102 264 R 1.473(-than signs, e.g.)-.2 F 1.473
+(<escape> means the `)6.473 F(`escape')-.74 E 3.973('k)-.74 G -.15(ey)420.59
+264 S 3.973(,u)-.5 G 1.473(sually labeled `)440.703 264 R(`esc')-.74 E 3.972
+('o)-.74 G(n)535 264 Q .553(your terminal')102 276 R 3.053(sk)-.55 G -.15(ey)
+171.336 276 S 3.053(board.\) If).15 F(you')3.053 E .554(re e)-.5 F -.15(ve)-.25
+G 3.054(rc).15 G .554(onfused as to which mode you')277.45 276 R .554(re in, k)
+-.5 F .554(eep entering the <escape>)-.1 F -.1(ke)102 288 S 2.615(yu)-.05 G
+(ntil)123.805 288 Q F1(vi)2.615 E F0 .115(beeps at you.)2.615 F(\(Generally)
+5.115 E(,)-.65 E F1(vi)2.615 E F0 .115
+(will beep at you if you try and do something that')2.615 F 2.614(sn)-.55 G
+.114(ot allo)484.472 288 R 2.614(wed. It)-.25 F
+(will also display error messages.\))102 300 Q 2.057 -.8(To s)102 318 T .457
+(tart editing a \214le, enter the command `).8 F(`)-.74 E/F3 10/Courier@0 SF
+.458(vi file_name<carriage-return>)B F0 -.74('')C 2.958(.T).74 G .458
+(he command you)470.204 318 R .333
+(should enter as soon as you start editing is `)102 330 R(`)-.74 E F3 .333
+(:set verbose showmode<carriage-return>)B F0 -.74('')C 2.833(.T).74 G(his)
+528.33 330 Q 1.441(will mak)102 342 R 3.941(et)-.1 G 1.441(he editor gi)149.782
+342 R 1.741 -.15(ve y)-.25 H 1.441(ou v).15 F 1.441
+(erbose error messages and display the current mode at the bottom of the)-.15 F
+(screen.)102 354 Q(The commands to mo)102 372 Q .3 -.15(ve a)-.15 H
+(round the \214le are:).15 E F2(h)102 384 Q F0(Mo)131 384 Q .3 -.15(ve t)-.15 H
+(he cursor left one character).15 E(.)-.55 E F2(j)102 396 Q F0(Mo)131 396 Q .3
+-.15(ve t)-.15 H(he cursor do).15 E(wn one line.)-.25 E F2(k)102 408 Q F0(Mo)
+131 408 Q .3 -.15(ve t)-.15 H(he cursor up one line.).15 E F2(l)102 420 Q F0
+(Mo)131 420 Q .3 -.15(ve t)-.15 H(he cursor right one character).15 E(.)-.55 E
+F2(<cursor)102 432 Q(-arr)-.37 E -.1(ow)-.18 G(s>).1 E F0(The cursor arro)131
+444 Q 2.5(wk)-.25 G -.15(ey)207.01 444 S 2.5(ss).15 G(hould w)226.58 444 Q
+(ork, too.)-.1 E F2(/text<carriage-r)102 456 Q(etur)-.18 E(n>)-.15 E F0
+(Search for the string `)131 468 Q(`te)-.74 E(xt')-.15 E 2.5('i)-.74 G 2.5(nt)
+246.84 468 S(he \214le, and mo)257.12 468 Q .3 -.15(ve t)-.15 H
+(he cursor to its \214rst character).15 E(.)-.55 E(The commands to enter ne)102
+486 Q 2.5(wt)-.25 G -.15(ex)220.34 486 S 2.5(ta).15 G(re:)239.35 486 Q F2(a)102
+498 Q F0(Append ne)131 498 Q 2.5(wt)-.25 G -.15(ex)186.85 498 S(t,).15 E/F4 10
+/Times-Italic@0 SF(after)2.5 E F0(the cursor)2.5 E(.)-.55 E F2(i)102 510 Q F0
+(Insert ne)131 510 Q 2.5(wt)-.25 G -.15(ex)177.96 510 S(t,).15 E F4(befor)2.5 E
+(e)-.37 E F0(the cursor)2.5 E(.)-.55 E F2(o)102 522 Q F0(Open a ne)131 522 Q
+2.5(wl)-.25 G(ine belo)183.79 522 Q 2.5(wt)-.25 G
+(he line the cursor is on, and start entering te)227.98 522 Q(xt.)-.15 E F2(O)
+102 534 Q F0(Open a ne)131 534 Q 2.5(wl)-.25 G(ine abo)183.79 534 Q .3 -.15
+(ve t)-.15 H(he line the cursor is on, and start entering te).15 E(xt.)-.15 E
+F2(<escape>)102 546 Q F0 .744(Once you')131 558 R 1.044 -.15(ve e)-.5 H .744
+(ntered input mode using the one of the).15 F F2(a)3.244 E F0(,)A F2(i)3.244 E
+F0(,)A F2(O)3.244 E F0 3.244(,o)C(r)390.542 558 Q F2(o)3.243 E F0 .743
+(commands, use)3.243 F F2(<escape>)3.243 E F0 .743(to quit)3.243 F(entering te)
+131 570 Q(xt and return to command mode.)-.15 E(The commands to cop)102 588 Q
+2.5(yt)-.1 G -.15(ex)200.78 588 S 2.5(ta).15 G(re:)219.79 588 Q F2(yy)102 600 Q
+F0(Cop)131 600 Q 2.5(yt)-.1 G(he line the cursor is on.)157.85 600 Q F2(p)102
+612 Q F0(Append the copied line after the line the cursor is on.)131 612 Q
+(The commands to delete te)102 630 Q(xt are:)-.15 E F2(dd)102 642 Q F0
+(Delete the line the cursor is on.)131 642 Q F2(x)102 654 Q F0
+(Delete the character the cursor is on.)131 654 Q
+(The commands to write the \214le are:)102 672 Q F2(:w<carriage-r)102 684 Q
+(etur)-.18 E(n>)-.15 E F0 .528(Write the \214le back to the \214le with the na\
+me that you originally used as an ar)131 696 R .528(gument on the)-.18 F F1(vi)
+3.028 E F0(com-)3.028 E 172.465(4.4BSD July)72 750 R(15, 1994)2.5 E(2)535 750 Q
+EP
+%%Page: 3 3
+%%BeginPageSetup
+BP
+%%EndPageSetup
+/F0 10/Times-Roman@0 SF -.834(EX/VI \( 1 \))72 48 R(BSD Reference Manual)
+258.235 48 Q -.834(EX/VI \( 1 \))496.682 48 R(mand line.)131 96 Q/F1 10
+/Times-Bold@0 SF(:w \214le_name<carriage-r)102 108 Q(etur)-.18 E(n>)-.15 E F0
+(Write the \214le back to the \214le with the name `)131 120 Q(`\214le_name')
+-.74 E('.)-.74 E(The commands to quit editing and e)102 138 Q
+(xit the editor are:)-.15 E F1(:q<carriage-r)102 150 Q(etur)-.18 E(n>)-.15 E F0
+.848(Quit editing and lea)131 162 R 1.148 -.15(ve v)-.2 H 3.348(i\().15 G .848
+(if you')239.6 162 R 1.148 -.15(ve m)-.5 H .848(odi\214ed the \214le, b).15 F
+.848(ut not sa)-.2 F -.15(ve)-.2 G 3.348(dy).15 G .848(our changes,)415.454 162
+R/F2 10/Courier-Bold@0 SF(vi)3.347 E F0 .847(will refuse to)3.347 F(quit\).)131
+174 Q F1(:q!<carriage-r)102 186 Q(etur)-.18 E(n>)-.15 E F0(Quit, discarding an)
+131 198 Q 2.5(ym)-.15 G(odi\214cations that you may ha)222.51 198 Q .3 -.15
+(ve m)-.2 H(ade.).15 E .686(One \214nal caution.)102 216 R .686
+(Unusual characters can tak)5.686 F 3.187(eu)-.1 G 3.187(pm)302.483 216 S .687
+(ore than one column on the screen, and long lines can)318.45 216 R(tak)102 228
+Q 3.129(eu)-.1 G 3.129(pm)126.689 228 S .629(ore than a single screen line.)
+142.598 228 R .629(The abo)5.629 F .929 -.15(ve c)-.15 H .629(ommands w).15 F
+.629(ork on `)-.1 F(`ph)-.74 E(ysical')-.05 E 3.129('c)-.74 G .628
+(haracters and lines, i.e.)446.476 228 R(the)102 240 Q 2.74(ya)-.15 G -.25(ff)
+126.25 240 S .24(ect the entire line no matter ho).25 F 2.74(wm)-.25 G(an)
+273.79 240 Q 2.74(ys)-.15 G .241(creen lines it tak)294.71 240 R .241
+(es up and the entire character no matter ho)-.1 F(w)-.25 E(man)102 252 Q 2.5
+(ys)-.15 G(creen columns it tak)130.46 252 Q(es up.)-.1 E F1 1.666(VI COMMANDS)
+72 276 R F0 .186(The follo)102 288 R .186
+(wing section describes the commands a)-.25 F -.25(va)-.2 G .186
+(ilable in the command mode of the).25 F F2(vi)2.686 E F0(editor)2.686 E 5.186
+(.I)-.55 G 2.685(ne)498.54 288 S .185(ach en-)510.665 288 R(try belo)102 300 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)102 324 Q(ol-A>)-.18 E F0(Search forw)131 336
+Q(ard)-.1 E/F3 10/Courier@0 SF(count)2.5 E F0(times for the current w)2.5 E
+(ord.)-.1 E F1([count] <contr)102 348 Q(ol-B>)-.18 E F0 -.15(Pa)131 360 S
+(ge backw).15 E(ards)-.1 E F3(count)2.5 E F0(screens.)2.5 E F1([count] <contr)
+102 372 Q(ol-D>)-.18 E F0(Scroll forw)131 384 Q(ard)-.1 E F3(count)2.5 E F0
+(lines.)2.5 E F1([count] <contr)102 396 Q(ol-E>)-.18 E F0(Scroll forw)131 408 Q
+(ard)-.1 E F3(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)
+102 420 Q(ol-F>)-.18 E F0 -.15(Pa)131 432 S(ge forw).15 E(ard)-.1 E F3(count)
+2.5 E F0(screens.)2.5 E F1(<contr)102 444 Q(ol-G>)-.18 E F0
+(Display the \214le information.)131 456 Q F1(<contr)102 468 Q(ol-H>)-.18 E
+([count] h)102 480 Q F0(Mo)131 492 Q .3 -.15(ve t)-.15 H(he cursor back).15 E
+F3(count)2.5 E F0(characters in the current line.)2.5 E F1([count] <contr)102
+504 Q(ol-J>)-.18 E([count] <contr)102 516 Q(ol-N>)-.18 E([count] j)102 528 Q F0
+(Mo)131 540 Q .3 -.15(ve t)-.15 H(he cursor do).15 E(wn)-.25 E F3(count)2.5 E
+F0(lines without changing the current column.)2.5 E F1(<contr)102 552 Q(ol-L>)
+-.18 E(<contr)102 564 Q(ol-R>)-.18 E F0(Repaint the screen.)131 576 Q F1
+([count] <contr)102 588 Q(ol-M>)-.18 E([count] +)102 600 Q F0(Mo)131 612 Q .3
+-.15(ve t)-.15 H(he cursor do).15 E(wn)-.25 E F3(count)2.5 E F0
+(lines to the \214rst nonblank character of that line.)2.5 E F1([count] <contr)
+102 624 Q(ol-P>)-.18 E([count] k)102 636 Q F0(Mo)131 648 Q .3 -.15(ve t)-.15 H
+(he cursor up).15 E F3(count)2.5 E F0
+(lines, without changing the current column.)2.5 E F1(<contr)102 660 Q(ol-T>)
+-.18 E F0(Return to the most recent tag conte)131 672 Q(xt.)-.15 E F1(<contr)
+102 684 Q(ol-U>)-.18 E F0 172.465(4.4BSD July)72 750 R(15, 1994)2.5 E(3)535 750
+Q EP
+%%Page: 4 4
+%%BeginPageSetup
+BP
+%%EndPageSetup
+/F0 10/Times-Roman@0 SF -.834(EX/VI \( 1 \))72 48 R(BSD Reference Manual)
+258.235 48 Q -.834(EX/VI \( 1 \))496.682 48 R(Scroll backw)131 96 Q(ards)-.1 E
+/F1 10/Courier@0 SF(count)2.5 E F0(lines.)2.5 E/F2 10/Times-Bold@0 SF(<contr)
+102 108 Q(ol-W>)-.18 E F0 .635(Switch to the ne)131 120 R .635(xt lo)-.15 F
+.635(wer screen in the windo)-.25 F 1.935 -.65(w, o)-.25 H 1.435 -.4(r, t).65 H
+3.135(ot).4 G .635(he \214rst screen if there are no lo)353.205 120 R .635
+(wer screens in)-.25 F(the windo)131 132 Q -.65(w.)-.25 G F2(<contr)102 144 Q
+(ol-Y>)-.18 E F0(Scroll backw)131 156 Q(ards)-.1 E F1(count)2.5 E F0
+(lines, lea)2.5 E(ving the current line and column as is, if possible.)-.2 E F2
+(<contr)102 168 Q(ol-Z>)-.18 E F0(Suspend the current editor session.)131 180 Q
+F2(<escape>)102 192 Q F0(Ex)131 204 Q(ecute)-.15 E/F3 10/Courier-Bold@0 SF(ex)
+2.5 E F0(commands or cancel partial commands.)2.5 E F2(<contr)102 216 Q(ol-]>)
+-.18 E F0(Push a tag reference onto the tag stack.)131 228 Q F2(<contr)102 240
+Q(ol-^>)-.18 E F0(Switch to the most recently edited \214le.)131 252 Q F2
+([count] <space>)102 264 Q([count] l)102 276 Q F0(Mo)131 288 Q .3 -.15(ve t)
+-.15 H(he cursor forw).15 E(ard)-.1 E F1(count)2.5 E F0
+(characters without changing the current line.)2.5 E F2
+([count] ! motion shell-ar)102 300 Q(gument\(s\))-.1 E F0(Replace te)131 312 Q
+(xt with results from a shell command.)-.15 E F2([count] # +|-|#)102 324 Q F0
+(Increment or decrement the cursor number)131 336 Q(.)-.55 E F2([count] $)102
+348 Q F0(Mo)131 360 Q .3 -.15(ve t)-.15 H(he cursor to the end of a line.).15 E
+F2(%)102 372 Q F0(Mo)131 372 Q .3 -.15(ve t)-.15 H 2.5(ot).15 G
+(he matching character)169.59 372 Q(.)-.55 E F2(&)102 384 Q F0(Repeat the pre)
+131 384 Q(vious substitution command on the current line.)-.25 E F2
+('<character>)102 396 Q(`<character>)102 408 Q F0(Return to a conte)131 420 Q
+(xt mark)-.15 E(ed by the character)-.1 E F1(<character>)2.5 E F0(.)A F2
+([count] \()102 432 Q F0(Back up)131 444 Q F1(count)2.5 E F0(sentences.)2.5 E
+F2([count] \))102 456 Q F0(Mo)131 468 Q .3 -.15(ve f)-.15 H(orw).15 E(ard)-.1 E
+F1(count)2.5 E F0(sentences.)2.5 E F2([count] ,)102 480 Q F0(Re)131 492 Q -.15
+(ve)-.25 G(rse \214nd character).15 E F1(count)2.5 E F0(times.)2.5 E F2
+([count] -)102 504 Q F0(Mo)131 516 Q .3 -.15(ve t)-.15 H 2.5<6f8c>.15 G
+(rst nonblank of the pre)172.37 516 Q(vious line,)-.25 E F1(count)2.5 E F0
+(times.)2.5 E F2([count] .)102 528 Q F0(Repeat the last)131 540 Q F3(vi)2.5 E
+F0(command that modi\214ed te)2.5 E(xt.)-.15 E F2(/RE<carriage-r)102 552 Q
+(etur)-.18 E(n>)-.15 E(/RE/ [offset]<carriage-r)102 564 Q(etur)-.18 E(n>)-.15 E
+(?RE<carriage-r)102 576 Q(etur)-.18 E(n>)-.15 E(?RE? [offset]<carriage-r)102
+588 Q(etur)-.18 E(n>)-.15 E(N)102 600 Q(n)102 612 Q F0(Search forw)131 612 Q
+(ard or backw)-.1 E(ard for a re)-.1 E(gular e)-.15 E(xpression.)-.15 E F2(0)
+102 624 Q F0(Mo)131 624 Q .3 -.15(ve t)-.15 H 2.5(ot).15 G
+(he \214rst character in the current line.)169.59 624 Q 26.22(:E)102 636 S -.15
+(xe)137.11 636 S(cute an e).15 E 2.5(xc)-.15 G(ommand.)193.73 636 Q F2
+([count] ;)102 648 Q F0(Repeat the last character \214nd)131 660 Q F1(count)2.5
+E F0(times.)2.5 E F2([count] < motion)102 672 Q F0 172.465(4.4BSD July)72 750 R
+(15, 1994)2.5 E(4)535 750 Q EP
+%%Page: 5 5
+%%BeginPageSetup
+BP
+%%EndPageSetup
+/F0 10/Times-Roman@0 SF -.834(EX/VI \( 1 \))72 48 R(BSD Reference Manual)
+258.235 48 Q -.834(EX/VI \( 1 \))496.682 48 R/F1 10/Times-Bold@0 SF
+([count] > motion)102 96 Q F0(Shift lines left or right.)131 108 Q F1 2.5(@b)
+102 120 S(uffer)119.16 120 Q F0(Ex)131 132 Q(ecute a named b)-.15 E(uf)-.2 E
+(fer)-.25 E(.)-.55 E F1([count] A)102 144 Q F0
+(Enter input mode, appending the te)131 156 Q(xt after the end of the line.)
+-.15 E F1([count] B)102 168 Q F0(Mo)131 180 Q .3 -.15(ve b)-.15 H(ackw).15 E
+(ards)-.1 E/F2 10/Courier@0 SF(count)2.5 E F0(bigw)2.5 E(ords.)-.1 E F1([b)102
+192 Q(uffer] [count] C)-.2 E F0(Change te)131 204 Q
+(xt from the current position to the end-of-line.)-.15 E F1([b)102 216 Q
+(uffer] D)-.2 E F0(Delete te)131 228 Q
+(xt from the current position to the end-of-line.)-.15 E F1([count] E)102 240 Q
+F0(Mo)131 252 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>)102 264 Q F0(Search)131
+276 Q F2(count)2.5 E F0(times backw)2.5 E(ard through the current line for)-.1
+E F2(<character>)2.5 E F0(.)A F1([count] G)102 288 Q F0(Mo)131 300 Q .3 -.15
+(ve t)-.15 H 2.5(ol).15 G(ine)169.59 300 Q F2(count)2.5 E F0 2.5(,o)C 2.5(rt)
+224.31 300 S(he last line of the \214le if)232.92 300 Q F2(count)2.5 E F0
+(not speci\214ed.)2.5 E F1([count] H)102 312 Q F0(Mo)131 324 Q .3 -.15(ve t)
+-.15 H 2.5(ot).15 G(he screen line)169.59 324 Q F2(count - 1)2.5 E F0
+(lines belo)2.5 E 2.5(wt)-.25 G(he top of the screen.)334.43 324 Q F1
+([count] I)102 336 Q F0(Enter input mode, inserting the te)131 348 Q
+(xt at the be)-.15 E(ginning of the line.)-.15 E F1([count] J)102 360 Q F0
+(Join lines.)131 372 Q F1([count] L)102 384 Q F0(Mo)131 396 Q .3 -.15(ve t)-.15
+H 2.5(ot).15 G(he screen line)169.59 396 Q 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)102 408 Q F0(Mo)131
+408 Q .3 -.15(ve t)-.15 H 2.5(ot).15 G
+(he screen line in the middle of the screen.)169.59 408 Q F1([count] O)102 420
+Q F0(Enter input mode, appending te)131 432 Q(xt in a ne)-.15 E 2.5(wl)-.25 G
+(ine abo)305.86 432 Q .3 -.15(ve t)-.15 H(he current line.).15 E F1([b)102 444
+Q(uffer] P)-.2 E F0(Insert te)131 456 Q(xt from a b)-.15 E(uf)-.2 E(fer)-.25 E
+(.)-.55 E F1(Q)102 468 Q F0(Exit)131 468 Q/F3 10/Courier-Bold@0 SF(vi)2.5 E F0
+(\(or visual\) mode and switch to)2.5 E F3(ex)2.5 E F0(mode.)2.5 E F1
+([count] R)102 480 Q F0
+(Enter input mode, replacing the characters in the current line.)131 492 Q F1
+([b)102 504 Q(uffer] [count] S)-.2 E F0(Substitute)131 516 Q F2(count)2.5 E F0
+(lines.)2.5 E F1([count] T <character>)102 528 Q F0 2.78(Search backw)131 540 R
+(ards,)-.1 E F2(count)5.28 E F0 2.779
+(times, through the current line for the character)5.28 F/F4 10/Times-Italic@0
+SF(after)5.279 E F0 2.779(the speci\214ed)5.279 F F2(<character>)131 552 Q F0
+(.)A F1(U)102 564 Q F0
+(Restore the current line to its state before the cursor last mo)131 564 Q -.15
+(ve)-.15 G 2.5(dt).15 G 2.5(oi)388.99 564 S(t.)399.27 564 Q F1([count] W)102
+576 Q F0(Mo)131 588 Q .3 -.15(ve f)-.15 H(orw).15 E(ard)-.1 E F2(count)2.5 E F0
+(bigw)2.5 E(ords.)-.1 E F1([b)102 600 Q(uffer] [count] X)-.2 E F0(Delete)131
+612 Q F2(count)2.5 E F0(characters before the cursor)2.5 E(.)-.55 E F1([b)102
+624 Q(uffer] [count] Y)-.2 E F0(Cop)131 636 Q 2.5(y\()-.1 G(or `)158.4 636 Q
+(`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)102 648 Q F0(Write the \214le and e)131 648
+Q(xit)-.15 E F3(vi)2.5 E F0(.)A F1([count] [[)102 660 Q F0(Back up)131 672 Q F2
+(count)2.5 E F0(section boundaries.)2.5 E F1([count] ]])102 684 Q F0 172.465
+(4.4BSD July)72 750 R(15, 1994)2.5 E(5)535 750 Q EP
+%%Page: 6 6
+%%BeginPageSetup
+BP
+%%EndPageSetup
+/F0 10/Times-Roman@0 SF -.834(EX/VI \( 1 \))72 48 R(BSD Reference Manual)
+258.235 48 Q -.834(EX/VI \( 1 \))496.682 48 R(Mo)131 96 Q .3 -.15(ve f)-.15 H
+(orw).15 E(ard)-.1 E/F1 10/Courier@0 SF(count)2.5 E F0(section boundaries.)2.5
+E/F2 10/Times-Bold@0 SF(^)102 108 Q F0(Mo)131 108 Q .3 -.15(ve t)-.15 H 2.5
+<6f8c>.15 G(rst nonblank character on the current line.)172.37 108 Q F2
+([count] _)102 120 Q F0(Mo)131 132 Q .3 -.15(ve d)-.15 H -.25(ow).15 G(n).25 E
+F1(count - 1)2.5 E F0(lines, to the \214rst nonblank character)2.5 E(.)-.55 E
+F2([count] a)102 144 Q F0(Enter input mode, appending the te)131 156 Q
+(xt after the cursor)-.15 E(.)-.55 E F2([count] b)102 168 Q F0(Mo)131 180 Q .3
+-.15(ve b)-.15 H(ackw).15 E(ards)-.1 E F1(count)2.5 E F0 -.1(wo)2.5 G(rds.).1 E
+F2([b)102 192 Q(uffer] [count] c motion)-.2 E F0(Change a re)131 204 Q
+(gion of te)-.15 E(xt.)-.15 E F2([b)102 216 Q(uffer] [count] d motion)-.2 E F0
+(Delete a re)131 228 Q(gion of te)-.15 E(xt.)-.15 E F2([count] e)102 240 Q F0
+(Mo)131 252 Q .3 -.15(ve f)-.15 H(orw).15 E(ard)-.1 E F1(count)2.5 E F0
+(end-of-w)2.5 E(ords.)-.1 E F2([count] f<character>)102 264 Q F0(Search forw)
+131 276 Q(ard,)-.1 E F1(count)2.5 E F0
+(times, through the rest of the current line for)2.5 E F1(<character>)2.5 E F0
+(.)A F2([count] i)102 288 Q F0(Enter input mode, inserting the te)131 300 Q
+(xt before the cursor)-.15 E(.)-.55 E F2 2.5(m<)102 312 S(character>)118.53 312
+Q F0(Sa)131 324 Q .3 -.15(ve t)-.2 H(he current conte).15 E
+(xt \(line and column\) as)-.15 E F1(<character>)2.5 E F0(.)A F2([count] o)102
+336 Q F0(Enter input mode, appending te)131 348 Q(xt in a ne)-.15 E 2.5(wl)-.25
+G(ine under the current line.)305.86 348 Q F2([b)102 360 Q(uffer] p)-.2 E F0
+(Append te)131 372 Q(xt from a b)-.15 E(uf)-.2 E(fer)-.25 E(.)-.55 E F2
+([count] r <character>)102 384 Q F0(Replace)131 396 Q F1(count)2.5 E F0
+(characters.)2.5 E F2([b)102 408 Q(uffer] [count] s)-.2 E F0(Substitute)131 420
+Q F1(count)2.5 E F0
+(characters in the current line starting with the current character)2.5 E(.)
+-.55 E F2([count] t <character>)102 432 Q F0 3.435(Search forw)131 444 R(ard,)
+-.1 E F1(count)5.935 E F0 3.435
+(times, through the current line for the character immediately)5.935 F/F3 10
+/Times-Italic@0 SF(befor)5.935 E(e)-.37 E F1(<character>)131 456 Q F0(.)A F2(u)
+102 468 Q F0(Undo the last change made to the \214le.)131 468 Q F2([count] w)
+102 480 Q F0(Mo)131 492 Q .3 -.15(ve f)-.15 H(orw).15 E(ard)-.1 E F1(count)2.5
+E F0 -.1(wo)2.5 G(rds.).1 E F2([b)102 504 Q(uffer] [count] x)-.2 E F0(Delete)
+131 516 Q F1(count)2.5 E F0(characters.)2.5 E F2([b)102 528 Q
+(uffer] [count] y motion)-.2 E F0(Cop)131 540 Q 2.5(y\()-.1 G(or `)158.4 540 Q
+(`yank')-.74 E('\) a te)-.74 E(xt re)-.15 E(gion speci\214ed by the)-.15 E F1
+(count)2.5 E F0(and motion into a b)2.5 E(uf)-.2 E(fer)-.25 E(.)-.55 E F2
+([count1] z [count2] -|.|+|^|<carriage-r)102 552 Q(etur)-.18 E(n>)-.15 E F0
+(Redra)131 564 Q 1.3 -.65(w, o)-.15 H
+(ptionally repositioning and resizing the screen.).65 E F2([count] {)102 576 Q
+F0(Mo)131 588 Q .3 -.15(ve b)-.15 H(ackw).15 E(ard)-.1 E F1(count)2.5 E F0
+(paragraphs.)2.5 E F2([count] |)102 600 Q F0(Mo)131 612 Q .3 -.15(ve t)-.15 H
+2.5(oas).15 G(peci\214c)177.64 612 Q F3(column)2.5 E F0
+(position on the current line.)2.5 E F2([count] })102 624 Q F0(Mo)131 636 Q .3
+-.15(ve f)-.15 H(orw).15 E(ard)-.1 E F1(count)2.5 E F0(paragraphs.)2.5 E F2
+([count] ~)102 648 Q F0(Re)131 660 Q -.15(ve)-.25 G(rse the case of the ne).15
+E(xt)-.15 E F1(count)2.5 E F0(character\(s\).)2.5 E F2([count] ~ motion)102 672
+Q F0 172.465(4.4BSD July)72 750 R(15, 1994)2.5 E(6)535 750 Q EP
+%%Page: 7 7
+%%BeginPageSetup
+BP
+%%EndPageSetup
+/F0 10/Times-Roman@0 SF -.834(EX/VI \( 1 \))72 48 R(BSD Reference Manual)
+258.235 48 Q -.834(EX/VI \( 1 \))496.682 48 R(Re)131 96 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/F1 10/Courier@0 SF(count)2.5 E F0(and)2.5 E F1
+(motion)2.5 E F0(.)A/F2 10/Times-Bold@0 SF(<interrupt>)102 108 Q F0
+(Interrupt the current operation.)131 120 Q F2 1.666(VI TEXT INPUT COMMANDS)72
+144 R F0(The follo)102 156 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/F3 10
+/Courier-Bold@0 SF(vi)2.5 E F0(editor)2.5 E(.)-.55 E F2(<nul>)102 174 Q F0
+(Replay the pre)131 186 Q(vious input.)-.25 E F2(<contr)102 198 Q(ol-D>)-.18 E
+F0(Erase the pre)131 210 Q(vious autoindent character)-.25 E(.)-.55 E F2
+(^<contr)102 222 Q(ol-D>)-.18 E F0
+(Erase all of the autoindent characters, and reset the autoindent le)131 234 Q
+-.15(ve)-.25 G(l.).15 E F2(0<contr)102 246 Q(ol-D>)-.18 E F0
+(Erase all of the autoindent characters.)131 258 Q F2(<contr)102 270 Q(ol-T>)
+-.18 E F0 .076(Insert suf)131 282 R(\214cient)-.25 E F1(<tab>)2.576 E F0(and)
+2.576 E F1(<space>)2.576 E F0 .076(characters to mo)2.576 F .376 -.15(ve t)-.15
+H .076(he cursor forw).15 F .075(ard to a column immediate-)-.1 F
+(ly after the ne)131 294 Q(xt column which is an e)-.15 E -.15(ve)-.25 G 2.5
+(nm).15 G(ultiple of the)305.7 294 Q F2(shiftwidth)2.5 E F0(option.)2.5 E F2
+(<erase>)102 306 Q(<contr)102 318 Q(ol-H>)-.18 E F0(Erase the last character)
+131 330 Q(.)-.55 E F2(<literal next>)102 342 Q F0(Quote the ne)131 354 Q
+(xt character)-.15 E(.)-.55 E F2(<escape>)102 366 Q F0(Resolv)131 378 Q 2.5(ea)
+-.15 G(ll te)170.01 378 Q
+(xt input into the \214le, and return to command mode.)-.15 E F2(<line erase>)
+102 390 Q F0(Erase the current line.)131 402 Q F2(<contr)102 414 Q(ol-W>)-.18 E
+(<w)102 426 Q(ord erase>)-.1 E F0(Erase the last w)131 438 Q 2.5(ord. The)-.1 F
+(de\214nition of w)2.5 E(ord is dependent on the)-.1 E F2(altwerase)2.5 E F0
+(and)2.5 E F2(ttywerase)2.5 E F0(options.)2.5 E F2(<contr)102 450 Q
+(ol-X>[0-9A-F)-.18 E(a-f])-.25 E/F4 10/Symbol SF(*)A F0
+(Insert a character with the speci\214ed he)131 462 Q(xadecimal v)-.15 E
+(alue into the te)-.25 E(xt.)-.15 E F2(<interrupt>)102 474 Q F0(Interrupt te)
+131 486 Q(xt input mode, returning to command mode.)-.15 E F2 1.666
+(EX COMMANDS)72 510 R F0 .163(The follo)102 522 R .163
+(wing section describes the commands a)-.25 F -.25(va)-.2 G .163(ilable in the)
+.25 F F3(ex)2.663 E F0(editor)2.663 E 5.163(.I)-.55 G 2.663(ne)405.333 522 S
+.164(ach entry belo)417.436 522 R 1.464 -.65(w, t)-.25 H .164(he tag line is)
+.65 F 2.5(au)102 534 S(sage synopsis for the command.)113.94 534 Q F2
+(<end-of-\214le>)102 558 Q F0(Scroll the screen.)131 570 Q F2 2.5(!a)102 582 S
+-.1(rg)112.83 582 S(ument\(s\)).1 E([range]! ar)102 594 Q(gument\(s\))-.1 E F0
+(Ex)131 606 Q
+(ecute a shell command, or \214lter lines through a shell command.)-.15 E F2(")
+102 618 Q F0 2.5(Ac)131 618 S(omment.)145.16 618 Q F2
+([range] nu[mber] [count] [\215ags])102 630 Q([range] # [count] [\215ags])102
+642 Q F0(Display the selected lines, each preceded with its line number)131 654
+Q(.)-.55 E F2 2.5(@b)102 666 S(uffer)119.16 666 Q F4(*)102 678 Q F2 -.2(bu)2.5
+G(ffer).2 E F0 172.465(4.4BSD July)72 750 R(15, 1994)2.5 E(7)535 750 Q EP
+%%Page: 8 8
+%%BeginPageSetup
+BP
+%%EndPageSetup
+/F0 10/Times-Roman@0 SF -.834(EX/VI \( 1 \))72 48 R(BSD Reference Manual)
+258.235 48 Q -.834(EX/VI \( 1 \))496.682 48 R(Ex)131 96 Q(ecute a b)-.15 E(uf)
+-.2 E(fer)-.25 E(.)-.55 E/F1 10/Times-Bold@0 SF([range] d[elete] [b)102 108 Q
+(uffer] [count] [\215ags])-.2 E F0(Delete the lines from the \214le.)131 120 Q
+F1(di[splay] b[uffers] | s[cr)102 132 Q(eens] | t[ags])-.18 E F0(Display b)131
+144 Q(uf)-.2 E(fers, screens or tags.)-.25 E F1(e[dit][!] [+cmd] [\214le])102
+156 Q(ex[!] [+cmd] [\214le])102 168 Q F0(Edit a dif)131 180 Q(ferent \214le.)
+-.25 E F1(exu[sage] [command])102 192 Q F0(Display usage for an)131 204 Q/F2 10
+/Courier-Bold@0 SF(ex)2.5 E F0(command.)2.5 E F1(f[ile] [\214le])102 216 Q F0
+(Display and optionally change the \214le name.)131 228 Q F1(fg [name])102 240
+Q F2(Vi)131 252 Q F0(mode only)2.5 E 5(.F)-.65 G(ore)200.26 252 Q
+(ground the speci\214ed screen.)-.15 E F1([range] g[lobal] /patter)102 264 Q
+(n/ [commands])-.15 E([range] v /patter)102 276 Q(n/ [commands])-.15 E F0
+(Apply commands to lines matching \(or not matching\) a pattern.)131 288 Q F1
+(he[lp])102 300 Q F0(Display a help message.)131 312 Q F1([line] i[nsert][!])
+102 324 Q F0(The input te)131 336 Q
+(xt is inserted before the speci\214ed line.)-.15 E F1
+([range] j[oin][!] [count] [\215ags])102 348 Q F0(Join lines of te)131 360 Q
+(xt together)-.15 E(.)-.55 E F1([range] l[ist] [count] [\215ags])102 372 Q F0
+(Display the lines unambiguously)131 384 Q(.)-.65 E F1(map[!] [lhs rhs])102 396
+Q F0(De\214ne or display maps \(for)131 408 Q F2(vi)2.5 E F0(only\).)2.5 E F1
+([line] ma[rk] <character>)102 420 Q([line] k <character>)102 432 Q F0
+(Mark the line with the mark)131 444 Q/F3 10/Courier@0 SF(<character>)2.5 E F0
+(.)A F1([range] m[o)102 456 Q -.1(ve)-.1 G 2.5(]l).1 G(ine)170.11 456 Q F0(Mo)
+131 468 Q .3 -.15(ve t)-.15 H(he speci\214ed lines after the tar).15 E
+(get line.)-.18 E F1(mk[exr)102 480 Q(c][!] \214le)-.18 E F0(Write the abbre)
+131 492 Q(viations, editor options and maps to the speci\214ed \214le.)-.25 E
+F1(n[ext][!] [\214le ...])102 504 Q F0(Edit the ne)131 516 Q
+(xt \214le from the ar)-.15 E(gument list.)-.18 E F1([line] o[pen] /patter)102
+528 Q(n/ [\215ags])-.15 E F0(Enter open mode.)131 540 Q F1(pr)102 552 Q(e[ser)
+-.18 E -.1(ve)-.1 G(]).1 E F0(Sa)131 564 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 -1.834(ex \255r)2.5 F F0(option.)2.5 E F1(pr)102 576 Q -.15(ev)-.18 G
+([ious][!]).15 E F0(Edit the pre)131 588 Q(vious \214le from the ar)-.25 E
+(gument list.)-.18 E F1([range] p[rint] [count] [\215ags])102 600 Q F0
+(Display the speci\214ed lines.)131 612 Q F1([line] pu[t] [b)102 624 Q(uffer])
+-.2 E F0(Append b)131 636 Q(uf)-.2 E(fer contents to the current line.)-.25 E
+F1(q[uit][!])102 648 Q F0(End the editing session.)131 660 Q F1
+([line] r[ead][!] [\214le])102 672 Q F0 172.465(4.4BSD July)72 750 R(15, 1994)
+2.5 E(8)535 750 Q EP
+%%Page: 9 9
+%%BeginPageSetup
+BP
+%%EndPageSetup
+/F0 10/Times-Roman@0 SF -.834(EX/VI \( 1 \))72 48 R(BSD Reference Manual)
+258.235 48 Q -.834(EX/VI \( 1 \))496.682 48 R(Read a \214le.)131 96 Q/F1 10
+/Times-Bold@0 SF -.18(re)102 108 S(c[o).18 E -.1(ve)-.1 G(r] \214le).1 E F0
+(Reco)131 120 Q -.15(ve)-.15 G(r).15 E/F2 10/Courier@0 SF(file)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)102 132 S(s[ize] [+|-]size).18 E/F3 10/Courier-Bold@0 SF(Vi)131 144 Q F0
+(mode only)2.5 E 5(.G)-.65 G(ro)202.07 144 Q 2.5(wo)-.25 G 2.5(rs)224.87 144 S
+(hrink the current screen.)234.59 144 Q F1 -.18(re)102 156 S(w[ind][!]).18 E F0
+(Re)131 168 Q(wind the ar)-.25 E(gument list.)-.18 E F1(se[t] [option[=[v)102
+180 Q(alue]] ...] [nooption ...] [option? ...] [all])-.1 E F0
+(Display or set editor options.)131 192 Q F1(sh[ell])102 204 Q F0
+(Run a shell program.)131 216 Q F1(so[ur)102 228 Q(ce] \214le)-.18 E F0
+(Read and e)131 240 Q -.15(xe)-.15 G(cute).15 E F3(ex)2.5 E F0
+(commands from a \214le.)2.5 E F1(sp[lit] [\214le ...])102 252 Q F3(Vi)131 264
+Q F0(mode only)2.5 E 5(.S)-.65 G(plit the screen.)200.41 264 Q F1
+([range] s[ubstitute] [/patter)102 276 Q(n/r)-.15 E
+(eplace/] [options] [count] [\215ags])-.18 E
+([range] & [options] [count] [\215ags])102 288 Q
+([range] ~ [options] [count] [\215ags])102 300 Q F0(Mak)131 312 Q 2.5(es)-.1 G
+(ubstitutions.)160.06 312 Q F1(su[spend][!])102 324 Q(st[op][!])102 336 Q
+(<suspend>)102 348 Q F0(Suspend the edit session.)131 360 Q F1
+(ta[g][!] tagstring)102 372 Q F0
+(Edit the \214le containing the speci\214ed tag.)131 384 Q F1
+(tagp[op][!] [\214le | number])102 396 Q F0
+(Pop to the speci\214ed tag in the tags stack.)131 408 Q F1(unm[ap][!] lhs)102
+420 Q F0(Unmap a mapped string.)131 432 Q F1 -.1(ve)102 444 S([rsion]).1 E F0
+(Display the v)131 456 Q(ersion of the)-.15 E F3(ex/vi)2.5 E F0(editor)2.5 E(.)
+-.55 E F1([line] vi[sual] [type] [count] [\215ags])102 468 Q F3(Ex)131 480 Q F0
+(mode only)2.5 E 5(.E)-.65 G(nter)200.96 480 Q F3(vi)2.5 E F0(.)A F1
+(vi[sual][!] [+cmd] [\214le])102 492 Q F3(Vi)131 504 Q F0(mode only)2.5 E 5(.E)
+-.65 G(dit a ne)200.96 504 Q 2.5<778c>-.25 G(le.)245.43 504 Q F1
+(viu[sage] [command])102 516 Q F0(Display usage for a)131 528 Q F3(vi)2.5 E F0
+(command.)2.5 E F1([range] w[rite][!] [>>] [\214le])102 540 Q
+([range] w[rite] [!] [\214le])102 552 Q([range] wn[!] [>>] [\214le])102 564 Q
+([range] wq[!] [>>] [\214le])102 576 Q F0(Write the \214le.)131 588 Q F1
+([range] x[it][!] [\214le])102 600 Q F0
+(Write the \214le if it has been modi\214ed.)131 612 Q F1([range] ya[nk] [b)102
+624 Q(uffer] [count])-.2 E F0(Cop)131 636 Q 2.5(yt)-.1 G
+(he speci\214ed lines to a b)157.85 636 Q(uf)-.2 E(fer)-.25 E(.)-.55 E F1
+([line] z [type] [count] [\215ags])102 648 Q F0(Adjust the windo)131 660 Q -.65
+(w.)-.25 G 172.465(4.4BSD July)72 750 R(15, 1994)2.5 E(9)535 750 Q EP
+%%Page: 10 10
+%%BeginPageSetup
+BP
+%%EndPageSetup
+/F0 10/Times-Roman@0 SF -.834(EX/VI \( 1 \))72 48 R(BSD Reference Manual)
+258.235 48 Q -.834(EX/VI \( 1 \))496.682 48 R/F1 10/Times-Bold@0 SF 1.666
+(SET OPTIONS)72 96 R F0 .519(There are a lar)102 108 R .518
+(ge number of options that may be set \(or unset\) to change the editor')-.18 F
+3.018(sb)-.55 G(eha)453.614 108 Q(vior)-.2 E 5.518(.T)-.55 G .518(his section)
+496.982 108 R(describes the options, their abbre)102 120 Q
+(viations and their def)-.25 E(ault v)-.1 E(alues.)-.25 E .095
+(In each entry belo)102 138 R 1.395 -.65(w, t)-.25 H .095
+(he \214rst part of the tag line is the full name of the option, follo).65 F
+.095(wed by an)-.25 F 2.595(ye)-.15 G(qui)487.915 138 Q -.25(va)-.25 G .095
+(lent ab-).25 F(bre)102 150 Q 3.034(viations. The)-.25 F .534
+(part in square brack)3.034 F .533(ets is the def)-.1 F .533(ault v)-.1 F .533
+(alue of the option.)-.25 F .533(Most of the options are boolean,)5.533 F
+(i.e. the)102 162 Q 2.5(ya)-.15 G(re either on or of)140.73 162 Q
+(f, and do not ha)-.25 E .3 -.15(ve a)-.2 H 2.5(na).15 G(ssociated v)298.14 162
+Q(alue.)-.25 E(Options apply to both)102 180 Q/F2 10/Courier-Bold@0 SF(ex)2.5 E
+F0(and)2.5 E F2(vi)2.5 E F0(modes, unless otherwise speci\214ed.)2.5 E F1
+(altwerase [off])102 204 Q F2(Vi)131 216 Q F0(only)2.5 E 5(.S)-.65 G
+(elect an alternate w)175.69 216 Q(ord erase algorithm.)-.1 E F1
+(autoindent, ai [off])102 228 Q F0(Automatically indent ne)131 240 Q 2.5(wl)
+-.25 G(ines.)239.91 240 Q F1(autoprint, ap [off])102 252 Q F2(Ex)131 264 Q F0
+(only)2.5 E 5(.D)-.65 G(isplay the current line automatically)177.35 264 Q(.)
+-.65 E F1(auto)102 276 Q(write, aw [off])-.1 E F0
+(Write modi\214ed \214les automatically when changing \214les.)131 288 Q F1
+(beautify)102 300 Q 2.5(,b)-.55 G 2.5(f[)147.01 300 S(off])156.17 300 Q F0
+(Discard control characters.)131 312 Q F1(cdpath [en)102 324 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)131 336 Q
+(es for the)-.15 E F1(cd)2.5 E F0(command.)2.5 E F1(columns, co [80])102 348 Q
+F0(Set the number of columns in the screen.)131 360 Q F1(comment [off])102 372
+Q F2(Vi)131 384 Q F0(only)2.5 E 5(.S)-.65 G(kip leading comments in \214les.)
+175.69 384 Q F1(dir)102 396 Q(ectory)-.18 E 2.5(,d)-.55 G(ir [en)151.26 396 Q
+(vir)-.4 E(onment v)-.18 E(ariable TMPDIR, or /tmp])-.1 E F0
+(The directory where temporary \214les are created.)131 408 Q F1
+(edcompatible, ed [off])102 420 Q F0 .279(Remember the v)131 432 R .279
+(alues of the `)-.25 F(`c')-.74 E 2.779('a)-.74 G .279(nd `)270.344 432 R(`g')
+-.74 E 2.779('s)-.74 G(uf)306.632 432 Q .279(\214ces to the)-.25 F F1
+(substitute)2.78 E F0 .28(commands, instead of initializing)2.78 F
+(them as unset for each ne)131 444 Q 2.5(wc)-.25 G(ommand.)246.27 444 Q F1(err)
+102 456 Q(orbells, eb [off])-.18 E F2(Ex)131 468 Q F0(only)2.5 E 5(.A)-.65 G
+(nnounce error messages with a bell.)177.35 468 Q F1(exr)102 480 Q(c, ex [off])
+-.18 E F0(Ne)131 492 Q -.15(ve)-.25 G 2.5(rr).15 G
+(ead startup \214les in the local directory)160.86 492 Q(.)-.65 E F1
+(extended [off])102 504 Q F0(Re)131 516 Q(gular e)-.15 E(xpressions are e)-.15
+E(xtended \(i.e.)-.15 E/F3 10/Courier@0 SF(egrep)5 E F0(\(1\) style\) e)A
+(xpressions.)-.15 E F1(\215ash [on])102 528 Q F0
+(Flash the screen instead of beeping the k)131 540 Q -.15(ey)-.1 G
+(board on error).15 E(.)-.55 E F1(hardtabs, ht [8])102 552 Q F0
+(Set the spacing between hardw)131 564 Q(are tab settings.)-.1 E F1(ignor)102
+576 Q(ecase, ic [off])-.18 E F0(Ignore case dif)131 588 Q(ferences in re)-.25 E
+(gular e)-.15 E(xpressions.)-.15 E F1 -.1(ke)102 600 S(ytime [6]).1 E F0
+(The 10th')131 612 Q 2.5(so)-.55 G 2.5(fas)181 612 S(econd)197.66 612 Q F2
+(ex/vi)2.5 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)379.5 612 Q .3 -.15(ey m)-.1 H(apping.).15 E F1
+(leftright [off])102 624 Q F2(Vi)131 636 Q F0(only)2.5 E 5(.D)-.65 G 2.5(ol)
+177.35 636 S(eft-right scrolling.)187.63 636 Q F1(lines, li [24])102 648 Q F2
+(Vi)131 660 Q F0(only)2.5 E 5(.S)-.65 G(et the number of lines in the screen.)
+175.69 660 Q F1(lisp [off])102 672 Q F2(Vi)131 684 Q F0(only)2.5 E 5(.M)-.65 G
+(odify v)179.02 684 Q(arious search commands and options to w)-.25 E
+(ork with Lisp.)-.1 E 172.465(4.4BSD July)72 750 R(15, 1994)2.5 E(10)530 750 Q
+EP
+%%Page: 11 11
+%%BeginPageSetup
+BP
+%%EndPageSetup
+/F0 10/Times-Roman@0 SF -.834(EX/VI \( 1 \))72 48 R(BSD Reference Manual)
+258.235 48 Q -.834(EX/VI \( 1 \))496.682 48 R/F1 10/Times-Italic@0 SF
+(This option is not yet implemented.)131 96 Q/F2 10/Times-Bold@0 SF(list [off])
+102 108 Q F0(Display lines in an unambiguous f)131 120 Q(ashion.)-.1 E F2
+(magic [on])102 132 Q F0 -.35(Tr)131 144 S
+(eat certain characters specially in re).35 E(gular e)-.15 E(xpressions.)-.15 E
+F2(matchtime [7])102 156 Q/F3 10/Courier-Bold@0 SF(Vi)131 168 Q F0(only)2.885 E
+5.385(.T)-.65 G .385(he 10th')177.01 168 R 2.885(so)-.55 G 2.885(fas)221.67 168
+S(econd)239.1 168 Q F3(ex/vi)2.884 E F0 .384
+(pauses on the matching character when the)2.884 F F2(sho)2.884 E(wmatch)-.1 E
+F0(op-)2.884 E(tion is set.)131 180 Q F2(mesg [on])102 192 Q F0
+(Permit messages from other users.)131 204 Q F2(modelines, modeline [off])102
+216 Q F0(Read the \214rst and last fe)131 228 Q 2.5(wl)-.25 G
+(ines of each \214le for)240.18 228 Q F3(ex)2.5 E F0(commands.)2.5 E F1
+(This option will ne)131 246 Q(ver be implemented.)-.15 E F2(number)102 258 Q
+2.5(,n)-.92 G 2.5(u[)145.53 258 S(off])156.92 258 Q F0
+(Precede each line displayed with its current line number)131 270 Q(.)-.55 E F2
+(octal [off])102 282 Q F0(Display unkno)131 294 Q
+(wn characters as octal numbers, instead of the def)-.25 E(ault he)-.1 E
+(xadecimal.)-.15 E F2(open [on])102 306 Q F3(Ex)131 318 Q F0(only)2.5 E 5(.I)
+-.65 G 2.5(ft)173.46 318 S(his option is not set, the)182.07 318 Q F2(open)2.5
+E F0(and)2.5 E F2(visual)2.5 E F0(commands are disallo)2.5 E(wed.)-.25 E F2
+(optimize, opt [on])102 330 Q F3(Vi)131 342 Q F0(only)2.5 E 5(.O)-.65 G
+(ptimize te)177.35 342 Q(xt throughput to dumb terminals.)-.15 E F1
+(This option is not yet implemented.)131 360 Q F2
+(paragraphs, para [IPLPPPQPP LIpplpipbp])102 372 Q F3(Vi)131 384 Q F0(only)2.5
+E 5(.D)-.65 G(e\214ne additional paragraph boundaries for the)177.35 384 Q F2
+({)2.5 E F0(and)2.5 E F2(})2.5 E F0(commands.)2.5 E F2(pr)102 396 Q(ompt [on])
+-.18 E F3(Ex)131 408 Q F0(only)2.5 E 5(.D)-.65 G(isplay a command prompt.)
+177.35 408 Q F2 -.18(re)102 420 S(adonly).18 E 2.5(,r)-.55 G 2.5(o[)148.31 420
+S(off])159.14 420 Q F0(Mark the \214le as read-only)131 432 Q(.)-.65 E F2 -.18
+(re)102 444 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)131 456 Q -.15(ve)-.15 G(ry \214les are stored.).15
+E F2 -.18(re)102 468 S(draw).18 E 2.5(,r)-.55 G 2.5(e[)141.63 468 S(off])151.9
+468 Q F3(Vi)131 480 Q F0(only)2.5 E 5(.S)-.65 G
+(imulate an intelligent terminal on a dumb one.)175.69 480 Q F1
+(This option is not yet implemented.)131 498 Q F2 -.18(re)102 510 S(map [on])
+.18 E F0(Remap k)131 522 Q -.15(ey)-.1 G 2.5(su).15 G(ntil resolv)187.41 522 Q
+(ed.)-.15 E F2 -.18(re)102 534 S(port [5]).18 E F0
+(Set the number of lines about which the editor reports changes or yanks.)131
+546 Q F2(ruler [off])102 558 Q F3(Vi)131 570 Q F0(only)2.5 E 5(.D)-.65 G
+(isplay a ro)177.35 570 Q(w/column ruler on the colon command line.)-.25 E F2
+(scr)102 582 Q(oll, scr [windo)-.18 E 2.5(w/2)-.1 G(])194.77 582 Q F0
+(Set the number of lines scrolled.)131 594 Q F2(sections, sect [NHSHH HUnhsh])
+102 606 Q F3(Vi)131 618 Q F0(only)2.5 E 5(.D)-.65 G
+(e\214ne additional section boundaries for the)177.35 618 Q F2([[)2.5 E F0(and)
+2.5 E F2(]])2.5 E F0(commands.)2.5 E F2(shell, sh [en)102 630 Q(vir)-.4 E
+(onment v)-.18 E(ariable SHELL, or /bin/sh])-.1 E F0
+(Select the shell used by the editor)131 642 Q(.)-.55 E F2(shiftwidth, sw [8])
+102 654 Q F0(Set the autoindent and shift command indentation width.)131 666 Q
+F2(sho)102 678 Q(wdirty [off])-.1 E F0 172.465(4.4BSD July)72 750 R(15, 1994)
+2.5 E(11)530 750 Q EP
+%%Page: 12 12
+%%BeginPageSetup
+BP
+%%EndPageSetup
+/F0 10/Times-Roman@0 SF -.834(EX/VI \( 1 \))72 48 R(BSD Reference Manual)
+258.235 48 Q -.834(EX/VI \( 1 \))496.682 48 R/F1 10/Courier-Bold@0 SF(Vi)131 96
+Q F0(only)2.5 E 5(.D)-.65 G(isplay an asterisk on the colon command line if th\
+e \214le has been modi\214ed.)177.35 96 Q/F2 10/Times-Bold@0 SF(sho)102 108 Q
+(wmatch, sm [off])-.1 E F1(Vi)131 120 Q F0(only)2.5 E 5(.N)-.65 G
+(ote matching `)177.35 120 Q(`{')-.74 E 2.5('a)-.74 G(nd `)255.37 120 Q(`\(')
+-.74 E 2.5('f)-.74 G(or `)288.87 120 Q(`}')-.74 E 2.5('a)-.74 G(nd `)323.28 120
+Q(`\)')-.74 E 2.5('c)-.74 G(haracters.)357.89 120 Q F2(sho)102 132 Q
+(wmode [off])-.1 E F1(Vi)131 144 Q F0(only)2.5 E 5(.D)-.65 G
+(isplay the current editor mode \(command or input\).)177.35 144 Q F2(sidescr)
+102 156 Q(oll [16])-.18 E F1(Vi)131 168 Q F0(only)2.5 E 5(.S)-.65 G
+(et the amount a left-right scroll will shift.)175.69 168 Q F2(slo)102 180 Q
+-.1(wo)-.1 G(pen, slo).1 E 2.5(w[)-.1 G(off])170.87 180 Q F0
+(Delay display updating during te)131 192 Q(xt input.)-.15 E/F3 10
+/Times-Italic@0 SF(This option is not yet implemented.)131 210 Q F2(sour)102
+222 Q(ceany [off])-.18 E F0(Read startup \214les not o)131 234 Q
+(wned by the current user)-.25 E(.)-.55 E F3(This option will ne)131 252 Q
+(ver be implemented.)-.15 E F2(tabstop, ts [8])102 264 Q F0
+(This option sets tab widths for the editor display)131 276 Q(.)-.65 E F2
+(taglength, tl [0])102 288 Q F0
+(Set the number of signi\214cant characters in tag names.)131 300 Q F2
+(tags, tag [tags /v)102 312 Q(ar/db/libc.tags /sys/k)-.1 E(er)-.1 E(n/tags])
+-.15 E F0(Set the list of tags \214les.)131 324 Q F2(term, ttytype, tty [en)102
+336 Q(vir)-.4 E(onment v)-.18 E(ariable TERM])-.1 E F0(Set the terminal type.)
+131 348 Q F2(terse [off])102 360 Q F0 .759
+(This option has historically made editor messages less v)131 372 R 3.259
+(erbose. It)-.15 F .76(has no ef)3.259 F .76(fect in this implementa-)-.25 F
+(tion.)131 384 Q F2(tildeop)102 396 Q F0(Modify the)131 408 Q F2(~)2.5 E F0
+(command to tak)2.5 E 2.5(ea)-.1 G 2.5(na)259.77 408 S(ssociated motion.)271.71
+408 Q F2(timeout, to [on])102 420 Q F0 -.35(Ti)131 432 S(me out on k).35 E -.15
+(ey)-.1 G 2.5(sw).15 G(hich may be mapped.)209.84 432 Q F2(ttywerase [off])102
+444 Q F1(Vi)131 456 Q F0(only)2.5 E 5(.S)-.65 G
+(elect an alternate erase algorithm.)175.69 456 Q F2 -.1(ve)102 468 S
+(rbose [off]).1 E F0(only)131 480 Q 5(.D)-.65 G(isplay an error message for e)
+162.85 480 Q -.15(ve)-.25 G(ry error).15 E(.)-.55 E F2(w300 [no default])102
+492 Q F1(Vi)131 504 Q F0(only)2.5 E 5(.S)-.65 G(et the windo)175.69 504 Q 2.5
+(ws)-.25 G(ize if the baud rate is less than 1200 baud.)238.49 504 Q F2
+(w1200 [no default])102 516 Q F1(Vi)131 528 Q F0(only)2.5 E 5(.S)-.65 G
+(et the windo)175.69 528 Q 2.5(ws)-.25 G
+(ize if the baud rate is equal to 1200 baud.)238.49 528 Q F2
+(w9600 [no default])102 540 Q F1(Vi)131 552 Q F0(only)2.5 E 5(.S)-.65 G
+(et the windo)175.69 552 Q 2.5(ws)-.25 G
+(ize if the baud rate is greater than 1200 baud.)238.49 552 Q F2(war)102 564 Q
+2.5(n[)-.15 G(on])129.9 564 Q F1(Ex)131 576 Q F0(only)2.979 E 5.479(.T)-.65 G
+.479(his option causes a w)177.198 576 R .479
+(arning message to the terminal if the \214le has been modi\214ed, since it)-.1
+F -.1(wa)131 588 S 2.5(sl).1 G(ast written, before a)151.73 588 Q F2(!)2.5 E F0
+(command.)2.5 E F2(windo)102 600 Q 1.1 -.55(w, w, w)-.1 H 2.5(i[).55 G(en)
+167.19 600 Q(vir)-.4 E(onment v)-.18 E(ariable LINES])-.1 E F0(Set the windo)
+131 612 Q 2.5(ws)-.25 G(ize for the screen.)199.36 612 Q F2(wrapmar)102 624 Q
+(gin, wm [0])-.1 E F1(Vi)131 636 Q F0(only)2.5 E 5(.B)-.65 G
+(reak lines automatically when the)176.8 636 Q 2.5(yr)-.15 G
+(each the right-hand mar)321.9 636 Q(gin.)-.18 E F2(wrapscan, ws [on])102 648 Q
+F0(Set searches to wrap around the end or be)131 660 Q(ginning of the \214le.)
+-.15 E F2(writeany)102 672 Q 2.5(,w)-.55 G 2.5(a[)151.44 672 S(off])162.27 672
+Q F0 -.45(Tu)131 684 S(rn of).45 E 2.5<668c>-.25 G(le-o)171.96 684 Q -.15(ve)
+-.15 G(rwriting checks.).15 E 172.465(4.4BSD July)72 750 R(15, 1994)2.5 E(12)
+530 750 Q EP
+%%Page: 13 13
+%%BeginPageSetup
+BP
+%%EndPageSetup
+/F0 10/Times-Roman@0 SF -.834(EX/VI \( 1 \))72 48 R(BSD Reference Manual)
+258.235 48 Q -.834(EX/VI \( 1 \))496.682 48 R/F1 10/Times-Bold@0 SF(ENVIR)72 96
+Q(ONMENT)-.3 E 1.666(AL V)-.9 F(ARIABLES)-1.35 E/F2 10/Courier@0 SF(COLUMNS)102
+108 Q F0 .895(The number of columns on the screen.)161 108 R .896(This v)5.896
+F .896(alue o)-.25 F -.15(ve)-.15 G .896(rrides an).15 F 3.396(ys)-.15 G .896
+(ystem or terminal speci\214c)433.712 108 R -.25(va)161 120 S 5.317(lues. If)
+.25 F 2.816(the COLUMNS en)5.317 F 2.816(vironmental v)-.4 F 2.816
+(ariable is not set when)-.25 F/F3 10/Courier-Bold@0 SF(ex/vi)5.316 E F0 2.816
+(runs, or the)5.316 F F1(columns)161 132 Q F0(option is e)2.5 E
+(xplicitly reset by the user)-.15 E(,)-.4 E F3(ex/vi)2.5 E F0(enters the v)2.5
+E(alue into the en)-.25 E(vironment.)-.4 E F2(EXINIT)102 144 Q F0 2.5(Al)161
+144 S(ist of)173.5 144 Q F3(ex)2.5 E F0(startup commands, read if the v)2.5 E
+(ariable)-.25 E F2(NEXINIT)2.5 E F0(is not set.)2.5 E F2(HOME)102 156 Q F0 .677
+(The user')161 156 R 3.177(sh)-.55 G .677(ome directory)211.234 156 R 3.177(,u)
+-.65 G .678(sed as the initial directory path for the startup)277.758 156 R F2
+($HOME/.nexrc)3.178 E F0(and)161 168 Q F2($HOME/.exrc)2.865 E F0 2.865
+(\214les. This)2.865 F -.25(va)2.865 G .365(lue is also used as the def).25 F
+.365(ault directory for the)-.1 F F3(vi)2.865 E F1(cd)2.865 E F0(com-)2.865 E
+(mand.)161 180 Q F2(LINES)102 192 Q F0 .629(The number of ro)161 192 R .629
+(ws on the screen.)-.25 F .629(This v)5.629 F .629(alue o)-.25 F -.15(ve)-.15 G
+.629(rrides an).15 F 3.13(ys)-.15 G .63(ystem or terminal speci\214c v)416.08
+192 R(al-)-.25 E 3.123(ues. If)161 204 R .623(the LINES en)3.123 F .623
+(vironmental v)-.4 F .623(ariable is not set when)-.25 F F3(ex/vi)3.122 E F0
+.622(runs, or the)3.122 F F1(lines)3.122 E F0 .622(option is)3.122 F -.15(ex)
+161 216 S(plicitly reset by the user).15 E(,)-.4 E F3(ex/vi)2.5 E F0
+(enters the v)2.5 E(alue into the en)-.25 E(vironment.)-.4 E F2(NEXINIT)102 228
+Q F0 2.5(Al)161 228 S(ist of)173.5 228 Q F3(ex)2.5 E F0(startup commands.)2.5 E
+F2(SHELL)102 240 Q F0(The user')161 240 Q 2.5(ss)-.55 G
+(hell of choice \(see also the)208.77 240 Q F1(shell)2.5 E F0(option\).)2.5 E
+F2(TERM)102 252 Q F0 1.338(The user')161 252 R 3.838(st)-.55 G 1.338
+(erminal type.)210.336 252 R 1.338(The def)6.338 F 1.338(ault is the type `)-.1
+F(`unkno)-.74 E(wn')-.25 E 1.339('. If the TERM en)-.74 F(vironmental)-.4 E
+-.25(va)161 264 S .106(riable is not set when).25 F F3(ex/vi)2.606 E F0 .105
+(runs, or the)2.605 F F1(term)2.605 E F0 .105(option is e)2.605 F .105
+(xplicitly reset by the user)-.15 F(,)-.4 E F3(ex/vi)2.605 E F0(enters the v)
+161 276 Q(alue into the en)-.25 E(vironment.)-.4 E F2(TMPDIR)102 288 Q F0
+(The location used to stored temporary \214les \(see also the)161 288 Q F1(dir)
+2.5 E(ectory)-.18 E F0(option\).)2.5 E F1(ASYNCHR)72 312 Q 1.666(ONOUS EVENTS)
+-.3 F F0(SIGALRM)102 324 Q F3(Vi/ex)167 324 Q F0 1.58(uses this signal for per\
+iodic backups of \214le modi\214cations and to display `)4.08 F(`b)-.74 E(usy')
+-.2 E(')-.74 E(messages when operations are lik)167 336 Q(ely to tak)-.1 E 2.5
+(eal)-.1 G(ong time.)354.54 336 Q(SIGHUP)102 348 Q 18.61(SIGTERM If)102 360 R
+.12(the current b)2.62 F(uf)-.2 E .12(fer has changed since it w)-.25 F .12
+(as last written in its entirety)-.1 F 2.62(,t)-.65 G .12
+(he editor attempts to)457.7 360 R(sa)167 372 Q .493 -.15(ve t)-.2 H .193
+(he modi\214ed \214le so it can be later reco).15 F -.15(ve)-.15 G 2.693
+(red. See).15 F(the)2.694 E F3(vi/ex)2.694 E F0 .194(Reference manual section)
+2.694 F(entitled `)167 384 Q(`Reco)-.74 E -.15(ve)-.15 G(ry').15 E 2.5('f)-.74
+G(or more information.)255.19 384 Q 29.73(SIGINT When)102 396 R .594(an interr\
+upt occurs, the current operation is halted, and the editor returns to the com\
+-)3.094 F .364(mand le)167 408 R -.15(ve)-.25 G 2.864(l. If).15 F .364
+(interrupted during te)2.864 F .364(xt input, the te)-.15 F .364
+(xt already input is resolv)-.15 F .365(ed into the \214le as)-.15 F(if the te)
+167 420 Q(xt input had been normally terminated.)-.15 E 12.51(SIGWINCH The)102
+432 R 2.772(screen is resized.)5.272 F 2.772(See the)7.772 F F3(vi/ex)5.272 E
+F0 2.771(Reference manual section entitled `)5.272 F 2.771(`Sizing the)-.74 F
+(Screen')167 444 Q 2.5('f)-.74 G(or more information.)205.96 444 Q(SIGCONT)102
+456 Q(SIGQ)102 468 Q(UIT)-.1 E(SIGTSTP)102 480 Q F3(Vi/ex)167 480 Q F0
+(ignores these signals.)2.5 E F1 -.1(BU)72 504 S(GS).1 E F0(See the \214le)102
+516 Q F2(nvi/docs/bugs.current)2.5 E F0(for a list of the kno)2.5 E(wn b)-.25 E
+(ugs in this v)-.2 E(ersion.)-.15 E F1(FILES)72 540 Q F2(/bin/sh)102 552 Q F0
+(The def)221 552 Q(ault user shell.)-.1 E F2(/etc/vi.exrc)102 564 Q F0
+(System-wide vi startup \214le.)221 564 Q F2(/tmp)102 576 Q F0 -.7(Te)221 576 S
+(mporary \214le directory).7 E(.)-.65 E F2(/var/tmp/vi.recover)102 588 Q F0
+(The def)5 E(ault reco)-.1 E -.15(ve)-.15 G(ry \214le directory).15 E(.)-.65 E
+F2($HOME/.nexrc)102 600 Q F0(1st choice for user')221 600 Q 2.5(sh)-.55 G
+(ome directory startup \214le.)308.76 600 Q F2($HOME/.exrc)102 612 Q F0
+(2nd choice for user')221 612 Q 2.5(sh)-.55 G(ome directory startup \214le.)
+312.09 612 Q F2(.nexrc)102 624 Q F0
+(1st choice for local directory startup \214le.)221 624 Q F2(.exrc)102 636 Q F0
+(2nd choice for local directory startup \214le.)221 636 Q F1 1.666(SEE ALSO)72
+660 R F2(ctags)102 672 Q F0(\(1\),)A F2(more)5 E F0(\(1\),)A F2(curses)5 E F0
+(\(3\),)A F2(dbopen)5 E F0(\(3\))A(The `)102 696 Q(`V)-.74 E 2.5(iQ)-.6 G
+(uick Reference')145.09 696 Q 2.5('c)-.74 G(ard.)218.2 696 Q 172.465
+(4.4BSD July)72 750 R(15, 1994)2.5 E(13)530 750 Q EP
+%%Page: 14 14
+%%BeginPageSetup
+BP
+%%EndPageSetup
+/F0 10/Times-Roman@0 SF -.834(EX/VI \( 1 \))72 48 R(BSD Reference Manual)
+258.235 48 Q -.834(EX/VI \( 1 \))496.682 48 R -.74(``)102 96 S
+(An Introduction to Display Editing with V).74 E(i')-.6 E(', found in the `)
+-.74 E(`UNIX User')-.74 E 2.5(sM)-.55 G(anual Supplementary)412.2 96 Q
+(Documents')102 108 Q 2.5('s)-.74 G
+(ection of both the 4.3BSD and 4.4BSD manual sets.)159.86 108 Q
+(This document is the closest thing a)5 E -.25(va)-.2 G(il-).25 E
+(able to an introduction to the)102 120 Q/F1 10/Courier-Bold@0 SF(vi)2.5 E F0
+(screen editor)2.5 E(.)-.55 E -.74(``)102 144 S(Ex Reference Manual \(V).74 E
+(ersion 3.7\)')-1.11 E(', found in the `)-.74 E(`UNIX User')-.74 E 2.5(sM)-.55
+G(anual Supplementary Documents')381.92 144 Q 2.5('s)-.74 G(ec-)526.99 144 Q
+(tion of both the 4.3BSD and 4.4BSD manual sets.)102 156 Q
+(This document is the \214nal reference for the)5 E F1(ex)2.5 E F0(editor)2.5 E
+2.5(,a)-.4 G(s)528 156 Q(distrib)102 168 Q
+(uted in most historic 4BSD and System V systems.)-.2 E -.74(``)102 192 S
+(Edit: A tutorial').74 E(', found in the `)-.74 E(`UNIX User')-.74 E 2.5(sM)
+-.55 G(anual Supplementary Documents')300.58 192 Q 2.5('s)-.74 G
+(ection of the 4.3BSD)445.65 192 Q(manual set.)102 204 Q
+(This document is an introduction to a simple v)5 E(ersion of the)-.15 E F1(ex)
+2.5 E F0(screen editor)2.5 E(.)-.55 E -.74(``)102 228 S(Ex/V).74 E 2.5(iR)-.6 G
+(eference Manual')140.38 228 Q(', found in the `)-.74 E(`UNIX User')-.74 E 2.5
+(sM)-.55 G(anual Supplementary Documents')339.39 228 Q 2.5('s)-.74 G
+(ection of the)484.46 228 Q(4.4BSD manual set.)102 240 Q
+(This document is the \214nal reference for the)5 E F1(nex/nvi)2.5 E F0(te)2.5
+E(xt editors, as distrib)-.15 E(uted in)-.2 E(4.4BSD and 4.4BSD-Lite.)102 252 Q
+F1(Roff)102 270 Q F0(source for all of these documents is distrib)2.5 E
+(uted with)-.2 E F1(nex/nvi)2.5 E F0(in the)2.5 E/F2 10/Courier@0 SF
+(nvi/USD.doc)2.5 E F0(directory of the)2.5 E F1(nex/nvi)102 282 Q F0
+(source code.)2.5 E(The \214les `)102 306 Q(`auto)-.74 E(write')-.25 E(', `)
+-.74 E(`input')-.74 E(', `)-.74 E(`quoting')-.74 E(', and `)-.74 E
+(`structures')-.74 E(', found in the)-.74 E F2(nvi/docs/internals)2.5 E F0
+(direc-)2.5 E(tory of the)102 318 Q F1(nex/nvi)2.5 E F0(source code.)2.5 E/F3
+10/Times-Bold@0 SF(HIST)72 342 Q(OR)-.18 E(Y)-.35 E F0(The)102 354 Q F1
+(nex/nvi)2.5 E F0(replacements for the)2.5 E F1(ex/vi)2.5 E F0
+(editor \214rst appeared in 4.4BSD.)2.5 E F3(ST)72 378 Q(AND)-.9 E(ARDS)-.35 E
+F1(Nex/nvi)102 390 Q F0 .1(is close to IEEE Std1003.2 \(`)2.6 F(`POSIX')-.74 E
+2.6('\). That)-.74 F .1(document dif)2.6 F .1(fers from historical)-.25 F F1
+(ex/vi)2.6 E F0 .1(practice in)2.6 F(se)102 402 Q -.15(ve)-.25 G
+(ral places; there are changes to be made on both sides.).15 E 172.465
+(4.4BSD July)72 750 R(15, 1994)2.5 E(14)530 750 Q EP
+%%Trailer
+end
+%%EOF
diff --git a/usr.bin/vi/USD.doc/vi.man/vi.1 b/usr.bin/vi/USD.doc/vi.man/vi.1
new file mode 100644
index 000000000000..25f2a2ce0f3b
--- /dev/null
+++ b/usr.bin/vi/USD.doc/vi.man/vi.1
@@ -0,0 +1,1294 @@
+.\" Copyright (c) 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.
+.\"
+.\" @(#)vi.1 8.12 (Berkeley) 7/15/94
+.\"
+.Dd "July 15, 1994"
+.Dt EX/VI 1
+.Os
+.Sh NAME
+.Nm ex, vi, view
+.Nd text editors
+.Sh SYNOPSIS
+.Nm \&ex
+.Op Fl eFRrsv
+.Op Fl c Ar cmd
+.Op Fl t Ar tag
+.Op Fl w Ar size
+.\".Op Fl X Ar \&aw
+.Op Ar "file ..."
+.Nm \&vi
+.Op Fl eFRrv
+.Op Fl c Ar cmd
+.Op Fl t Ar tag
+.Op Fl w Ar size
+.\".Op Fl X Ar \&aw
+.Op Ar "file ..."
+.Nm view
+.Op Fl eFRrv
+.Op Fl c Ar cmd
+.Op Fl t Ar tag
+.Op Fl w Ar size
+.\".Op Fl X Ar \&aw
+.Op Ar "file ..."
+.Sh DESCRIPTION
+.Nm \&Vi
+is a screen oriented text editor.
+.Nm \&Ex
+is a line-oriented text editor.
+.Nm \&Ex
+and
+.Nm \&vi
+are different interfaces to the same program,
+and it is possible to switch back and forth during an edit session.
+.Nm View
+is the equivalent of using the
+.Fl R
+(read-only) option of
+.Nm \&vi .
+.Pp
+This manual page is the one provided with the
+.Nm nex/nvi
+versions of the
+.Nm ex/vi
+text editors.
+.Nm Nex/nvi
+are intended as bug-for-bug compatible replacements for the original
+Fourth Berkeley Software Distribution (4BSD)
+.Nm \&ex
+and
+.Nm \&vi
+programs.
+For the rest of this manual page,
+.Nm nex/nvi
+is used only when it's necessary to distinguish it from the historic
+implementations of
+.Nm ex/vi .
+.Pp
+This manual page is intended for users already familiar with
+.Nm ex/vi .
+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
+.Dq "Fast Startup" .
+It's probably enough to get you going.
+.Pp
+The following options are available:
+.Bl -tag -width Ds
+.It Fl c
+Execute
+.Ar cmd
+immediately after starting the edit session.
+Particularly useful for initial positioning in the file, however
+.Ar cmd
+is not limited to positioning commands.
+This is the POSIX 1003.2 interface for the historic
+.Dq "+cmd"
+syntax.
+.Nm Nex/nvi
+supports both the old and new syntax.
+.It Fl e
+Start editing in ex mode, as if the command name were
+.Nm \&ex .
+.It Fl F
+Don't copy the entire file when first starting to edit.
+(The default is to make a copy in case someone else modifies
+the file during your edit session.)
+.It Fl R
+Start editing in read-only mode, as if the command name was
+.Nm view ,
+or the readonly option was set.
+.It Fl r
+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
+.Fl r
+option had not been specified.
+.It Fl s
+Enter batch mode; applicable only to
+.Nm \&ex
+edit sessions.
+Batch mode is useful when running
+.Nm \&ex
+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
+.Dq \&\-
+argument.
+.Nm \&Nex/nvi
+supports both the old and new syntax.
+.It Fl t
+Start editing at the specified tag.
+(See
+.Xr ctags 1 ).
+.It Fl w
+Set the initial window size to the specified number of lines.
+.It Fl v
+Start editing in vi mode, as if the command name was
+.Nm \&vi
+or
+.Nm view .
+.It Fl X
+Reserved for X11 interfaces.
+.Em "No X11 support is currently implemented."
+.El
+.Pp
+Command input for
+.Nm ex/vi
+is read from the standard input.
+In the
+.Nm \&vi
+interface, it is an error if standard input is not a terminal.
+In the
+.Nm \&ex
+interface, if standard input is not a terminal,
+.Nm \&ex
+will read commands from it regardless, however, the session will be a
+batch mode session, exactly as if the
+.Fl s
+option had been specified.
+.Pp
+.Nm Ex/vi
+exits 0 on success, and greater than 0 if an error occurs.
+.Sh FAST STARTUP
+This section will tell you the minimum amount that you need to
+do simple editing tasks using
+.Nm \&vi .
+If you've never used any screen editor before, you're likely to have
+problems even with this simple introduction.
+In that case you should find someone that already knows
+.Nm \&vi
+and have them walk you through this section.
+.Pp
+.Nm \&Vi
+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
+.Nm \&vi ,
+and for
+.Nm \&vi
+to give information to you.
+.Pp
+The other fact that you need to understand is that
+.Nm \&vi
+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 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
+.Dq escape
+key, usually labeled
+.Dq esc
+on your terminal's keyboard.)
+If you're ever confused as to which mode you're in,
+keep entering the <escape> key until
+.Nm \&vi
+beeps at you.
+(Generally,
+.Nm \&vi
+will beep at you if you try and do something that's not allowed.
+It will also display error messages.)
+.Pp
+To start editing a file, enter the command
+.Dq Li "vi file_name<carriage-return>" .
+The command you should enter as soon as you start editing is
+.Dq Li ":set verbose showmode<carriage-return>" .
+This will make the editor give you verbose error messages and display
+the current mode at the bottom of the screen.
+.Pp
+The commands to move around the file are:
+.Bl -tag -width XXXX -compact
+.It Sy h
+Move the cursor left one character.
+.It Sy j
+Move the cursor down one line.
+.It Sy k
+Move the cursor up one line.
+.It Sy l
+Move the cursor right one character.
+.It Sy <cursor-arrows>
+The cursor arrow keys should work, too.
+.It Sy /text<carriage-return>
+Search for the string
+.Dq text
+in the file, and move the cursor to its first character.
+.El
+.Pp
+The commands to enter new text are:
+.Bl -tag -width XXXX -compact
+.It Sy a
+Append new text,
+.Em after
+the cursor.
+.It Sy i
+Insert new text,
+.Em before
+the cursor.
+.It Sy o
+Open a new line below the line the cursor is on, and start
+entering text.
+.It Sy O
+Open a new line above the line the cursor is on, and start
+entering text.
+.It Sy <escape>
+Once you've entered input mode using the one of the
+.Sy \&a ,
+.Sy \&i ,
+.Sy \&O ,
+or
+.Sy \&o
+commands, use
+.Sy <escape>
+to quit entering text and return to command mode.
+.El
+.Pp
+The commands to copy text are:
+.Bl -tag -width XXXX -compact
+.It Sy yy
+Copy the line the cursor is on.
+.It Sy p
+Append the copied line after the line the cursor is on.
+.El
+.Pp
+The commands to delete text are:
+.Bl -tag -width XXXX -compact
+.It Sy dd
+Delete the line the cursor is on.
+.It Sy x
+Delete the character the cursor is on.
+.El
+.Pp
+The commands to write the file are:
+.Bl -tag -width XXXX -compact
+.It Sy :w<carriage-return>
+Write the file back to the file with the name that you originally used
+as an argument on the
+.Nm \&vi
+command line.
+.It Sy :w file_name<carriage-return>
+Write the file back to the file with the name
+.Dq file_name .
+.El
+.Pp
+The commands to quit editing and exit the editor are:
+.Bl -tag -width XXXX -compact
+.It Sy :q<carriage-return>
+Quit editing and leave vi (if you've modified the file, but not
+saved your changes,
+.Nm \&vi
+will refuse to quit).
+.It Sy :q!<carriage-return>
+Quit, discarding any modifications that you may have made.
+.El
+.Pp
+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
+.Dq 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.
+.Sh VI COMMANDS
+The following section describes the commands available in the command
+mode of the
+.Nm \&vi
+editor.
+In each entry below, the tag line is a usage synopsis for the command
+character.
+.sp
+.Bl -tag -width "XXXX" -compact
+.It Sy "[count] <control-A>"
+Search forward
+.Li count
+times for the current word.
+.It Sy "[count] <control-B>"
+Page backwards
+.Li count
+screens.
+.It Sy "[count] <control-D>"
+Scroll forward
+.Li count
+lines.
+.It Sy "[count] <control-E>"
+Scroll forward
+.Li count
+lines, leaving the current line and column as is, if possible.
+.It Sy "[count] <control-F>"
+Page forward
+.Li count
+screens.
+.It Sy "<control-G>"
+Display the file information.
+.It Sy "<control-H>"
+.It Sy "[count] h"
+Move the cursor back
+.Li count
+characters in the current line.
+.It Sy "[count] <control-J>"
+.It Sy "[count] <control-N>"
+.It Sy "[count] j"
+Move the cursor down
+.Li count
+lines without changing the current column.
+.It Sy "<control-L>"
+.It Sy "<control-R>"
+Repaint the screen.
+.It Sy "[count] <control-M>"
+.It Sy "[count] +"
+Move the cursor down
+.Li count
+lines to the first nonblank character of that line.
+.It Sy "[count] <control-P>"
+.It Sy "[count] k"
+Move the cursor up
+.Li count
+lines, without changing the current column.
+.It Sy "<control-T>"
+Return to the most recent tag context.
+.It Sy "<control-U>"
+Scroll backwards
+.Li count
+lines.
+.It Sy "<control-W>"
+Switch to the next lower screen in the window, or, to the first
+screen if there are no lower screens in the window.
+.It Sy "<control-Y>"
+Scroll backwards
+.Li count
+lines, leaving the current line and column as is, if possible.
+.It Sy "<control-Z>"
+Suspend the current editor session.
+.It Sy "<escape>"
+Execute
+.Nm \&ex
+commands or cancel partial commands.
+.It Sy "<control-]>"
+Push a tag reference onto the tag stack.
+.It Sy "<control-^>"
+Switch to the most recently edited file.
+.It Sy "[count] <space>"
+.It Sy "[count] l"
+Move the cursor forward
+.Li count
+characters without changing the current line.
+.It Sy "[count] ! motion shell-argument(s)"
+Replace text with results from a shell command.
+.It Sy "[count] # +|-|#"
+Increment or decrement the cursor number.
+.It Sy "[count] $"
+Move the cursor to the end of a line.
+.It Sy "%"
+Move to the matching character.
+.It Sy "&"
+Repeat the previous substitution command on the current line.
+.It Sy "'<character>"
+.It Sy "`<character>"
+Return to a context marked by the character
+.Li <character> .
+.It Sy "[count] ("
+Back up
+.Li count
+sentences.
+.It Sy "[count] )"
+Move forward
+.Li count
+sentences.
+.It Sy "[count] ,"
+Reverse find character
+.Li count
+times.
+.It Sy "[count] -"
+Move to first nonblank of the previous line,
+.Li count
+times.
+.It Sy "[count] ."
+Repeat the last
+.Nm \&vi
+command that modified text.
+.It Sy "/RE<carriage-return>"
+.It Sy "/RE/ [offset]<carriage-return>"
+.It Sy "?RE<carriage-return>"
+.It Sy "?RE? [offset]<carriage-return>"
+.It Sy "N"
+.It Sy "n"
+Search forward or backward for a regular expression.
+.It Sy "0"
+Move to the first character in the current line.
+.It Sy ":"
+Execute an ex command.
+.It Sy "[count] ;"
+Repeat the last character find
+.Li count
+times.
+.It Sy "[count] < motion"
+.It Sy "[count] > motion"
+Shift lines left or right.
+.It Sy "@ buffer"
+Execute a named buffer.
+.It Sy "[count] A"
+Enter input mode, appending the text after the end of the line.
+.It Sy "[count] B"
+Move backwards
+.Li count
+bigwords.
+.It Sy "[buffer] [count] C"
+Change text from the current position to the end-of-line.
+.It Sy "[buffer] D"
+Delete text from the current position to the end-of-line.
+.It Sy "[count] E"
+Move forward
+.Li count
+end-of-bigwords.
+.It Sy "[count] F <character>"
+Search
+.Li count
+times backward through the current line for
+.Li <character> .
+.It Sy "[count] G"
+Move to line
+.Li count ,
+or the last line of the file if
+.Li count
+not specified.
+.It Sy "[count] H"
+Move to the screen line
+.Li "count - 1"
+lines below the top of the screen.
+.It Sy "[count] I"
+Enter input mode, inserting the text at the beginning of the line.
+.It Sy "[count] J"
+Join lines.
+.It Sy "[count] L"
+Move to the screen line
+.Li "count - 1"
+lines above the bottom of the screen.
+.It Sy " M"
+Move to the screen line in the middle of the screen.
+.It Sy "[count] O"
+Enter input mode, appending text in a new line above the current line.
+.It Sy "[buffer] P"
+Insert text from a buffer.
+.It Sy "Q"
+Exit
+.Nm \&vi
+(or visual) mode and switch to
+.Nm \&ex
+mode.
+.It Sy "[count] R"
+Enter input mode, replacing the characters in the current line.
+.It Sy "[buffer] [count] S"
+Substitute
+.Li count
+lines.
+.It Sy "[count] T <character>"
+Search backwards,
+.Li count
+times,
+through the current line for the character
+.Em after
+the specified
+.Li <character> .
+.It Sy "U"
+Restore the current line to its state before the cursor last
+moved to it.
+.It Sy "[count] W"
+Move forward
+.Li count
+bigwords.
+.It Sy "[buffer] [count] X"
+Delete
+.Li count
+characters before the cursor.
+.It Sy "[buffer] [count] Y"
+Copy (or
+.Dq yank )
+.Li count
+lines into the specified buffer.
+.It Sy "ZZ"
+Write the file and exit
+.Nm \&vi .
+.It Sy "[count] [["
+Back up
+.Li count
+section boundaries.
+.It Sy "[count] ]]"
+Move forward
+.Li count
+section boundaries.
+.It Sy "\&^"
+Move to first nonblank character on the current line.
+.It Sy "[count] _"
+Move down
+.Li "count - 1"
+lines, to the first nonblank character.
+.It Sy "[count] a"
+Enter input mode, appending the text after the cursor.
+.It Sy "[count] b"
+Move backwards
+.Li count
+words.
+.It Sy "[buffer] [count] c motion"
+Change a region of text.
+.It Sy "[buffer] [count] d motion"
+Delete a region of text.
+.It Sy "[count] e"
+Move forward
+.Li count
+end-of-words.
+.It Sy "[count] f<character>"
+Search forward,
+.Li count
+times, through the rest of the current line for
+.Li <character> .
+.It Sy "[count] i"
+Enter input mode, inserting the text before the cursor.
+.It Sy "m <character>"
+Save the current context (line and column) as
+.Li <character> .
+.It Sy "[count] o"
+Enter input mode, appending text in a new line under the current line.
+.It Sy "[buffer] p"
+Append text from a buffer.
+.It Sy "[count] r <character>
+Replace
+.Li count
+characters.
+.It Sy "[buffer] [count] s"
+Substitute
+.Li count
+characters in the current line starting with the current character.
+.It Sy "[count] t <character>"
+Search forward,
+.Li count
+times, through the current line for the character immediately
+.Em before
+.Li <character> .
+.It Sy "u"
+Undo the last change made to the file.
+.It Sy "[count] w"
+Move forward
+.Li count
+words.
+.It Sy "[buffer] [count] x"
+Delete
+.Li count
+characters.
+.It Sy "[buffer] [count] y motion"
+Copy (or
+.Dq yank )
+a text region specified by the
+.Li count
+and motion into a buffer.
+.It Sy "[count1] z [count2] -|.|+|^|<carriage-return>"
+Redraw, optionally repositioning and resizing the screen.
+.It Sy "[count] {"
+Move backward
+.Li count
+paragraphs.
+.It Sy "[count] |"
+Move to a specific
+.Em column
+position on the current line.
+.It Sy "[count] }"
+Move forward
+.Li count
+paragraphs.
+.It Sy "[count] ~"
+Reverse the case of the next
+.Li count
+character(s).
+.It Sy "[count] ~ motion"
+Reverse the case of the characters in a text region specified by the
+.Li count
+and
+.Li motion .
+.It Sy "<interrupt>"
+Interrupt the current operation.
+.El
+.Sh VI TEXT INPUT COMMANDS
+The following section describes the commands available in the text
+input mode of the
+.Nm \&vi
+editor.
+.Pp
+.Bl -tag -width "XXXX" -compact
+.It Sy "<nul>"
+Replay the previous input.
+.It Sy "<control-D>"
+Erase the previous autoindent character.
+.It Sy "^<control-D>"
+Erase all of the autoindent characters, and reset the autoindent level.
+.It Sy "0<control-D>"
+Erase all of the autoindent characters.
+.It Sy "<control-T>"
+Insert sufficient
+.Li <tab>
+and
+.Li <space>
+characters to move the cursor forward to a column immediately
+after the next column which is an even multiple of the
+.Sy shiftwidth
+option.
+.It Sy "<erase>
+.It Sy "<control-H>"
+Erase the last character.
+.It Sy "<literal next>"
+Quote the next character.
+.It Sy "<escape>
+Resolve all text input into the file, and return to command mode.
+.It Sy "<line erase>
+Erase the current line.
+.It Sy "<control-W>"
+.It Sy "<word erase>
+Erase the last word.
+The definition of word is dependent on the
+.Sy altwerase
+and
+.Sy ttywerase
+options.
+.It Sy "<control-X>[0-9A-Fa-f]*"
+Insert a character with the specified hexadecimal value into the text.
+.It Sy "<interrupt>"
+Interrupt text input mode, returning to command mode.
+.El
+.Sh EX COMMANDS
+The following section describes the commands available in the
+.Nm \&ex
+editor.
+In each entry below, the tag line is a usage synopsis for the command.
+.sp
+.Bl -tag -width "XXXX" -compact
+.It Sy "<end-of-file>"
+Scroll the screen.
+.It Sy "! argument(s)"
+.It Sy "[range]! argument(s)"
+Execute a shell command, or filter lines through a shell command.
+.It Sy \&"
+A comment.
+.It Sy "[range] nu[mber] [count] [flags]"
+.It Sy "[range] # [count] [flags]"
+Display the selected lines, each preceded with its line number.
+.It Sy "@ buffer"
+.It Sy "* buffer"
+Execute a buffer.
+.It Sy "[range] d[elete] [buffer] [count] [flags]"
+Delete the lines from the file.
+.It Sy "di[splay] b[uffers] | s[creens] | t[ags]"
+Display buffers, screens or tags.
+.It Sy "e[dit][!] [+cmd] [file]"
+.It Sy "ex[!] [+cmd] [file]"
+Edit a different file.
+.It Sy "exu[sage] [command]"
+Display usage for an
+.Nm \&ex
+command.
+.It Sy "f[ile] [file]"
+Display and optionally change the file name.
+.It Sy "fg [name]"
+.Nm \&Vi
+mode only.
+Foreground the specified screen.
+.It Sy "[range] g[lobal] /pattern/ [commands]"
+.It Sy "[range] v /pattern/ [commands]
+Apply commands to lines matching (or not matching) a pattern.
+.It Sy "he[lp]"
+Display a help message.
+.It Sy "[line] i[nsert][!]"
+The input text is inserted before the specified line.
+.It Sy "[range] j[oin][!] [count] [flags]"
+Join lines of text together.
+.It Sy "[range] l[ist] [count] [flags]"
+Display the lines unambiguously.
+.It Sy "map[!] [lhs rhs]"
+Define or display maps (for
+.Nm \&vi
+only).
+.It Sy "[line] ma[rk] <character>"
+.It Sy "[line] k <character>"
+Mark the line with the mark
+.Li <character> .
+.It Sy "[range] m[ove] line"
+Move the specified lines after the target line.
+.It Sy "mk[exrc][!] file"
+Write the abbreviations, editor options and maps to the specified
+file.
+.It Sy "n[ext][!] [file ...]"
+Edit the next file from the argument list.
+.It Sy "[line] o[pen] /pattern/ [flags]"
+Enter open mode.
+.It Sy "pre[serve]"
+Save the file in a form that can later be recovered using the
+.Nm \&ex
+.Fl r
+option.
+.It Sy "prev[ious][!]"
+Edit the previous file from the argument list.
+.It Sy "[range] p[rint] [count] [flags]"
+Display the specified lines.
+.It Sy "[line] pu[t] [buffer]"
+Append buffer contents to the current line.
+.It Sy "q[uit][!]"
+End the editing session.
+.It Sy "[line] r[ead][!] [file]"
+Read a file.
+.It Sy "rec[over] file"
+Recover
+.Li file
+if it was previously saved.
+.It Sy "res[ize] [+|-]size"
+.Nm \&Vi
+mode only.
+Grow or shrink the current screen.
+.It Sy "rew[ind][!]"
+Rewind the argument list.
+.It Sy "se[t] [option[=[value]] ...] [nooption ...] [option? ...] [all]"
+Display or set editor options.
+.It Sy "sh[ell]"
+Run a shell program.
+.It Sy "so[urce] file"
+Read and execute
+.Nm \&ex
+commands from a file.
+.It Sy "sp[lit] [file ...]"
+.Nm \&Vi
+mode only.
+Split the screen.
+.It Sy "[range] s[ubstitute] [/pattern/replace/] [options] [count] [flags]"
+.It Sy "[range] & [options] [count] [flags]"
+.It Sy "[range] ~ [options] [count] [flags]"
+Make substitutions.
+.It Sy "su[spend][!]"
+.It Sy "st[op][!]"
+.It Sy <suspend>
+Suspend the edit session.
+.It Sy "ta[g][!] tagstring"
+Edit the file containing the specified tag.
+.It Sy "tagp[op][!] [file | number]"
+Pop to the specified tag in the tags stack.
+.It Sy "unm[ap][!] lhs"
+Unmap a mapped string.
+.It Sy "ve[rsion]"
+Display the version of the
+.Nm \&ex/vi
+editor.
+.It Sy "[line] vi[sual] [type] [count] [flags]"
+.Nm \&Ex
+mode only.
+Enter
+.Nm \&vi .
+.It Sy "vi[sual][!] [+cmd] [file]"
+.Nm \&Vi
+mode only.
+Edit a new file.
+.It Sy "viu[sage] [command]"
+Display usage for a
+.Nm \&vi
+command.
+.It Sy "[range] w[rite][!] [>>] [file]"
+.It Sy "[range] w[rite] [!] [file]"
+.It Sy "[range] wn[!] [>>] [file]"
+.It Sy "[range] wq[!] [>>] [file]"
+Write the file.
+.It Sy "[range] x[it][!] [file]"
+Write the file if it has been modified.
+.It Sy "[range] ya[nk] [buffer] [count]"
+Copy the specified lines to a buffer.
+.It Sy "[line] z [type] [count] [flags]"
+Adjust the window.
+.El
+.Sh SET OPTIONS
+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.
+.Pp
+In each entry below, the first part of the tag line is the full name
+of the option, followed by any equivalent abbreviations.
+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.
+.Pp
+Options apply to both
+.Nm \&ex
+and
+.Nm \&vi
+modes, unless otherwise specified.
+.sp
+.Bl -tag -width "XXXX" -compact
+.It Sy "altwerase [off]"
+.Nm \&Vi
+only.
+Select an alternate word erase algorithm.
+.It Sy "autoindent, ai [off]"
+Automatically indent new lines.
+.It Sy "autoprint, ap [off]"
+.Nm \&Ex
+only.
+Display the current line automatically.
+.It Sy "autowrite, aw [off]"
+Write modified files automatically when changing files.
+.It Sy "beautify, bf [off]"
+Discard control characters.
+.It Sy "cdpath [environment variable CDPATH, or current directory]"
+The directory paths used as path prefixes for the
+.Sy cd
+command.
+.It Sy "columns, co [80]"
+Set the number of columns in the screen.
+.It Sy "comment [off]"
+.Nm \&Vi
+only.
+Skip leading comments in files.
+.It Sy "directory, dir [environment variable TMPDIR, or /tmp]"
+The directory where temporary files are created.
+.It Sy "edcompatible, ed [off]"
+Remember the values of the
+.Dq \&c
+and
+.Dq \&g
+suffices to the
+.Sy substitute
+commands, instead of initializing them as unset for each new
+command.
+.It Sy "errorbells, eb [off]"
+.Nm \&Ex
+only.
+Announce error messages with a bell.
+.It Sy "exrc, ex [off]"
+Never read startup files in the local directory.
+.It Sy "extended [off]"
+Regular expressions are extended (i.e.
+.Xr egrep 1
+style) expressions.
+.It Sy "flash [on]"
+Flash the screen instead of beeping the keyboard on error.
+.It Sy "hardtabs, ht [8]"
+Set the spacing between hardware tab settings.
+.It Sy "ignorecase, ic [off]"
+Ignore case differences in regular expressions.
+.It Sy "keytime [6]"
+The 10th's of a second
+.Nm ex/vi
+waits for a subsequent key to complete a key mapping.
+.It Sy "leftright [off]"
+.Nm \&Vi
+only.
+Do left-right scrolling.
+.It Sy "lines, li [24]"
+.Nm \&Vi
+only.
+Set the number of lines in the screen.
+.It Sy "lisp [off]"
+.Nm \&Vi
+only.
+Modify various search commands and options to work with Lisp.
+.Pp
+.Em "This option is not yet implemented."
+.It Sy "list [off]"
+Display lines in an unambiguous fashion.
+.It Sy "magic [on]"
+Treat certain characters specially in regular expressions.
+.It Sy "matchtime [7]"
+.Nm \&Vi
+only.
+The 10th's of a second
+.Nm ex/vi
+pauses on the matching character when the
+.Sy showmatch
+option is set.
+.It Sy "mesg [on]"
+Permit messages from other users.
+.It Sy "modelines, modeline [off]"
+Read the first and last few lines of each file for
+.Nm ex
+commands.
+.Pp
+.Em "This option will never be implemented."
+.It Sy "number, nu [off]"
+Precede each line displayed with its current line number.
+.It Sy "octal [off]"
+Display unknown characters as octal numbers, instead of the default
+hexadecimal.
+.It Sy "open [on]"
+.Nm \&Ex
+only.
+If this option is not set, the
+.Sy open
+and
+.Sy visual
+commands are disallowed.
+.It Sy "optimize, opt [on]"
+.Nm \&Vi
+only.
+Optimize text throughput to dumb terminals.
+.Pp
+.Em "This option is not yet implemented."
+.It Sy "paragraphs, para [IPLPPPQPP LIpplpipbp]"
+.Nm \&Vi
+only.
+Define additional paragraph boundaries for the
+.Sy \&{
+and
+.Sy \&}
+commands.
+.It Sy "prompt [on]"
+.Nm \&Ex
+only.
+Display a command prompt.
+.It Sy "readonly, ro [off]"
+Mark the file as read-only.
+.It Sy "recdir [/var/tmp/vi.recover]"
+The directory where recovery files are stored.
+.It Sy "redraw, re [off]"
+.Nm \&Vi
+only.
+Simulate an intelligent terminal on a dumb one.
+.Pp
+.Em "This option is not yet implemented."
+.It Sy "remap [on]"
+Remap keys until resolved.
+.It Sy "report [5]"
+Set the number of lines about which the editor reports changes
+or yanks.
+.It Sy "ruler [off]"
+.Nm \&Vi
+only.
+Display a row/column ruler on the colon command line.
+.It Sy "scroll, scr [window / 2]"
+Set the number of lines scrolled.
+.It Sy "sections, sect [NHSHH HUnhsh]"
+.Nm \&Vi
+only.
+Define additional section boundaries for the
+.Sy \&[[
+and
+.Sy \&]]
+commands.
+.It Sy "shell, sh [environment variable SHELL, or /bin/sh]"
+Select the shell used by the editor.
+.It Sy "shiftwidth, sw [8]"
+Set the autoindent and shift command indentation width.
+.It Sy "showdirty [off]"
+.Nm \&Vi
+only.
+Display an asterisk on the colon command line if the file has been modified.
+.It Sy "showmatch, sm [off]"
+.Nm \&Vi
+only.
+Note matching
+.Dq \&{
+and
+.Dq \&(
+for
+.Dq \&}
+and
+.Dq \&)
+characters.
+.It Sy "showmode [off]"
+.Nm \&Vi
+only.
+Display the current editor mode (command or input).
+.It Sy "sidescroll [16]"
+.Nm \&Vi
+only.
+Set the amount a left-right scroll will shift.
+.It Sy "slowopen, slow [off]"
+Delay display updating during text input.
+.Pp
+.Em "This option is not yet implemented."
+.It Sy "sourceany [off]"
+Read startup files not owned by the current user.
+.Pp
+.Em "This option will never be implemented."
+.It Sy "tabstop, ts [8]"
+This option sets tab widths for the editor display.
+.It Sy "taglength, tl [0]"
+Set the number of significant characters in tag names.
+.It Sy "tags, tag [tags /var/db/libc.tags /sys/kern/tags]"
+Set the list of tags files.
+.It Sy "term, ttytype, tty [environment variable TERM]"
+Set the terminal type.
+.It Sy "terse [off]"
+This option has historically made editor messages less verbose.
+It has no effect in this implementation.
+.It Sy "tildeop"
+Modify the
+.Sy \&~
+command to take an associated motion.
+.It Sy "timeout, to [on]"
+Time out on keys which may be mapped.
+.It Sy "ttywerase [off]"
+.Nm \&Vi
+only.
+Select an alternate erase algorithm.
+.It Sy "verbose [off]"
+.NM \&Vi
+only.
+Display an error message for every error.
+.It Sy "w300 [no default]"
+.Nm \&Vi
+only.
+Set the window size if the baud rate is less than 1200 baud.
+.It Sy "w1200 [no default]"
+.Nm \&Vi
+only.
+Set the window size if the baud rate is equal to 1200 baud.
+.It Sy "w9600 [no default]"
+.Nm \&Vi
+only.
+Set the window size if the baud rate is greater than 1200 baud.
+.It Sy "warn [on]"
+.Nm \&Ex
+only.
+This option causes a warning message to the terminal if the file has
+been modified, since it was last written, before a
+.Sy \&!
+command.
+.It Sy "window, w, wi [environment variable LINES]"
+Set the window size for the screen.
+.It Sy "wrapmargin, wm [0]"
+.Nm \&Vi
+only.
+Break lines automatically when they reach the right-hand margin.
+.It Sy "wrapscan, ws [on]"
+Set searches to wrap around the end or beginning of the file.
+.It Sy "writeany, wa [off]"
+Turn off file-overwriting checks.
+.El
+.Sh ENVIRONMENTAL VARIABLES
+.Bl -tag -width "COLUMNSXX" -compact
+.It Ev COLUMNS
+The number of columns on the screen.
+This value overrides any system or terminal specific values.
+If the COLUMNS environmental variable is not set when
+.Nm ex/vi
+runs, or the
+.Sy columns
+option is explicitly reset by the user,
+.Nm ex/vi
+enters the value into the environment.
+.It Ev EXINIT
+A list of
+.Nm \&ex
+startup commands, read if the variable
+.Ev NEXINIT
+is not set.
+.It Ev HOME
+The user's home directory, used as the initial directory path
+for the startup
+.Pa $HOME/.nexrc
+and
+.Pa $HOME/.exrc
+files.
+This value is also used as the default directory for the
+.Nm \&vi
+.Sy \&cd
+command.
+.It Ev LINES
+The number of rows on the screen.
+This value overrides any system or terminal specific values.
+If the LINES environmental variable is not set when
+.Nm ex/vi
+runs, or the
+.Sy lines
+option is explicitly reset by the user,
+.Nm ex/vi
+enters the value into the environment.
+.It Ev NEXINIT
+A list of
+.Nm \&ex
+startup commands.
+.It Ev SHELL
+The user's shell of choice (see also the
+.Sy shell
+option).
+.It Ev TERM
+The user's terminal type.
+The default is the type
+.Dq unknown .
+If the TERM environmental variable is not set when
+.Nm ex/vi
+runs, or the
+.Sy term
+option is explicitly reset by the user,
+.Nm ex/vi
+enters the value into the environment.
+.It Ev TMPDIR
+The location used to stored temporary files (see also the
+.Sy directory
+option).
+.El
+.Sh ASYNCHRONOUS EVENTS
+.Bl -tag -width "SIGWINCHXX" -compact
+.It SIGALRM
+.Nm \&Vi/ex
+uses this signal for periodic backups of file modifications
+and to display
+.Dq busy
+messages when operations are likely to take a long time.
+.It SIGHUP
+.It 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 recovered.
+See the
+.Nm \&vi/ex
+Reference manual section entitled
+.Dq Recovery
+for more information.
+.It 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.
+.It SIGWINCH
+The screen is resized.
+See the
+.Nm \&vi/ex
+Reference manual section entitled
+.Dq "Sizing the Screen"
+for more information.
+.It SIGCONT
+.It SIGQUIT
+.It SIGTSTP
+.Nm \&Vi/ex
+ignores these signals.
+.El
+.Sh BUGS
+See the file
+.Pa nvi/docs/bugs.current
+for a list of the known bugs in this version.
+.Sh FILES
+.Bl -tag -width /var/tmp/vi.recover -compact
+.It Pa /bin/sh
+The default user shell.
+.It Pa /etc/vi.exrc
+System-wide vi startup file.
+.It Pa /tmp
+Temporary file directory.
+.It Pa /var/tmp/vi.recover
+The default recovery file directory.
+.It Pa $HOME/.nexrc
+1st choice for user's home directory startup file.
+.It Pa $HOME/.exrc
+2nd choice for user's home directory startup file.
+.It Pa .nexrc
+1st choice for local directory startup file.
+.It Pa .exrc
+2nd choice for local directory startup file.
+.El
+.Sh SEE ALSO
+.Xr ctags 1 ,
+.Xr more 1 ,
+.Xr curses 3 ,
+.Xr dbopen 3
+.sp
+The
+.Dq "Vi Quick Reference"
+card.
+.sp
+.Dq "\&An Introduction to Display Editing with Vi" ,
+found in the
+.Dq "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
+.Nm \&vi
+screen editor.
+.sp
+.Dq "\&Ex Reference Manual (Version 3.7)" ,
+found in the
+.Dq "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
+.Nm \&ex
+editor, as distributed in most historic 4BSD and System V systems.
+.sp
+.Dq "Edit: A tutorial" ,
+found in the
+.Dq "UNIX User's Manual Supplementary Documents"
+section of the 4.3BSD manual set.
+This document is an introduction to a simple version of the
+.Nm \&ex
+screen editor.
+.sp
+.Dq "\&Ex/Vi Reference Manual" ,
+found in the
+.Dq "UNIX User's Manual Supplementary Documents"
+section of the 4.4BSD manual set.
+This document is the final reference for the
+.Nm \&nex/nvi
+text editors, as distributed in 4.4BSD and 4.4BSD-Lite.
+.Pp
+.Nm Roff
+source for all of these documents is distributed with
+.Nm nex/nvi
+in the
+.Pa nvi/USD.doc
+directory of the
+.Nm nex/nvi
+source code.
+.sp
+The files
+.Dq autowrite ,
+.Dq input ,
+.Dq quoting ,
+and
+.Dq structures ,
+found in the
+.Pa nvi/docs/internals
+directory of the
+.Nm nex/nvi
+source code.
+.Sh HISTORY
+The
+.Nm nex/nvi
+replacements for the
+.Nm ex/vi
+editor first appeared in 4.4BSD.
+.Sh STANDARDS
+.Nm \&Nex/nvi
+is close to IEEE Std1003.2 (``POSIX'').
+That document differs from historical
+.Nm ex/vi
+practice in several places; there are changes to be made on both sides.
diff --git a/usr.bin/vi/USD.doc/vi.ref/Makefile b/usr.bin/vi/USD.doc/vi.ref/Makefile
new file mode 100644
index 000000000000..2690f86edc70
--- /dev/null
+++ b/usr.bin/vi/USD.doc/vi.ref/Makefile
@@ -0,0 +1,25 @@
+# @(#)Makefile 8.16 (Berkeley) 8/15/94
+
+DIR= usd/13.viref
+SRCS= vi.ref ex.cmd.roff set.opt.roff vi.cmd.roff ref.so
+MACROS= -me
+CLEANFILES+=vi.ref.txt index index.so
+
+paper.ps: vi.ref index.so
+ soelim vi.ref | ${TBL} | ${ROFF} > ${.TARGET}
+
+vi.ref.txt: vi.ref index.so
+ soelim vi.ref | ${TBL} | groff ${MACROS} -Tascii > $@
+
+index.so: vi.ref
+ # Build index.so, side-effect of building the paper.
+ soelim vi.ref | ${TBL} | ${ROFF} > /dev/null
+ sed -e 's/MINUSSIGN/\\-/' \
+ -e 's/DOUBLEQUOTE/""/' \
+ -e "s/SQUOTE/'/" \
+ -e 's/ /__SPACE/g' < index | \
+ sort -u '-t ' +0 -1 +1n | awk -f merge.awk | \
+ sed -e 's/__SPACE/ /g' > index.so
+ rm -f index
+
+.include <bsd.doc.mk>
diff --git a/usr.bin/vi/USD.doc/vi.ref/ex.cmd.roff b/usr.bin/vi/USD.doc/vi.ref/ex.cmd.roff
new file mode 100644
index 000000000000..a9cba6ae336d
--- /dev/null
+++ b/usr.bin/vi/USD.doc/vi.ref/ex.cmd.roff
@@ -0,0 +1,1776 @@
+.\" Copyright (c) 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.
+.\"
+.\" @(#)ex.cmd.roff 8.24 (Berkeley) 7/17/94
+.\"
+.SH 1 "Ex Description"
+.pp
+The following words have special meanings for
+.CO ex
+commands.
+.KY "<eof>"
+.IP "<eof>"
+The end-of-file character is used to scroll the screen in the
+.CO ex
+editor.
+This character is normally
+.LI <control-D> ,
+however, whatever character is set for the current terminal is used.
+.KY "line"
+.IP "line"
+A single-line address, given in any of the forms described in the
+section entitled
+.QB "Ex Addressing" .
+The default for
+.LI line
+is the current line.
+.KY "range"
+.IP "range"
+A line, or a pair of line addresses, separated by a comma or semicolon.
+(See the section entitled
+.QB "Ex Addressing"
+for more information.)
+The default for range is the current line
+.i only ,
+i.e.
+.QT \&.,. .
+A percent sign
+.PQ %
+stands for the range
+.QT 1,$ .
+The starting address must be less than, or equal to, the ending address.
+.KY "count"
+.IP "count"
+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
+.QT "p 3000"
+in a 10 line file is acceptable, and will print from the current line
+through the last line in the file.
+.KY "flags"
+.IP "flags"
+One or more of the characters
+.QQ # ,
+.QQ p ,
+and
+.QQ l .
+When a command that accepts these flags completes, the addressed line(s)
+are written out as if by the corresponding
+.CO # ,
+.CO l
+or
+.CO p
+commands.
+In addition, any number of
+.QT +
+or
+.QT \-
+characters can be specified 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
+.LI flags
+is none.
+.KY "file"
+.IP "file"
+A pattern used to derive a pathname; the default is the current file.
+File names are subjected to normal
+.XR sh 1
+word expansions.
+.pp
+Anywhere a file name is specified, it is also possible to use
+the special string
+.QT /tmp .
+This will be replaced with a temporary file name which can be used
+for temporary work, e.g.
+.QT ":e /tmp"
+creates and edits a new file.
+.pp
+If both a count and a range are specified for commands that use either,
+the starting line for the command is the
+.i last
+line addressed by the range, and
+.LI count - 1
+subsequent lines are affected by the command, e.g. the command
+.QT 2,3p4
+prints out lines 3, 4, 5 and 6.
+.pp
+When only a line or range is specified, with no command, the implied
+command is either a
+.CO list ,
+.CO number
+or
+.CO print
+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
+.CO print
+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.
+.pp
+Zero or more whitespace characters may precede or follow the addresses,
+count, flags, or command name.
+Any object following a command name (such as buffer, file, etc.),
+that begins with an alphabetic character,
+should be separated from the command name by at least one whitespace
+character.
+.pp
+Any character, including
+.LI <carriage-return> ,
+.QT %
+and
+.QT #
+retain their literal value when preceded by a backslash.
+.SH 1 "Ex Commands"
+.pp
+The following section describes the commands available in the
+.CO ex
+editor.
+In each entry below, the tag line is a usage synopsis for the command.
+.pp
+Each command can be entered as the abbreviation
+(those characters in the synopsis command word preceding the
+.QQ [
+character),
+the full command (all characters shown for the command word,
+omitting the
+.QQ [
+and
+.QQ ]
+characters),
+or any leading subset of the full command down to the abbreviation.
+For example, the args command (shown as
+.QT ar[gs]
+in the synopsis)
+can be entered as
+.QT ar ,
+.QT arg
+or
+.QT args .
+.pp
+Each
+.CO ex
+command described below notes the new current line after it
+is executed, as well as any options that affect the command.
+.KY DOUBLEQUOTE
+.IP """"
+A comment.
+Command lines beginning with the double-quote character
+.PQ """"
+are ignored.
+This permits comments in editor scripts and startup files.
+.KY "<end-of-file>"
+.IP "<end-of-file>"
+Scroll the screen.
+Write the next N lines, where N is the value of the
+.OP scroll
+option.
+The command is the end-of-file terminal character, which may be
+different on different terminals.
+Traditionally, it is the
+.LI <control-D>
+key.
+.sp
+Historically, the
+.CO eof
+command ignored any preceding count, and the
+.LI <end-of-file>
+character was ignored unless it was entered as the first character
+of the command.
+This implementation treats it as a command
+.i only
+if entered as the first character of the command line, and otherwise
+treats it as any other character.
+.SS
+.SP Line:
+Set to the last line written.
+.SP Options:
+None.
+.SE
+.KY "!"
+.IP "! argument(s)"
+.Ip "[range]! argument(s)"
+Execute a shell command, or filter lines through a shell command.
+In the first synopsis, the remainder of the line after the
+.QT !
+character is passed to the program named by the
+.OP shell
+option, as a single argument.
+.sp
+Within the rest of the line,
+.QT %
+and
+.QT #
+are expanded into the current and alternate pathnames, respectively.
+The character
+.QT !
+is expanded with the command text of the previous
+.CO !
+command.
+(Therefore, the command
+.CO !!
+repeats the previous
+.CO !
+command.)
+The special meanings of
+.QT % ,
+.QT # ,
+and
+.QT !
+can be overridden by escaping them with a backslash.
+If no
+.CO !
+or
+.CO :!
+command has yet been executed, it is an error to use an unescaped
+.QT !
+character.
+The
+.CO !
+command does
+.i not
+do shell expansion on the strings provided as arguments.
+If any of the above expansions change the command the user entered,
+the command is redisplayed at the bottom of the screen.
+.sp
+.CO Ex
+then executes the program named by the
+.OP shell
+option, with a
+.b \-c
+flag followed by the arguments (which are bundled into a single argument).
+.sp
+The
+.CO !
+command is permitted in an empty file.
+.sp
+If the file has been modified since it was last completely written,
+the
+.Co !
+command will warn you.
+.sp
+A single
+.QT !
+character is displayed when the command completes.
+.sp
+In the second form of the
+.CO !
+command, the remainder of the line after the
+.QT !
+is passed to the program named by the
+.OP shell
+option, as described above.
+The specified lines are passed to the program as standard input,
+and the standard and standard error output of the program replace
+the original lines.
+.SS
+.SP Line:
+Unchanged if no range was specified, otherwise set to the first
+line of the range.
+.SP Options:
+Affected by the
+.OP autowrite
+and
+.OP writeany
+options.
+.SE
+.KY "number"
+.IP "[range] nu[mber] [count] [flags]"
+.KY "#"
+.Ip "[range] # [count] [flags]"
+Display the selected lines, each preceded with its line number.
+.sp
+The line number format is
+.QQ %6d ,
+followed by two spaces.
+.SS
+.SP Line:
+Set to the last line displayed.
+.SP Options:
+None.
+.SE
+.KY "@"
+.IP "@ buffer"
+.KY "*"
+.Ip "* buffer"
+Execute a buffer.
+Each line in the named buffer is executed as an
+.CO ex
+command.
+If no buffer is specified, or if the specified buffer is
+.QT @
+or
+.QT * ,
+the last buffer executed is used.
+.KY <
+.IP "[range] <[< ...] [count] [flags]"
+Shift lines left or right.
+The specified lines are shifted to the left (for the
+.CO <
+command) or right (for the
+.CO >
+command), by the number of columns specified by the
+.OP shiftwidth
+option.
+Only leading whitespace characters are deleted when shifting left;
+once the first column of the line contains a nonblank character,
+the
+.CO shift
+command will succeed, but the line will not be modified.
+.sp
+If the command character
+.CO <
+or
+.CO >
+is repeated more than once, the command is repeated once for each
+additional command character.
+.SS
+.SP 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 lowest
+numbered line shifted.
+.SP Options:
+Affected by the
+.OP shiftwidth
+option.
+.SE
+.KY =
+.IP "[line] = [flags]"
+Display the line number.
+Display the line number of
+.LI line
+(which defaults to the last line in the file).
+.SS
+.SP Line:
+Unchanged.
+.SP Options:
+None.
+.SE
+.KY >
+.IP "[range] >[> ...] [count] [flags]"
+Shift right.
+The specified lines are shifted to the right by the number of columns
+specified by the
+.OP shiftwidth
+option, by inserting tab and space characters.
+Empty lines are not changed.
+.sp
+If the command character
+.QT >
+is repeated more than once, the command is repeated once for each
+additional command character.
+.SS
+.SP Line:
+Set to the last line modified by the command.
+.SP Options:
+None.
+.SE
+.KY abbrev
+.IP "ab[brev] lhs rhs"
+Add an abbreviation to the current abbreviation list.
+In
+.CO vi ,
+if
+.LI lhs
+is entered such that it is preceded and followed by characters
+that cannot be part of a word, it is replaced by the string
+.LI rhs .
+.SS
+.SP Line:
+Unchanged.
+.SP Options:
+None.
+.SE
+.KY append
+.IP "[line] a[ppend][!]"
+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
+.LI line ,
+or to the first line of the file if a
+.LI line
+of 0 was specified.
+Following the command name with a
+.QT !
+character causes the
+.OP autoindent
+option to be toggled for the duration of the command.
+.SS
+.SP Line:
+Unchanged.
+.SP Options:
+Affected by the
+.OP altwerase ,
+.OP autoindent ,
+.OP beautify ,
+.OP showmatch ,
+.OP ttywerase
+and
+.OP wrapmargin
+options.
+.SE
+.KY args
+.IP "ar[gs]"
+Display the argument list.
+The current argument is displayed inside of
+.QT [
+and
+.QT ]
+characters.
+The argument list is the list of operands specified on startup,
+which can be replaced using the
+.CO next
+command.
+.SS
+.SP Line:
+Unchanged.
+.SP Options:
+None.
+.SE
+.KY bg
+.IP bg
+.CO Vi
+mode only.
+Background the current screen.
+.SS
+.SP Line:
+Set to the current line when the screen was last edited.
+.SP Options:
+None.
+.SE
+.KY change
+.IP "[range] c[hange][!] [count]"
+Replace the lines with input text.
+Following the command name with a
+.QT !
+character causes the
+.OP autoindent
+option to be toggled for the duration of the command.
+.SS
+.SP 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.
+.SP Options:
+Affected by the
+.OP altwerase ,
+.OP autoindent ,
+.OP beautify ,
+.OP showmatch ,
+.OP ttywerase
+and
+.OP wrapmargin
+options.
+.SE
+.KY cd
+.KY chdir
+.IP "chd[ir][!] [directory]"
+.Ip "cd[!] [directory]"
+Change the current working directory.
+The
+.LI directory
+argument is subjected to
+.XR sh 1
+word expansions.
+When invoked with no directory argument and the
+.LI HOME
+environment variable is set, the directory named by the
+.LI HOME
+environment variable becomes the new current directory.
+Otherwise, the new current directory becomes the directory returned
+by the
+.XR getpwent 3
+routine.
+.sp
+The
+.CO chdir
+command will fail if the file has been modified since the last complete
+write of the file.
+You can override this check by appending a
+.QT !
+character to the command.
+.SS
+.SP Line:
+Unchanged.
+.SP Options:
+Affected by the
+.OP cdpath
+option.
+.SE
+.KY copy
+.KY t
+.IP "[range] co[py] line [flags]"
+.Ip "[range] t line [flags]"
+Copy the specified lines (range) after the destination line.
+Line 0 may be specified to insert the lines at the beginning of
+the file.
+.SS
+.SP Line:
+Unchanged.
+.SP Options:
+None.
+.SE
+.KY delete
+.IP "[range] d[elete] [buffer] [count] [flags]"
+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 command name is followed by a letter that could be interpreted
+as either a buffer name or a flag value (because neither a
+.LI count
+or
+.LI flags
+values were given),
+.CO ex
+treats the letter as a
+.LI flags
+value if the letter immediately follows the command name,
+without any whitespace separation.
+If the letter is preceded by whitespace characters,
+it treats it as a buffer name.
+.SS
+.SP Line:
+Set to the line following the deleted lines,
+or to the last line if the deleted lines were at the end.
+.SP Options:
+None.
+.SE
+.KY display
+.IP "di[splay] b[uffers] | s[creens] | t[ags]"
+Display buffers, screens or tags.
+The
+.CO display
+command takes one of three additional arguments, which are as follows:
+.SS
+.SP b[uffers]
+Display all buffers (including named, unnamed, and numeric)
+that contain text.
+.SP s[creens]
+Display the file names of all background screens.
+.SP t[ags]
+Display the tags stack.
+.SE
+.SS
+.SP Line:
+Unchanged.
+.SP Options:
+None.
+.SE
+.KY edit
+.IP "e[dit][!] [+cmd] [file]"
+.Ip "ex[!] [+cmd] [file]"
+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
+.QT !
+character to the command name.
+.sp
+If the
+.QT +cmd
+option is specified, that
+.CO ex
+command will be executed in the new file.
+Any
+.CO ex
+command may be used, although the most common use of this feature is
+to specify a line number or search pattern to set the initial location
+in the new file.
+.SS
+.SP 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 previously edited the
+file, the current line will be set to the first line of the file if
+you are in
+.CO vi
+mode, and the last line of the file if you are in
+.CO ex .
+.SP Options:
+Affected by the
+.OP autowrite
+and
+.OP writeany
+options.
+.SE
+.KY exusage
+.IP "exu[sage] [command]"
+Display usage for an
+.CO ex
+command.
+If
+.LI command
+is specified, a usage statement for that command is displayed.
+Otherwise, usage statements for all
+.CO ex
+commands are displayed.
+.SS
+.SP Line:
+Unchanged.
+.SP Options:
+None.
+.SE
+.KY file
+.IP "f[ile] [file]"
+Display and optionally change the file name.
+If a file name is specified, the current pathname is changed to the
+specified name.
+The current pathname, the number of lines, and the current position
+in the file are displayed.
+.SS
+.SP Line:
+Unchanged.
+.SP Options:
+None.
+.SE
+.KY fg
+.IP "fg [name]"
+.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.
+.SS
+.SP Line:
+Set to the current line when the screen was last edited.
+.SP Options:
+None.
+.SE
+.KY global
+.IP "[range] g[lobal] /pattern/ [commands]"
+.KY v
+.Ip "[range] v /pattern/ [commands]"
+Apply commands to lines matching (or not matching) a pattern.
+The lines within the given range that match
+.PQ g[lobal] ,
+or do not match
+.PQ v
+the given pattern are selected.
+Then, the specified
+.CO ex
+command(s) are executed with the current line
+.PQ \&.
+set to each selected line.
+If no range is specified, the entire file is searched for matching,
+or not matching, lines.
+.sp
+Multiple commands can be specified, one per line, by escaping each
+.LI <newline>
+character with a backslash, or by separating commands with a
+.QT |
+character.
+If no commands are specified, the command defaults to the
+.CO print
+command.
+.sp
+For the
+.CO append ,
+.CO change
+and
+.CO insert
+commands, the input text must be part of the global command line.
+In this case, the terminating period can be omitted if it ends the commands.
+.sp
+The
+.CO visual
+command may also be specified as one of the
+.CO ex
+commands.
+In this mode, input is taken from the terminal.
+Entering a
+.CO Q
+command in
+.CO vi
+mode causes the next line matching the pattern to be selected and
+.CO vi
+to be reentered, until the list is exhausted.
+.sp
+The
+.CO global ,
+.CO v
+and
+.CO undo
+commands cannot be used as part of these commands.
+.sp
+The editor options
+.OP autoprint ,
+.OP autoindent ,
+and
+.OP report
+are turned off for the duration of the
+.CO global
+and
+.CO v
+commands.
+.SS
+.SP Line:
+The last line modified.
+.SP Options:
+None.
+.SE
+.KY help
+.IP "he[lp]"
+Display a help message.
+.SS
+.SP Line:
+Unchanged.
+.SP Options:
+None.
+.SE
+.KY insert
+.IP "[line] i[nsert][!]"
+The input text is inserted before the specified line.
+Following the command name with a
+.QT !
+character causes the
+.OP autoindent
+option setting to be toggled for the duration of this command.
+.SS
+.SP 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.
+.SP Options:
+Affected by the
+.OP altwerase ,
+.OP autoindent ,
+.OP beautify ,
+.OP showmatch ,
+.OP ttywerase
+and
+.OP wrapmargin
+options.
+.SE
+.KY join
+.IP "[range] j[oin][!] [count] [flags]"
+Join lines of text together.
+.sp
+A
+.LI count
+specified to the
+.Sy join
+command specifies that the last line of the
+.LI range
+plus
+.LI count
+subsequent lines will be joined.
+(Note, this differs by one from the general rule where only
+.LI count - 1
+subsequent lines are affected.)
+.sp
+If the current line ends with a whitespace character, all whitespace
+is stripped from the next line.
+Otherwise, if the next line starts with a open parenthesis
+.PQ ( ,
+do nothing.
+Otherwise, if the current line ends with a question mark
+.PQ ? ,
+period
+.PQ \&.
+or exclamation point
+.PQ ! ,
+insert two spaces.
+Otherwise, insert a single space.
+.sp
+Appending a
+.QT !
+character to the command name causes a simpler join with no
+white-space processing.
+.SS
+.SP Line:
+Unchanged.
+.SP Options:
+None.
+.SE
+.KY list
+.IP "[range] l[ist] [count] [flags]"
+Display the lines unambiguously.
+Tabs are displayed as
+.QT ^I ,
+and the end of the line is marked with a
+.QT $
+character.
+.SS
+.SP Line:
+Set to the last line displayed.
+.SP Options:
+None.
+.SE
+.KY map
+.IP "map[!] [lhs rhs]"
+Define or display maps (for
+.CO vi
+only).
+.sp
+If
+.QT lhs
+and
+.QT rhs
+are not specified, the current set of command mode maps are displayed.
+If a
+.QT !
+character is appended to to the command,
+the text input mode maps are displayed.
+.sp
+Otherwise, when the
+.QT lhs
+character sequence is entered in
+.CO vi ,
+the action is as if the corresponding
+.QT rhs
+had been entered.
+If a
+.QT !
+character is appended to the command name,
+the mapping is effective during text input mode,
+otherwise, it is effective during command mode.
+This allows
+.QT lhs
+to have two different macro definitions at the same time: one for command
+mode and one for input mode.
+.sp
+Whitespace characters require escaping with a
+.LI <literal next>
+character to be entered in the
+.LI lhs
+string in visual mode.
+.sp
+Normally, keys in the
+.LI rhs
+string are remapped (see the
+.OP remap
+option),
+and it is possible to create infinite loops.
+However, keys which map to themselves are not further remapped,
+regardless of the setting of the
+.OP remap
+option.
+For example, the command
+.QT ":map n nz."
+maps the
+.QT n
+key to the
+.CO n
+and
+.CO z
+commands.
+.sp
+To exit an infinitely looping map, use the terminal
+.LI <interrupt>
+character.
+.SS
+.SP Line:
+Unchanged.
+.SP Options:
+None.
+.SE
+.KY mark
+.KY k
+.IP "[line] ma[rk] <character>"
+.Ip "[line] k <character>"
+Mark the line with the mark
+.LI <character> .
+The expressions
+.QT '<character>
+and
+.QT `<character>
+can then be used as an address in any command that uses one.
+.SS
+.SP Line:
+Unchanged.
+.SP Options:
+None.
+.SE
+.KY move
+.IP "[range] m[ove] line"
+Move the specified lines after the target line.
+A target line of 0 places the lines at the beginning of the file.
+.SS
+.SP Line:
+Set to the first of the moved lines.
+.SP Options:
+None.
+.SE
+.KY mkexrc
+.IP "mk[exrc][!] file"
+Write the abbreviations, editor options and maps to the specified
+file.
+Information is written in a form which can later be read back in
+using the
+.CO ex
+.CO source
+command.
+If
+.LI file
+already exists, the
+.CO mkexrc
+command will fail.
+This check can be overridden by appending a
+.QT !
+character to the command.
+.SS
+.SP Line:
+Unchanged.
+.SP Options:
+None.
+.SE
+.KY next
+.IP "n[ext][!] [file ...]"
+Edit the next file from the argument list.
+The
+.CO next
+command will fail if the file has been modified since the last complete
+write.
+This check can be overridden by appending the
+.QT !
+character to the command name.
+The argument list can optionally be replaced by specifying a new one
+as arguments to this command.
+In this case, editing starts with the first file on the new list.
+.SS
+.SP Line:
+Set as described for the
+.CO edit
+command.
+.SP Options:
+Affected by the options
+.OP autowrite
+and
+.OP writeany .
+.SE
+.KY open
+.IP "[line] o[pen] /pattern/ [flags]"
+Enter open mode.
+Open mode is the same as being in
+.CO vi ,
+but with a one-line window.
+All the standard
+.CO vi
+commands are available.
+If a match is found for the optional RE argument,
+the cursor is set to the start of the matching pattern.
+.sp
+.i "This command is not yet implemented."
+.SS
+.SP Line:
+Unchanged, unless the optional RE is specified, in which case it is
+set to the line where the matching pattern is found.
+.SP Options:
+Affected by the
+.OP open
+option.
+.SE
+.KY preserve
+.IP "pre[serve]"
+Save the file in a form that can later be recovered using the
+.CO ex
+.b \-r
+option.
+When the file is preserved, an email message is sent to the user.
+.SS
+.SP Line:
+Unchanged.
+.SP Options:
+None.
+.SE
+.KY previous
+.IP "prev[ious][!]"
+Edit the previous file from the argument list.
+The
+.CO previous
+command will fail if the file has been modified since the last complete
+write.
+This check can be overridden by appending the
+.QT !
+character to the command name.
+.SS
+.SP Line:
+Set as described for the
+.CO edit
+command.
+.SP Options:
+Affected by the options
+.OP autowrite
+and
+.OP writeany .
+None.
+.SE
+.KY print
+.IP "[range] p[rint] [count] [flags]"
+Display the specified lines.
+.SS
+.SP Line:
+Set to the last line displayed.
+.SP Options:
+None.
+.SE
+.KY put
+.IP "[line] pu[t] [buffer]"
+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.
+.SS
+.SP Line:
+Set to the line after the current line.
+.SP Options:
+None.
+.SE
+.KY quit
+.IP "q[uit][!]"
+End the editing session.
+If the file has been modified since the last complete write, the
+.CO quit
+command will fail.
+This check may be overridden by appending a
+.QT !
+character to the command.
+.sp
+If there are more files to edit, the
+.CO quit
+command will fail.
+Appending a
+.QT !
+character to the command name or entering two
+.CO quit
+commands (i.e.
+.CO wq ,
+.CO quit ,
+.CO xit
+or
+.CO ZZ )
+in a row) will override this check and the editor will exit.
+.SS
+.SP Line:
+Unchanged.
+.SP Options:
+None.
+.SE
+.KY read
+.IP "[line] r[ead][!] [file]"
+Read a file.
+A copy of the specified file is appended to the line.
+If
+.LI line
+is 0, the copy is inserted at the beginning of the file.
+If no file is specified, the current file is read; if there is no
+current file, then
+.LI file
+becomes the current file.
+If there is no current file and no
+.LI file
+is specified, then the
+.CO read
+command will fail.
+.sp
+If
+.LI file
+is preceded by a
+.QT !
+character,
+.LI file
+is treated as if it were a shell command, and passed to the program
+named by the
+.LI SHELL
+environment variable.
+The standard and standard error outputs of that command are read into
+the file after the specified line.
+The special meaning of the
+.QT !
+character can be overridden by escaping it with a backslash
+.PQ \e
+character.
+.SS
+.SP Line:
+When executed from
+.CO ex ,
+the current line is set to the last line read.
+When executed from
+.CO vi ,
+the current line is set to the first line read.
+.SP Options:
+None.
+.SE
+.KY recover
+.IP "rec[over] file"
+Recover
+.LI file
+if it was previously saved.
+If no saved file by that name exists, the
+.CO recover
+command behaves similarly to the
+.CO edit
+command.
+.SS
+.SP Line:
+Set as described for the
+.CO edit
+command.
+.SP Options:
+None.
+.SE
+.KY resize
+.IP "res[ize] [+|-]size"
+.CO Vi
+mode only.
+Grow or shrink the current screen.
+If
+.LI size
+is a positive, signed number, the current screen is grown by that many lines.
+If
+.LI size
+is a negative, signed number, the current screen is shrunk by that many lines.
+If
+.LI size
+is not signed, the current screen is set to the specified
+.LI size .
+Applicable only to split screens.
+.SS
+.SP Line:
+Unchanged.
+.SP Options:
+None.
+.SE
+.KY rewind
+.IP "rew[ind][!]"
+Rewind the argument list.
+If the current file has been modified since the last complete write,
+the
+.CO rewind
+command will fail.
+This check may be overridden by appending the
+.QT !
+character to the command.
+.sp
+Otherwise, the current file is set to the first file in the argument
+list.
+.SS
+.SP Line:
+Set as described for the
+.CO edit
+command.
+.SP Options:
+Affected by the
+.OP autowrite
+and
+.OP writeany
+options.
+.SE
+.KY set
+.IP "se[t] [option[=[value]] ...] [nooption ...] [option? ...] [all]"
+Display or set editor options.
+When no arguments are specified, the editor option
+.OP term ,
+and any editor options whose values have been changed from the
+default settings are displayed.
+If the argument
+.LI all
+is specified, the values of all of editor options are displayed.
+.sp
+Specifying an option name followed by the character
+.QT ?
+causes the current value of that option to be displayed.
+The
+.QT ?
+can be separated from the option name by whitespace characters.
+The
+.QT ?
+is necessary only for Boolean valued options.
+Boolean options can be given values by the form
+.QT "set option"
+to turn them on, or
+.QT "set nooption"
+to turn them off.
+String and numeric options can be assigned by the form
+.QT "set option=value" .
+Any whitespace characters in strings can be included literally by preceding
+each with a backslash.
+More than one option can be set or listed by a single set command,
+by specifying multiple arguments, each separated from the next by
+whitespace characters.
+.SS
+.SP Line:
+Unchanged.
+.SP Options:
+None.
+.SE
+.KY shell
+.IP "sh[ell]"
+Run a shell program.
+The program named by the
+.OP shell
+option is run with a
+.b \-i
+(for interactive) flag.
+Editing is resumed when that program exits.
+.SS
+.SP Line:
+Unchanged.
+.SP Options:
+None.
+.SE
+.KY source
+.IP "so[urce] file"
+Read and execute
+.CO ex
+commands from a file.
+.CO Source
+commands may be nested.
+.SS
+.SP Line:
+Unchanged.
+.SP Options:
+None.
+.SE
+.KY split
+.IP "sp[lit] [file ...]"
+.CO Vi
+mode only.
+Split the screen.
+The current screen is split into two screens, of approximately equal size.
+If the cursor is in the lower half of the screen, the screen will split
+up, i.e. the new screen will be above the old one.
+If the cursor is in the upper half of the screen, the new screen will be
+below the old one.
+.sp
+If
+.LI file
+is specified, the new screen is editing that file, otherwise, both
+screens are editing the same file, and changes in each will be
+be reflected in the other.
+The argument list for the new screen consists of the list of files
+specified as arguments to this command, or, the current pathname if
+no files are specified.
+.SS
+.SP Line:
+If
+.LI file
+is specified, set as for the
+.CO edit
+command, otherwise unchanged.
+.SP Options:
+None.
+.SE
+.KY substitute
+.IP "[range] s[ubstitute] [/pattern/replace/] [options] [count] [flags]"
+.KY &
+.Ip "[range] & [options] [count] [flags]"
+.KY ~
+.Ip "[range] ~ [options] [count] [flags]"
+Make substitutions.
+Replace the first instance of
+.LI pattern
+with the string
+.LI replace
+on the specified line(s).
+If the
+.QT /pattern/repl/
+argument is not specified, the
+.QT /pattern/repl/
+from the previous
+.CO substitute
+command is used.
+.sp
+If
+.LI options
+includes the letter
+.QT c
+(confirm), you will be prompted for confirmation before each replacement
+is done.
+An affirmative response (in English, a
+.QT y
+character) causes the replacement to be made.
+A quit response (in English, a
+.QT q
+character) causes the
+.CO substitute
+command to be terminated.
+Any other response causes the replacement not to be made, and the
+.CO substitute
+command continues.
+If
+.LI options
+includes the letter
+.QT g
+(global), all nonoverlapping instances of
+.LI pattern
+in the line are replaced.
+.sp
+The
+.CO &
+version of the command is the same as not specifying a pattern
+or replacement string to the
+.CO substitute
+command, and the
+.QT &
+is replaced by the pattern and replacement information from the
+previous substitute command.
+.sp
+The
+.CO ~
+version of the command is the same as
+.CO &
+and
+.CO s ,
+except that the search pattern used is the last RE used in
+.i any
+command, not necessarily the one used in the last
+.CO substitute
+command.
+.sp
+For example, in the sequence
+.ft C
+.(b
+s/red/blue/
+/green
+~
+.)b
+.ft R
+the
+.QT ~
+is equivalent to
+.QT s/green/blue/ .
+.sp
+The
+.CO substitute
+command may be interrupted, using the terminal interrupt character.
+All substitutions completed before the interrupt are retained.
+.SS
+.SP Line:
+Set to the last line upon which a substitution was made.
+.SP Options:
+None.
+.SE
+.KY suspend
+.IP "su[spend][!]"
+.KY stop
+.Ip "st[op][!]"
+.KY <control-Z>
+.Ip <control-Z>
+Suspend the edit session.
+Appending a
+.QT !
+character to these commands turns off the
+.OP autowrite
+option for the command.
+.SS
+.SP Line:
+Unchanged.
+.SP Options:
+Affected by the
+.OP autowrite
+option.
+.SE
+.KY tag
+.IP "ta[g][!] tagstring"
+Edit the file containing the specified tag.
+Search for the tagstring, which can be in a different file.
+If the tag is in a different file, then the new file is edited.
+If the current file has been modified since the last complete write,
+the
+.CO tag
+command will fail.
+This check can be overridden by appending the
+.QT !
+character to the command name.
+.sp
+The
+.CO tag
+command searches for
+.LI tagstring
+in the tags file(s) specified by the
+.Op tags
+option.
+(See
+.XR ctags 1
+for more information on tags files.)
+.SS
+.SP Line:
+Set to the line indicated by the tag.
+.SP Options:
+Affected by the
+.OP autowrite ,
+.OP taglength ,
+.OP tags
+and
+.OP writeany
+options.
+.SE
+.KY tagpop
+.IP "tagp[op][!] [file | number]"
+Pop to the specified tag in the tags stack.
+If neither
+.LI file
+or
+.LI number
+is specified, the
+.CO tagpop
+command pops to the most recent entry on the tags stack.
+If
+.LI file
+or
+.LI number
+is specified, the
+.CO tagpop
+command pops to the most recent entry in the tags stack for that file,
+or numbered entry in the tags stack, respectively.
+(See the
+.CO display
+command for information on displaying the tags stack.)
+.sp
+If the file has been modified since the last complete write, the
+.CO tagpop
+command will fail.
+This check may be overridden by appending a
+.QT !
+character to the command name.
+.SS
+.SP Line:
+Set to the line indicated by the tag.
+.SP Options:
+Affected by the
+.OP autowrite ,
+and
+.OP writeany
+options.
+.SE
+.KY tagtop
+.IP "tagt[op][!]"
+Pop to the least recent tag on the tags stack, clearing the tags stack.
+.sp
+If the file has been modified since the last complete write, the
+.CO tagpop
+command will fail.
+This check may be overridden by appending a
+.QT !
+character to the command name.
+.SS
+.SP Line:
+Set to the line indicated by the tag.
+.SP Options:
+Affected by the
+.OP autowrite ,
+and
+.OP writeany
+options.
+.SE
+.KY unabbrev
+.IP "una[bbrev] lhs"
+Delete an abbreviation.
+Delete
+.LI lhs
+from the current list of abbreviations.
+.SS
+.SP Line:
+Unchanged.
+.SP Options:
+None.
+.SE
+.KY undo
+.IP "u[ndo]"
+Undo the last change made to the file.
+Changes made by
+.CO global ,
+.CO v ,
+.CO visual
+and map sequences are considered a single command.
+If repeated, the
+.CO u
+command alternates between these two states, and is its own inverse.
+.SS
+.SP Line:
+Set to the last line modified by the command.
+.SP Options:
+None.
+.SE
+.KY unmap
+.IP "unm[ap][!] lhs"
+Unmap a mapped string.
+Delete the command mode map definition for
+.LI lhs .
+If a
+.QT !
+character is appended to the command name, delete the text input mode
+map definition instead.
+.SS
+.SP Line:
+Unchanged.
+.SP Options:
+None.
+.SE
+.KY version
+.IP "ve[rsion]"
+Display the version of the
+.CO ex/vi
+editor.
+.KY visual
+.IP "[line] vi[sual] [type] [count] [flags]"
+.CO Ex
+mode only.
+Enter
+.CO vi .
+The
+.LI type
+is optional, and can be
+.QT \- ,
+.QT +
+or
+.QT ^ ,
+as in the
+.CO ex
+.CO z
+command, to specify the the position of the specified line in the screen
+window.
+(The default is to place the line at the top of the screen window.)
+A
+.LI count
+specifies the number of lines that will initially be displayed.
+(The default is the value of the
+.OP window
+editor option.)
+.SS
+.SP Line:
+Unchanged unless
+.LI line
+is specified, in which case it is set to that line.
+.SP Options:
+None.
+.SE
+.KY visual
+.IP "vi[sual][!] [+cmd] [file]"
+.CO Vi
+mode only.
+Edit a new file.
+Identical to the
+.QT "edit[!] [+cmd] [file]"
+command.
+.KY viusage
+.IP "viu[sage] [command]"
+Display usage for a
+.CO vi
+command.
+If
+.LI command
+is specified, a usage statement for that command is displayed.
+Otherwise, usage statements for all
+.CO vi
+commands are displayed.
+.SS
+.SP Line:
+Unchanged.
+.SP Options:
+None.
+.SE
+.KY write
+.IP "[range] w[rite][!] [>>] [file]"
+.Ip "[range] w[rite] [!] [file]"
+.KY wn
+.Ip "[range] wn[!] [>>] [file]"
+.KY wq
+.Ip "[range] wq[!] [>>] [file]"
+Write the file.
+The specified lines (the entire file, if no range is given) is written
+to
+.LI file .
+If
+.LI file
+is not specified, the current pathname is used.
+If
+.LI file
+is specified, and it exists, or if the current pathname was set using the
+.CO file
+command, and the file already exists, these commands will fail.
+Appending a
+.QT !
+character to the command name will override this check and the write
+will be attempted, regardless.
+.sp
+Specifying the optional
+.QT >>
+string will cause the write to be appended to the file, in which case
+no tests are made for the file already existing.
+.sp
+If the file is preceded by a
+.QT !
+character, the program named in the SHELL environment variable is
+invoked with file as its second argument, and the specified lines
+are passed as standard input to that command.
+The
+.QT !
+in this usage must be separated from command name by at least one
+whitespace character.
+The special meaning of the
+.QT !
+may be overridden by escaping it with a backslash
+.PQ \e
+character.
+.sp
+The
+.CO wq
+version of the write command will exit the editor after writing the file,
+if there are no further files to edit.
+Appending a
+.QT !
+character to the command name or entering two
+.QQ quit
+commands (i.e.
+.CO wq ,
+.CO quit ,
+.CO xit
+or
+.CO ZZ )
+in a row) will override this check and the editor will exit,
+ignoring any files that have not yet been edited.
+.sp
+The
+.CO wn
+version of the write command will move to the next file after writing
+the file, unless the write fails.
+.SS
+.SP Line:
+Unchanged.
+.SP Options:
+Affected by the
+.OP readonly
+and
+.OP writeany
+options.
+.SE
+.KY xit
+.IP "[range] x[it][!] [file]"
+Write the file if it has been modified.
+The specified lines are written to
+.LI file ,
+if the file has been modified since the last complete write to any
+file.
+If no
+.LI range
+is specified, the entire file is written.
+.sp
+The
+.CO xit
+command will exit the editor after writing the file,
+if there are no further files to edit.
+Appending a
+.QT !
+character to the command name or entering two
+.QQ quit
+commands (i.e.
+.CO wq ,
+.CO quit ,
+.CO xit
+or
+.CO ZZ )
+in a row) will override this check and the editor will exit,
+ignoring any files that have not yet been edited.
+.SS
+.SP Line:
+Unchanged.
+.SP Options:
+Affected by the
+.OP readonly
+and
+.OP writeany
+options.
+.SE
+.KY yank
+.IP "[range] ya[nk] [buffer] [count]"
+Copy the specified lines to a buffer.
+If no buffer is specified, the unnamed buffer is used.
+.SS
+.SP Line:
+Unchanged.
+.SP Options:
+None.
+.SE
+.KY z
+.IP "[line] z [type] [count] [flags]"
+Adjust the window.
+If no
+.LI type
+is specified, then
+.LI count
+lines following the specified line are displayed.
+The default
+.LI count
+is the value of the
+.OP window
+option.
+The
+.LI type
+argument changes the position at which
+.LI line
+is displayed on the screen by changing the number of lines
+displayed before and after
+.LI line .
+The following
+.LI type
+characters may be used:
+.SS
+.SP \-
+Place the line at the bottom of the screen.
+.SP +
+Place the line at the top of the screen.
+.SP \&.
+Place the line in the middle of the screen.
+.SP ^
+Write out count lines starting
+.LI "count * 2"
+lines before
+.LI line ;
+the net effect of this is that a
+.QT z^
+command following a
+.CO z
+command writes the previous page.
+.SP =
+Center
+.LI 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.
+.SE
+.SS
+.SP Line:
+Set to the last line displayed, with the exception of the
+.Dq Li \&=
+.LI type ,
+where the current line is set to the line specified by the command.
+.SP Options:
+Affected by the
+.Sy window
+option.
+.SE
diff --git a/usr.bin/vi/USD.doc/vi.ref/merge.awk b/usr.bin/vi/USD.doc/vi.ref/merge.awk
new file mode 100644
index 000000000000..16b51520a778
--- /dev/null
+++ b/usr.bin/vi/USD.doc/vi.ref/merge.awk
@@ -0,0 +1,16 @@
+# @(#)merge.awk 8.3 (Berkeley) 5/26/94
+#
+# merge index entries into one line per label
+$1 == prev {
+ printf ", %s", $2;
+ next;
+}
+{
+ if (NR != 1)
+ printf "\n";
+ printf "%s \t%s", $1, $2;
+ prev = $1;
+}
+END {
+ printf "\n"
+}
diff --git a/usr.bin/vi/USD.doc/vi.ref/paper.ps b/usr.bin/vi/USD.doc/vi.ref/paper.ps
new file mode 100644
index 000000000000..e429d56ba11f
--- /dev/null
+++ b/usr.bin/vi/USD.doc/vi.ref/paper.ps
@@ -0,0 +1,30924 @@
+%!PS-Adobe-1.0
+%%Creator: python.bostic.com:root (Charlie,458E,7750)
+%%Title: stdin (ditroff)
+%%CreationDate: Mon Aug 15 14:24:12 1994
+%%EndComments
+% @(#)psdit.pro 1.6 11/6/90
+% lib/psdit.pro -- prolog for psdit (ditroff) files
+% Copyright (c) 1984, 1985 Adobe Systems Incorporated. All Rights Reserved.
+% last edit: shore Sat Nov 23 20:28:03 1985
+% RCSID: $Header: psdit.pro,v 2.1 85/11/24 12:19:43 shore Rel $
+
+% Changed by Edward Wang (edward@ucbarpa.berkeley.edu) to handle graphics,
+% 17 Feb, 87.
+
+/$DITroff 140 dict def $DITroff begin
+/fontnum 1 def /fontsize 10 def /fontheight 10 def /fontslant 0 def
+/xi{0 72 11 mul translate 72 resolution div dup neg scale 0 0 moveto
+ /fontnum 1 def /fontsize 10 def /fontheight 10 def /fontslant 0 def F}def
+/PB{save /psv exch def currentpoint translate
+ resolution 72 div dup neg scale 0 0 moveto}def
+/PE{psv restore}def
+/arctoobig 90 def /arctoosmall .05 def
+/m1 matrix def /m2 matrix def /m3 matrix def /oldmat matrix def
+/tan{dup sin exch cos div}def
+/point{resolution 72 div mul}def
+/dround {transform round exch round exch itransform}def
+/xT{/devname exch def}def
+/xr{/mh exch def /my exch def /resolution exch def}def
+/xp{}def
+/xs{docsave restore end}def
+/xt{}def
+/xf{/fontname exch def /slotno exch def fontnames slotno get fontname eq not
+ {fonts slotno fontname findfont put fontnames slotno fontname put}if}def
+/xH{/fontheight exch def F}def
+/xS{/fontslant exch def F}def
+/s{/fontsize exch def /fontheight fontsize def F}def
+/f{/fontnum exch def F}def
+/F{fontheight 0 le{/fontheight fontsize def}if
+ fonts fontnum get fontsize point 0 0 fontheight point neg 0 0 m1 astore
+ fontslant 0 ne{1 0 fontslant tan 1 0 0 m2 astore m3 concatmatrix}if
+ makefont setfont .04 fontsize point mul 0 dround pop setlinewidth}def
+/X{exch currentpoint exch pop moveto show}def
+/N{3 1 roll moveto show}def
+/Y{exch currentpoint pop exch moveto show}def
+/S{show}def
+/ditpush{}def/ditpop{}def
+/AX{3 -1 roll currentpoint exch pop moveto 0 exch ashow}def
+/AN{4 2 roll moveto 0 exch ashow}def
+/AY{3 -1 roll currentpoint pop exch moveto 0 exch ashow}def
+/AS{0 exch ashow}def
+/MX{currentpoint exch pop moveto}def
+/MY{currentpoint pop exch moveto}def
+/MXY{moveto}def
+/cb{pop}def % action on unknown char -- nothing for now
+/n{}def/w{}def
+/p{pop showpage xi}def
+/Dt{/Dlinewidth exch def}def 1 Dt
+/Ds{/Ddash exch def}def -1 Ds
+/i{/Dstipple exch def}def 1 i
+/Dsetlinewidth{2 Dlinewidth mul setlinewidth}def
+/Dsetdash{Ddash 4 eq{[8 12]}{Ddash 16 eq{[32 36]}
+ {Ddash 20 eq{[32 12 8 12]}{[]}ifelse}ifelse}ifelse 0 setdash}def
+/Dstroke{gsave Dsetlinewidth Dsetdash 1 setlinecap stroke grestore
+ currentpoint newpath moveto}def
+/Dl{rlineto Dstroke}def
+/arcellipse{/diamv exch def /diamh exch def oldmat currentmatrix pop
+ currentpoint translate 1 diamv diamh div scale /rad diamh 2 div def
+ currentpoint exch rad add exch rad -180 180 arc oldmat setmatrix}def
+/Dc{dup arcellipse Dstroke}def
+/De{arcellipse Dstroke}def
+/Da{/endv exch def /endh exch def /centerv exch def /centerh exch def
+ /cradius centerv centerv mul centerh centerh mul add sqrt def
+ /eradius endv endv mul endh endh mul add sqrt def
+ /endang endv endh atan def
+ /startang centerv neg centerh neg atan def
+ /sweep startang endang sub dup 0 lt{360 add}if def
+ sweep arctoobig gt
+ {/midang startang sweep 2 div sub def /midrad cradius eradius add 2 div def
+ /midh midang cos midrad mul def /midv midang sin midrad mul def
+ midh neg midv neg endh endv centerh centerv midh midv Da
+ Da}
+ {sweep arctoosmall ge
+ {/controldelt 1 sweep 2 div cos sub 3 sweep 2 div sin mul div 4 mul def
+ centerv neg controldelt mul centerh controldelt mul
+ endv neg controldelt mul centerh add endh add
+ endh controldelt mul centerv add endv add
+ centerh endh add centerv endv add rcurveto Dstroke}
+ {centerh endh add centerv endv add rlineto Dstroke}
+ ifelse}
+ ifelse}def
+/Dpatterns[
+[%cf[widthbits]
+[8<0000000000000010>]
+[8<0411040040114000>]
+[8<0204081020408001>]
+[8<0000103810000000>]
+[8<6699996666999966>]
+[8<0000800100001008>]
+[8<81c36666c3810000>]
+[8<0f0e0c0800000000>]
+[8<0000000000000010>]
+[8<0411040040114000>]
+[8<0204081020408001>]
+[8<0000001038100000>]
+[8<6699996666999966>]
+[8<0000800100001008>]
+[8<81c36666c3810000>]
+[8<0f0e0c0800000000>]
+[8<0042660000246600>]
+[8<0000990000990000>]
+[8<0804020180402010>]
+[8<2418814242811824>]
+[8<6699996666999966>]
+[8<8000000008000000>]
+[8<00001c3e363e1c00>]
+[8<0000000000000000>]
+[32<00000040000000c00000004000000040000000e0000000000000000000000000>]
+[32<00000000000060000000900000002000000040000000f0000000000000000000>]
+[32<000000000000000000e0000000100000006000000010000000e0000000000000>]
+[32<00000000000000002000000060000000a0000000f00000002000000000000000>]
+[32<0000000e0000000000000000000000000000000f000000080000000e00000001>]
+[32<0000090000000600000000000000000000000000000007000000080000000e00>]
+[32<00010000000200000004000000040000000000000000000000000000000f0000>]
+[32<0900000006000000090000000600000000000000000000000000000006000000>]]
+[%ug
+[8<0000020000000000>]
+[8<0000020000002000>]
+[8<0004020000002000>]
+[8<0004020000402000>]
+[8<0004060000402000>]
+[8<0004060000406000>]
+[8<0006060000406000>]
+[8<0006060000606000>]
+[8<00060e0000606000>]
+[8<00060e000060e000>]
+[8<00070e000060e000>]
+[8<00070e000070e000>]
+[8<00070e020070e000>]
+[8<00070e020070e020>]
+[8<04070e020070e020>]
+[8<04070e024070e020>]
+[8<04070e064070e020>]
+[8<04070e064070e060>]
+[8<06070e064070e060>]
+[8<06070e066070e060>]
+[8<06070f066070e060>]
+[8<06070f066070f060>]
+[8<060f0f066070f060>]
+[8<060f0f0660f0f060>]
+[8<060f0f0760f0f060>]
+[8<060f0f0760f0f070>]
+[8<0e0f0f0760f0f070>]
+[8<0e0f0f07e0f0f070>]
+[8<0e0f0f0fe0f0f070>]
+[8<0e0f0f0fe0f0f0f0>]
+[8<0f0f0f0fe0f0f0f0>]
+[8<0f0f0f0ff0f0f0f0>]
+[8<1f0f0f0ff0f0f0f0>]
+[8<1f0f0f0ff1f0f0f0>]
+[8<1f0f0f8ff1f0f0f0>]
+[8<1f0f0f8ff1f0f0f8>]
+[8<9f0f0f8ff1f0f0f8>]
+[8<9f0f0f8ff9f0f0f8>]
+[8<9f0f0f9ff9f0f0f8>]
+[8<9f0f0f9ff9f0f0f9>]
+[8<9f8f0f9ff9f0f0f9>]
+[8<9f8f0f9ff9f8f0f9>]
+[8<9f8f1f9ff9f8f0f9>]
+[8<9f8f1f9ff9f8f1f9>]
+[8<bf8f1f9ff9f8f1f9>]
+[8<bf8f1f9ffbf8f1f9>]
+[8<bf8f1fdffbf8f1f9>]
+[8<bf8f1fdffbf8f1fd>]
+[8<ff8f1fdffbf8f1fd>]
+[8<ff8f1fdffff8f1fd>]
+[8<ff8f1ffffff8f1fd>]
+[8<ff8f1ffffff8f1ff>]
+[8<ff9f1ffffff8f1ff>]
+[8<ff9f1ffffff9f1ff>]
+[8<ff9f9ffffff9f1ff>]
+[8<ff9f9ffffff9f9ff>]
+[8<ffbf9ffffff9f9ff>]
+[8<ffbf9ffffffbf9ff>]
+[8<ffbfdffffffbf9ff>]
+[8<ffbfdffffffbfdff>]
+[8<ffffdffffffbfdff>]
+[8<ffffdffffffffdff>]
+[8<fffffffffffffdff>]
+[8<ffffffffffffffff>]]
+[%mg
+[8<8000000000000000>]
+[8<0822080080228000>]
+[8<0204081020408001>]
+[8<40e0400000000000>]
+[8<66999966>]
+[8<8001000010080000>]
+[8<81c36666c3810000>]
+[8<f0e0c08000000000>]
+[16<07c00f801f003e007c00f800f001e003c007800f001f003e007c00f801f003e0>]
+[16<1f000f8007c003e001f000f8007c003e001f800fc007e003f001f8007c003e00>]
+[8<c3c300000000c3c3>]
+[16<0040008001000200040008001000200040008000000100020004000800100020>]
+[16<0040002000100008000400020001800040002000100008000400020001000080>]
+[16<1fc03fe07df0f8f8f07de03fc01f800fc01fe03ff07df8f87df03fe01fc00f80>]
+[8<80>]
+[8<8040201000000000>]
+[8<84cc000048cc0000>]
+[8<9900009900000000>]
+[8<08040201804020100800020180002010>]
+[8<2418814242811824>]
+[8<66999966>]
+[8<8000000008000000>]
+[8<70f8d8f870000000>]
+[8<0814224180402010>]
+[8<aa00440a11a04400>]
+[8<018245aa45820100>]
+[8<221c224180808041>]
+[8<88000000>]
+[8<0855800080550800>]
+[8<2844004482440044>]
+[8<0810204080412214>]
+[8<00>]]]def
+/Dfill{
+ save 6 1 roll
+ transform /maxy exch def /maxx exch def
+ transform /miny exch def /minx exch def
+ minx maxx gt{/minx maxx /maxx minx def def}if
+ miny maxy gt{/miny maxy /maxy miny def def}if
+ Dpatterns Dstipple 1 sub get exch 1 sub get
+ aload pop /stip exch def /stipw exch def /stiph 128 def
+ /imatrix[stipw 0 0 stiph 0 0]def
+ /tmatrix[stipw 0 0 stiph 0 0]def
+ /minx minx cvi stiph idiv stiph mul def
+ /miny miny cvi stipw idiv stipw mul def
+ eoclip 0 setgray
+ miny stiph maxy{
+ tmatrix exch 5 exch put
+ minx stipw maxx{
+ tmatrix exch 4 exch put tmatrix setmatrix
+ stipw stiph true imatrix {stip} imagemask
+ }for
+ }for
+ restore
+}def
+/Dp{Dfill Dstroke}def
+/DP{Dfill currentpoint newpath moveto}def
+end
+
+/ditstart{$DITroff begin
+ /nfonts 60 def % NFONTS makedev/ditroff dependent!
+ /fonts[nfonts{0}repeat]def
+ /fontnames[nfonts{()}repeat]def
+/docsave save def
+}def
+
+% character outcalls
+/oc{
+ /pswid exch def /cc exch def /name exch def
+ /ditwid pswid fontsize mul resolution mul 72000 div def
+ /ditsiz fontsize resolution mul 72 div def
+ ocprocs name known{ocprocs name get exec}{name cb}ifelse
+}def
+/fractm [.65 0 0 .6 0 0] def
+/fraction{
+ /fden exch def /fnum exch def gsave /cf currentfont def
+ cf fractm makefont setfont 0 .3 dm 2 copy neg rmoveto
+ fnum show rmoveto currentfont cf setfont(\244)show setfont fden show
+ grestore ditwid 0 rmoveto
+}def
+/oce{grestore ditwid 0 rmoveto}def
+/dm{ditsiz mul}def
+/ocprocs 50 dict def ocprocs begin
+(14){(1)(4)fraction}def
+(12){(1)(2)fraction}def
+(34){(3)(4)fraction}def
+(13){(1)(3)fraction}def
+(23){(2)(3)fraction}def
+(18){(1)(8)fraction}def
+(38){(3)(8)fraction}def
+(58){(5)(8)fraction}def
+(78){(7)(8)fraction}def
+(sr){gsave 0 .06 dm rmoveto(\326)show oce}def
+(is){gsave 0 .15 dm rmoveto(\362)show oce}def
+(->){gsave 0 .02 dm rmoveto(\256)show oce}def
+(<-){gsave 0 .02 dm rmoveto(\254)show oce}def
+(==){gsave 0 .05 dm rmoveto(\272)show oce}def
+(uc){gsave currentpoint 400 .009 dm mul add translate
+ 8 -8 scale ucseal oce}def
+end
+
+% an attempt at a PostScript FONT to implement ditroff special chars
+% this will enable us to
+% cache the little buggers
+% generate faster, more compact PS out of psdit
+% confuse everyone (including myself)!
+50 dict dup begin
+/FontType 3 def
+/FontName /DIThacks def
+/FontMatrix [.001 0 0 .001 0 0] def
+/FontBBox [-260 -260 900 900] def% a lie but ...
+/Encoding 256 array def
+0 1 255{Encoding exch /.notdef put}for
+Encoding
+ dup 8#040/space put %space
+ dup 8#110/rc put %right ceil
+ dup 8#111/lt put %left top curl
+ dup 8#112/bv put %bold vert
+ dup 8#113/lk put %left mid curl
+ dup 8#114/lb put %left bot curl
+ dup 8#115/rt put %right top curl
+ dup 8#116/rk put %right mid curl
+ dup 8#117/rb put %right bot curl
+ dup 8#120/rf put %right floor
+ dup 8#121/lf put %left floor
+ dup 8#122/lc put %left ceil
+ dup 8#140/sq put %square
+ dup 8#141/bx put %box
+ dup 8#142/ci put %circle
+ dup 8#143/br put %box rule
+ dup 8#144/rn put %root extender
+ dup 8#145/vr put %vertical rule
+ dup 8#146/ob put %outline bullet
+ dup 8#147/bu put %bullet
+ dup 8#150/ru put %rule
+ dup 8#151/ul put %underline
+ pop
+/DITfd 100 dict def
+/BuildChar{0 begin
+ /cc exch def /fd exch def
+ /charname fd /Encoding get cc get def
+ /charwid fd /Metrics get charname get def
+ /charproc fd /CharProcs get charname get def
+ charwid 0 fd /FontBBox get aload pop setcachedevice
+ 2 setlinejoin 40 setlinewidth
+ newpath 0 0 moveto gsave charproc grestore
+ end}def
+/BuildChar load 0 DITfd put
+/CharProcs 50 dict def
+CharProcs begin
+/space{}def
+/.notdef{}def
+/ru{500 0 rls}def
+/rn{0 840 moveto 500 0 rls}def
+/vr{0 800 moveto 0 -770 rls}def
+/bv{0 800 moveto 0 -1000 rls}def
+/br{0 840 moveto 0 -1000 rls}def
+/ul{0 -140 moveto 500 0 rls}def
+/ob{200 250 rmoveto currentpoint newpath 200 0 360 arc closepath stroke}def
+/bu{200 250 rmoveto currentpoint newpath 200 0 360 arc closepath fill}def
+/sq{80 0 rmoveto currentpoint dround newpath moveto
+ 640 0 rlineto 0 640 rlineto -640 0 rlineto closepath stroke}def
+/bx{80 0 rmoveto currentpoint dround newpath moveto
+ 640 0 rlineto 0 640 rlineto -640 0 rlineto closepath fill}def
+/ci{500 360 rmoveto currentpoint newpath 333 0 360 arc
+ 50 setlinewidth stroke}def
+
+/lt{0 -200 moveto 0 550 rlineto currx 800 2cx s4 add exch s4 a4p stroke}def
+/lb{0 800 moveto 0 -550 rlineto currx -200 2cx s4 add exch s4 a4p stroke}def
+/rt{0 -200 moveto 0 550 rlineto currx 800 2cx s4 sub exch s4 a4p stroke}def
+/rb{0 800 moveto 0 -500 rlineto currx -200 2cx s4 sub exch s4 a4p stroke}def
+/lk{0 800 moveto 0 300 -300 300 s4 arcto pop pop 1000 sub
+ 0 300 4 2 roll s4 a4p 0 -200 lineto stroke}def
+/rk{0 800 moveto 0 300 s2 300 s4 arcto pop pop 1000 sub
+ 0 300 4 2 roll s4 a4p 0 -200 lineto stroke}def
+/lf{0 800 moveto 0 -1000 rlineto s4 0 rls}def
+/rf{0 800 moveto 0 -1000 rlineto s4 neg 0 rls}def
+/lc{0 -200 moveto 0 1000 rlineto s4 0 rls}def
+/rc{0 -200 moveto 0 1000 rlineto s4 neg 0 rls}def
+end
+
+/Metrics 50 dict def Metrics begin
+/.notdef 0 def
+/space 500 def
+/ru 500 def
+/br 0 def
+/lt 416 def
+/lb 416 def
+/rt 416 def
+/rb 416 def
+/lk 416 def
+/rk 416 def
+/rc 416 def
+/lc 416 def
+/rf 416 def
+/lf 416 def
+/bv 416 def
+/ob 350 def
+/bu 350 def
+/ci 750 def
+/bx 750 def
+/sq 750 def
+/rn 500 def
+/ul 500 def
+/vr 0 def
+end
+
+DITfd begin
+/s2 500 def /s4 250 def /s3 333 def
+/a4p{arcto pop pop pop pop}def
+/2cx{2 copy exch}def
+/rls{rlineto stroke}def
+/currx{currentpoint pop}def
+/dround{transform round exch round exch itransform} def
+end
+end
+/DIThacks exch definefont pop
+ditstart
+(psc)xT
+576 1 1 xr
+1(Times-Roman)xf 1 f
+2(Times-Italic)xf 2 f
+3(Times-Bold)xf 3 f
+4(Times-BoldItalic)xf 4 f
+5(Helvetica)xf 5 f
+6(Helvetica-Bold)xf 6 f
+7(Courier)xf 7 f
+8(Courier-Bold)xf 8 f
+9(Symbol)xf 9 f
+10(DIThacks)xf 10 f
+10 s
+1 f
+xi
+%%EndProlog
+
+%%Page: 1 1
+10 s 10 xH 0 xS 1 f 1 i
+3 f
+12 s
+1796 795(Ex/Vi)N
+2055(Reference)X
+2491(Manual)X
+2 f
+10 s
+2107 975(Keith)N
+2300(Bostic)X
+1 f
+1861 1155(Computer)N
+2201(Science)X
+2471(Division)X
+1328 1245(Department)N
+1727(of)X
+1814(Electrical)X
+2142(Engineering)X
+2554(and)X
+2690(Computer)X
+3030(Science)X
+1754 1335(University)N
+2112(of)X
+2199(California,)X
+2564(Berkeley)X
+1856 1425(Berkeley,)N
+2186(California)X
+2551(94720)X
+2038 1605(August)N
+2289(15,)X
+2409(1994)X
+2 f
+2168 1965(Abstract)N
+1 f
+776 2244(This)N
+948(document)X
+1294(is)X
+1377(the)X
+1505 0.4531(reference)AX
+1836(guide)X
+2045(for)X
+2170(the)X
+2299(4.4BSD)X
+2585(implementations)X
+3149(of)X
+3 f
+3247(nex)X
+1 f
+(/)S
+3 f
+3389(nvi)X
+1 f
+3495(,)X
+3546(which)X
+3773(are)X
+576 2334(reimplementations)N
+1192(of)X
+1279(the)X
+1397(historic)X
+1657(Berkeley)X
+3 f
+1967(ex)X
+1 f
+2043(/)X
+3 f
+2065(vi)X
+1 f
+2147(editors.)X
+2 f
+1996 2778(Acknowledgements)N
+1 f
+776 3063(Bruce)N
+1005(Englar)X
+1256(encouraged)X
+1664(the)X
+1799(early)X
+1997(development)X
+2448(of)X
+2552(the)X
+2687(historic)X
+3 f
+2965(ex)X
+1 f
+3041(/)X
+3 f
+3063(vi)X
+1 f
+3163(editor.)X
+3428(Peter)X
+3631(Kessler)X
+576 3153(helped)N
+811(bring)X
+1001(sanity)X
+1213(to)X
+1296(version)X
+1553(2's)X
+1672(command)X
+2009(layout.)X
+2270(Bill)X
+2410(Joy)X
+2541(wrote)X
+2744(versions)X
+3031(1)X
+3091(and)X
+3227(2.0)X
+3347(through)X
+3616(2.7,)X
+3756(and)X
+576 3243(created)N
+842(the)X
+973(framework)X
+1359(that)X
+1512(users)X
+1710(see)X
+1846(in)X
+1941(the)X
+2072(present)X
+2337(editor.)X
+2597(Mark)X
+2804(Horton)X
+3065(added)X
+3291(macros)X
+3557(and)X
+3707(other)X
+576 3333(features)N
+851(and)X
+987(made)X
+3 f
+1181(ex)X
+1 f
+1257(/)X
+3 f
+1279(vi)X
+1 f
+1361(work)X
+1546(on)X
+1646(a)X
+1702(large)X
+1883(number)X
+2148(of)X
+2235(terminals)X
+2553(and)X
+2689(Unix)X
+2869(systems.)X
+3 f
+776 3456(Nvi)N
+1 f
+918(is)X
+993(originally)X
+1326(derived)X
+1589(from)X
+1767(software)X
+2066(contributed)X
+2454(to)X
+2539(the)X
+2660(University)X
+3021(of)X
+3111(California,)X
+3479(Berkeley)X
+3792(by)X
+576 3546(Steve)N
+774(Kirkendall,)X
+1157(the)X
+1275(author)X
+1500(of)X
+1587(the)X
+3 f
+1705(vi)X
+1 f
+1787(clone)X
+3 f
+1981(elvis)X
+1 f
+2132(.)X
+776 3669(IEEE)N
+992(Standard)X
+1319(Portable)X
+1628(Operating)X
+1991(System)X
+2268(Interface)X
+2597(for)X
+2733(Computer)X
+3095(Environments)X
+3587(\(POSIX\))X
+576 3759(1003.2)N
+816(style)X
+987(Regular)X
+1261(Expression)X
+1637(support)X
+1897(was)X
+2042(done)X
+2218(by)X
+2318(Henry)X
+2539(Spencer.)X
+776 3882(The)N
+930(curses)X
+1161(library)X
+1405(was)X
+1560(originally)X
+1901(done)X
+2087(by)X
+2197(Ken)X
+2361(Arnold.)X
+2658(Scrolling)X
+2981(and)X
+3127(reworking)X
+3487(for)X
+3 f
+3611(nvi)X
+1 f
+3747(was)X
+576 3972(done)N
+752(by)X
+852(Elan)X
+1019(Amir.)X
+776 4095(The)N
+923(Institute)X
+1207(of)X
+1296(Electrical)X
+1626(and)X
+1764(Electronics)X
+2147(Engineers)X
+2490(has)X
+2619(given)X
+2820(us)X
+2914(permission)X
+3288(to)X
+3373(reprint)X
+3610(portions)X
+576 4185(of)N
+682(their)X
+868(documentation.)X
+1423(Portions)X
+1728(of)X
+1834(this)X
+1987(document)X
+2341(are)X
+2478(reprinted)X
+2806(and)X
+2960(reproduced)X
+3360(from)X
+3554(IEEE)X
+3766(Std)X
+576 4275(1003.2-1992,)N
+1031(IEEE)X
+1233(Standard)X
+1546(Portable)X
+1841(Operating)X
+2190(System)X
+2453(Interface)X
+2768(for)X
+2890(Computer)X
+3238(Environments)X
+3716(\(PO-)X
+576 4365(SIX\),)N
+772(copyright)X
+1099(1992)X
+1279(by)X
+1379(the)X
+1497(Institute)X
+1779(of)X
+1866(Electrical)X
+2194(and)X
+2330(Electronics)X
+2711(Engineers,)X
+3072(Inc.)X
+776 4488(The)N
+921(\256nancial)X
+1217(support)X
+1477(of)X
+1564(UUNET)X
+1856(Communications)X
+2422(Services)X
+2714(is)X
+2787(gratefully)X
+3119(acknowledged.)X
+
+3 p
+%%Page: 3 2
+10 s 10 xH 0 xS 1 f 1 i
+3 f
+576 474(Nvi/Nex)N
+872 0.3906(Reference)AX
+3698(USD:13-3)X
+576 762(1.)N
+676(Description)X
+1 f
+3 f
+776 885(Vi)N
+1 f
+876(is)X
+949(a)X
+1005(screen)X
+1231(oriented)X
+1514(text)X
+1654(editor.)X
+3 f
+1902(Ex)X
+1 f
+2016(is)X
+2090(a)X
+2147(line-oriented)X
+2578(text)X
+2719(editor.)X
+3 f
+2967(Ex)X
+1 f
+3081(and)X
+3 f
+3218(vi)X
+1 f
+3301(are)X
+3421(different)X
+3719(interfaces)X
+576 975(to)N
+674(the)X
+808(same)X
+1009(program,)X
+1336(and)X
+1487(it)X
+1566(is)X
+1654(possible)X
+1951(to)X
+2048(switch)X
+2292(back)X
+2479(and)X
+2630(forth)X
+2821(during)X
+3065(an)X
+3176(edit)X
+3331(session.)X
+3 f
+3637(View)X
+1 f
+3846(is)X
+3934(the)X
+576 1065(equivalent)N
+930(of)X
+1017(using)X
+1210(the)X
+3 f
+9 f
+1328(-)X
+1330(-)X
+3 f
+1374(R)X
+1 f
+1452(\(read-only\))X
+1834(option)X
+2058(of)X
+3 f
+2145(vi)X
+1 f
+2207(.)X
+776 1188(This)N
+957 0.4531(reference)AX
+1297(manual)X
+1572(is)X
+1664(the)X
+1801(one)X
+1956(provided)X
+2280(with)X
+2461(the)X
+3 f
+2598(nex)X
+1 f
+(/)S
+3 f
+2740(nvi)X
+1 f
+2885(versions)X
+3191(of)X
+3297(the)X
+3 f
+3434(ex)X
+1 f
+3510(/)X
+3 f
+3532(vi)X
+1 f
+3634(text)X
+3794(editors.)X
+3 f
+576 1278(Nex)N
+1 f
+710(/)X
+3 f
+732(nvi)X
+1 f
+868(are)X
+997(intended)X
+1302(as)X
+1398(bug-for-bug)X
+1815(compatible)X
+2200(replacements)X
+2653(for)X
+2776(the)X
+2903(original)X
+3181(Fourth)X
+3423(Berkeley)X
+3742(Software)X
+576 1368(Distribution)N
+987(\(4BSD\))X
+3 f
+1261(ex)X
+1 f
+1337(/)X
+3 f
+1359(vi)X
+1 f
+1446(programs.)X
+1814(This)X
+1981 0.4531(reference)AX
+2307(manual)X
+2568(is)X
+2646(accompanied)X
+3095(by)X
+3201(a)X
+3263(traditional-style)X
+3796(manual)X
+576 1458(page.)N
+798(That)X
+975(manual)X
+1241(page)X
+1423(describes)X
+1752(the)X
+1880(functionality)X
+2319(found)X
+2536(in)X
+3 f
+2627(ex)X
+1 f
+2703(/)X
+3 f
+2725(vi)X
+1 f
+2816(in)X
+2907(far)X
+3026(less)X
+3175(detail)X
+3382(than)X
+3549(the)X
+3676(description)X
+576 1548(here.)N
+781(In)X
+874(addition,)X
+1182(it)X
+1252(describes)X
+1578(the)X
+1703(system)X
+1952(interface)X
+2261(to)X
+3 f
+2350(ex)X
+1 f
+2426(/)X
+3 f
+2448(vi)X
+1 f
+2510(,)X
+2557(e.g.)X
+2700(command)X
+3043(line)X
+3190(options,)X
+3472(session)X
+3730(recovery,)X
+576 1638(signals,)N
+838(environmental)X
+1321(variables,)X
+1651(and)X
+1787(similar)X
+2029(things.)X
+776 1761(This)N
+939 0.4531(reference)AX
+1261(is)X
+1336(intended)X
+1634(for)X
+1750(users)X
+1937(already)X
+2196(familiar)X
+2472(with)X
+3 f
+2636(ex)X
+1 f
+2712(/)X
+3 f
+2734(vi)X
+1 f
+2796(.)X
+2858(Anyone)X
+3134(else)X
+3281(should)X
+3516(almost)X
+3751(certainly)X
+576 1851(read)N
+737(a)X
+795(good)X
+977(tutorial)X
+1230(on)X
+1332(the)X
+1452(editor)X
+1661(\256rst.)X
+1847(If)X
+1923(you)X
+2065(are)X
+2186(in)X
+2270(an)X
+2368(unfamiliar)X
+2723(environment,)X
+3169(and)X
+3306(you)X
+3447(absolutely)X
+3797(have)X
+3970(to)X
+576 1941(get)N
+702(work)X
+895(done)X
+1079(immediately,)X
+1527(see)X
+1658(the)X
+1784(section)X
+2039(entitled)X
+2308(``)X
+3 f
+2362(Fast)X
+2538(Startup)X
+1 f
+2800('')X
+2883(in)X
+2974(the)X
+3101(manual)X
+3366(page.)X
+3587(It)X
+3665(is)X
+3747(probably)X
+576 2031(enough)N
+832(to)X
+914(get)X
+1032(you)X
+1172(started.)X
+776 2154(There)N
+984(are)X
+1103(a)X
+1159(few)X
+1300(features)X
+1575(in)X
+3 f
+1657(nex)X
+1 f
+(/)S
+3 f
+1799(nvi)X
+1 f
+1925(that)X
+2065(are)X
+2185(not)X
+2308(found)X
+2516(in)X
+2599(historic)X
+2860(versions)X
+3148(of)X
+3 f
+3236(ex)X
+1 f
+3312(/)X
+3 f
+3334(vi)X
+1 f
+3396(.)X
+3457(Some)X
+3660(of)X
+3748(the)X
+3867(more)X
+576 2244(interesting)N
+941(of)X
+1035(those)X
+1231(features)X
+1513(are)X
+1639(brie\257y)X
+1875(described)X
+2210(in)X
+2299(the)X
+2424(section)X
+2678(entitled)X
+2945(``)X
+3 f
+2999(Additional)X
+3389(Features)X
+1 f
+3688('')X
+3769(near)X
+3934(the)X
+576 2334(end)N
+719(of)X
+813(this)X
+955(document.)X
+1338(For)X
+1476(the)X
+1601(rest)X
+1744(of)X
+1838(this)X
+1980(document,)X
+3 f
+2343(nex)X
+1 f
+(/)S
+3 f
+2485(nvi)X
+1 f
+2618(is)X
+2698(used)X
+2872(only)X
+3042(when)X
+3244(it)X
+3316(is)X
+3397(necessary)X
+3738(to)X
+3828(distin-)X
+576 2424(guish)N
+769(it)X
+833(from)X
+1009(the)X
+1127(historic)X
+1387(implementations)X
+1940(of)X
+3 f
+2027(ex)X
+1 f
+2103(/)X
+3 f
+2125(vi)X
+1 f
+2187(.)X
+776 2547(Future)N
+1012(versions)X
+1306(of)X
+1400(this)X
+1542(software)X
+1846(will)X
+1997(be)X
+2100(periodically)X
+2510(made)X
+2712(available)X
+3030(by)X
+3138(anonymous)X
+3535(ftp,)X
+3672(and)X
+3816(can)X
+3956(be)X
+576 2637(retrieved)N
+882(from)X
+7 f
+1058(ftp.cs.berkeley.edu)X
+1 f
+(,)S
+2010(in)X
+2092(the)X
+2210(directory)X
+7 f
+2520(ucb/4bsd)X
+1 f
+(.)S
+3 f
+576 2823(2.)N
+676(Startup)X
+958(Information)X
+1 f
+3 f
+776 2946(Ex)N
+1 f
+869(/)X
+3 f
+891(vi)X
+1 f
+981(interprets)X
+1312(one)X
+1456(of)X
+1551(two)X
+1699(possible)X
+1989(environmental)X
+2480(variables)X
+2798(and)X
+2942(reads)X
+3140(up)X
+3248(to)X
+3338(three)X
+3527(of)X
+3622(\256ve)X
+3770(possible)X
+576 3036(\256les)N
+737(during)X
+974(startup.)X
+1260(The)X
+1413(variables)X
+1731(and)X
+1875(\256les)X
+2036(are)X
+2163(expected)X
+2477(to)X
+2567(contain)X
+3 f
+2831(ex)X
+1 f
+2935(commands,)X
+3330(not)X
+3 f
+3460(vi)X
+1 f
+3550(commands.)X
+3965(In)X
+576 3126(addition,)N
+879(they)X
+1038(are)X
+1158(interpreted)X
+2 f
+1527(before)X
+1 f
+1753(the)X
+1872(\256le)X
+1996(to)X
+2080(be)X
+2178(edited)X
+2396(is)X
+2471(read,)X
+2652(and)X
+2790(therefore)X
+3103(many)X
+3 f
+3303(ex)X
+1 f
+3401(commands)X
+3770(may)X
+3930(not)X
+576 3216(be)N
+683(used.)X
+901(Generally,)X
+1269(any)X
+1416(command)X
+1763(that)X
+1914(requires)X
+2204(output)X
+2439(to)X
+2532(the)X
+2660(screen)X
+2896(or)X
+2993(that)X
+3143(needs)X
+3356(a)X
+3422(\256le)X
+3554(upon)X
+3744(which)X
+3970(to)X
+576 3306(operate,)N
+853(will)X
+997(cause)X
+1196(an)X
+1292(error)X
+1469(if)X
+1538(included)X
+1834(in)X
+1916(a)X
+1972(startup)X
+2210(\256le)X
+2332(or)X
+2419(environmental)X
+2902(variable.)X
+776 3429(Because)N
+1071(the)X
+3 f
+1197(ex)X
+1 f
+1301(command)X
+1645(set)X
+1762(supported)X
+2106(by)X
+3 f
+2214(nex)X
+1 f
+(/)S
+3 f
+2356(nvi)X
+1 f
+2490(is)X
+2571(a)X
+2635(superset)X
+2926(of)X
+3021(the)X
+3147(command)X
+3491(set)X
+3608(supported)X
+3952(by)X
+576 3519(most)N
+753(historical)X
+1073(implementations)X
+1628(of)X
+3 f
+1717(ex)X
+1 f
+1793(,)X
+3 f
+1835(nex)X
+1 f
+(/)S
+3 f
+1977(nvi)X
+1 f
+2105(can)X
+2238(use)X
+2366(the)X
+2485(startup)X
+2724(\256les)X
+2878(created)X
+3132(for)X
+3247(the)X
+3366(historical)X
+3685(implemen-)X
+576 3609(tations,)N
+829(but)X
+951(the)X
+1069(converse)X
+1375(may)X
+1533(not)X
+1655(be)X
+1751(true.)X
+776 3732(If)N
+852(the)X
+3 f
+9 f
+973(-)X
+975(-)X
+3 f
+1019(s)X
+1 f
+1073(\(the)X
+1221(historic)X
+9 f
+1484(-)X
+1 f
+1551(option\))X
+1805(is)X
+1881(speci\256ed,)X
+2209(or)X
+2299(if)X
+2371(standard)X
+2666(input)X
+2853(is)X
+2929(redirected)X
+3274(from)X
+3453(a)X
+3512(\256le,)X
+3657(all)X
+3760(environ-)X
+576 3822(mental)N
+814(variables)X
+1124(and)X
+1260(startup)X
+1498(\256les)X
+1651(are)X
+1770(ignored.)X
+776 3945(Otherwise,)N
+1146(startup)X
+1384(\256les)X
+1537(and)X
+1673(environmental)X
+2156(variables)X
+2466(are)X
+2585(handled)X
+2859(in)X
+2941(the)X
+3059(following)X
+3390(order:)X
+616 4068(\(1\))N
+830(The)X
+975(\256le)X
+7 f
+1097(/etc/vi.exrc)X
+1 f
+1693(is)X
+1766(read,)X
+1945(as)X
+2032(long)X
+2194(as)X
+2281(it)X
+2345(is)X
+2418(owned)X
+2652(by)X
+2752(root)X
+2901(or)X
+2988(the)X
+3106(effective)X
+3408(user)X
+3562(ID)X
+3667(of)X
+3754(the)X
+3872(user.)X
+616 4191(\(2\))N
+830(The)X
+981(environmental)X
+1471(variable)X
+7 f
+1757(NEXINIT)X
+1 f
+2120(\(or)X
+2241(the)X
+2366(variable)X
+7 f
+2652(EXINIT)X
+1 f
+(,)S
+2987(if)X
+7 f
+3063(NEXINIT)X
+1 f
+3426(is)X
+3506(not)X
+3635(set\))X
+3778(is)X
+3858(inter-)X
+830 4281(preted.)N
+616 4404(\(3\))N
+830(If)X
+918(neither)X
+7 f
+1175(NEXINIT)X
+1 f
+1545(or)X
+7 f
+1646(EXINIT)X
+1 f
+1968(was)X
+2127(set,)X
+2270(and)X
+2420(the)X
+7 f
+2552(HOME)X
+1 f
+2778(environmental)X
+3275(variable)X
+3568(is)X
+3655(set,)X
+3798(the)X
+3930(\256le)X
+7 f
+830 4494($HOME/.nexrc)N
+1 f
+1430(\(or)X
+1548(the)X
+1670(\256le)X
+7 f
+1796($HOME/.exrc)X
+1 f
+(,)S
+2368(if)X
+7 f
+2441($HOME/.nexrc)X
+1 f
+3041(does)X
+3212(not)X
+3338(exist\))X
+3540(is)X
+3617(read,)X
+3800(as)X
+3890(long)X
+830 4584(as)N
+917(the)X
+1035(effective)X
+1337(user)X
+1491(ID)X
+1596(of)X
+1683(the)X
+1801(user)X
+1955(is)X
+2028(root)X
+2177(or)X
+2264(is)X
+2337(the)X
+2455(same)X
+2640(as)X
+2727(the)X
+2845(owner)X
+3066(of)X
+3153(the)X
+3271(\256le.)X
+616 4707(\(4\))N
+830(If)X
+921(the)X
+3 f
+1056(exrc)X
+1 f
+1241(option)X
+1482(was)X
+1644(turned)X
+1886(on)X
+2003(by)X
+2120(one)X
+2273(of)X
+2377(the)X
+2512(previous)X
+2825(startup)X
+3080(information)X
+3495(sources,)X
+3794(the)X
+3930(\256le)X
+7 f
+830 4797(.nexrc)N
+1 f
+1142(\(or)X
+1260(the)X
+1382(\256le)X
+7 f
+1508(.exrc)X
+1 f
+(,)S
+1792(if)X
+7 f
+1864(.nexrc)X
+1 f
+2175(does)X
+2345(not)X
+2470(exist\))X
+2671(is)X
+2747(read,)X
+2929(as)X
+3019(long)X
+3184(as)X
+3274(the)X
+3395(effective)X
+3700(user)X
+3857(ID)X
+3965(of)X
+830 4887(the)N
+948(user)X
+1102(is)X
+1175(the)X
+1293(same)X
+1478(as)X
+1565(the)X
+1683(owner)X
+1904(of)X
+1991(the)X
+2109(\256le.)X
+776 5010(No)N
+894(startup)X
+1132(\256le)X
+1254(is)X
+1327(read)X
+1486(if)X
+1555(it)X
+1619(is)X
+1692(writable)X
+1975(by)X
+2075(anyone)X
+2327(other)X
+2512(than)X
+2670(its)X
+2765(owner.)X
+776 5133(It)N
+845(is)X
+918(not)X
+1040(an)X
+1136(error)X
+1313(for)X
+1427(any)X
+1563(of)X
+1650(the)X
+1768(startup)X
+2006(environmental)X
+2489(variables)X
+2799(or)X
+2886(\256les)X
+3039(not)X
+3161(to)X
+3243(exist.)X
+776 5256(Once)N
+978(all)X
+1090(environmental)X
+1585(variables)X
+1907(are)X
+2038(interpreted,)X
+2438(and)X
+2586(all)X
+2698(startup)X
+2948(\256les)X
+3114(are)X
+3246(read,)X
+3438(the)X
+3569(\256rst)X
+3726(\256le)X
+3861(to)X
+3956(be)X
+576 5346(edited)N
+800(is)X
+881(read)X
+1048(in)X
+1138(\(or)X
+1260(a)X
+1324(temporary)X
+1682(\256le)X
+1812(is)X
+1893(created\).)X
+2221(Then,)X
+2434(any)X
+2578(commands)X
+2953(speci\256ed)X
+3266(using)X
+3467(the)X
+3 f
+9 f
+3593(-)X
+3595(-)X
+3 f
+3639(c)X
+1 f
+3702(option)X
+3933(are)X
+576 5436(executed,)N
+902(in)X
+984(the)X
+1102(context)X
+1358(of)X
+1445(that)X
+1585(\256le.)X
+
+4 p
+%%Page: 4 3
+10 s 10 xH 0 xS 1 f 1 i
+3 f
+576 474(USD:13-4)N
+3391(Nvi/Nex)X
+3687 0.3906(Reference)AX
+576 762(3.)N
+676(Recovery)X
+1 f
+776 885(There)N
+991(is)X
+1071(no)X
+1178(recovery)X
+1487(program)X
+1786(for)X
+3 f
+1907(nex)X
+1 f
+(/)S
+3 f
+2049(nvi)X
+1 f
+2155(,)X
+2202(nor)X
+2336(does)X
+3 f
+2510(nex)X
+1 f
+(/)S
+3 f
+2652(nvi)X
+1 f
+2785(run)X
+2919(setuid.)X
+3177(Recovery)X
+3512(\256les)X
+3672(are)X
+3799(created)X
+576 975(readable)N
+887(and)X
+1041(writable)X
+1342(by)X
+1460(the)X
+1596(owner)X
+1835(only.)X
+2055(Users)X
+2276(may)X
+2452(recover)X
+2732(any)X
+2886(\256le)X
+3026(which)X
+3260(they)X
+3436(can)X
+3585(read,)X
+3781(and)X
+3934(the)X
+576 1065(superuser)N
+904(may)X
+1062(recover)X
+1324(any)X
+1460(edit)X
+1600(session.)X
+776 1188(Edit)N
+952(sessions)X
+1257(are)X
+1399(backed)X
+1670(by)X
+1793(\256les)X
+1969(in)X
+2074(the)X
+2215(directory)X
+2548(named)X
+2805(by)X
+2929(the)X
+3 f
+3071(recdir)X
+1 f
+3325(option)X
+3573(\(the)X
+3742(directory)X
+7 f
+576 1278(/var/tmp/vi.recover)N
+1 f
+1508(by)X
+1608(default\),)X
+1898(and)X
+2034(are)X
+2153(named)X
+2387(``)X
+3 f
+2441(vi.XXXXXX)X
+1 f
+2871('',)X
+2965(where)X
+3182(``)X
+3 f
+3236(XXXXXX)X
+1 f
+3584('')X
+3658(is)X
+3731(a)X
+3787(number)X
+576 1368(related)N
+816(to)X
+899(the)X
+1018(process)X
+1281(ID.)X
+1428(When)X
+1642(a)X
+1700(\256le)X
+1824(is)X
+1899(\256rst)X
+2045(modi\256ed,)X
+2371(a)X
+2429(second)X
+2674(recovery)X
+2978(\256le)X
+3102(containing)X
+3462(an)X
+3560(email)X
+3760(message)X
+576 1458(for)N
+691(the)X
+810(user)X
+965(is)X
+1039(created,)X
+1313(and)X
+1450(is)X
+1524(named)X
+1759(``)X
+3 f
+1813 0.3077(recover.XXXXXX)AX
+1 f
+2441('',)X
+2536(where,)X
+2774(again,)X
+2989(``)X
+3 f
+3043(XXXXXX)X
+1 f
+3391('')X
+3466(is)X
+3540(associated)X
+3890(with)X
+576 1548(the)N
+698(process)X
+963(ID.)X
+1112(Both)X
+1291(\256les)X
+1448(are)X
+1571(removed)X
+1876(at)X
+1958(the)X
+2080(end)X
+2220(of)X
+2311(a)X
+2371(normal)X
+2622(edit)X
+2766(session,)X
+3041(but)X
+3168(will)X
+3317(remain)X
+3565(if)X
+3639(the)X
+3762(edit)X
+3907(ses-)X
+576 1638(sion)N
+729(is)X
+802(abnormally)X
+1187(terminated)X
+1550(or)X
+1637(the)X
+1755(user)X
+1909(runs)X
+2067(the)X
+3 f
+2185(ex)X
+2281(preserve)X
+1 f
+2596(command.)X
+776 1761(The)N
+3 f
+935(recdir)X
+1 f
+1180(option)X
+1419(may)X
+1592(be)X
+1703(set)X
+1827(in)X
+1924(either)X
+2142(the)X
+2275(user's)X
+2502(or)X
+2604(system's)X
+2919(startup)X
+3172(information,)X
+3605(changing)X
+3934(the)X
+576 1851(recovery)N
+887(directory.)X
+1246(\(Note,)X
+1478(however,)X
+1804(that)X
+1953(if)X
+2031(a)X
+2096(memory)X
+2392(based)X
+2604(\256le)X
+2735(system)X
+2985(is)X
+3066(used)X
+3241(as)X
+3336(the)X
+3462(backup)X
+3722(directory,)X
+576 1941(each)N
+752(system)X
+1002(reboot)X
+1235(will)X
+1388(delete)X
+1609(all)X
+1718(of)X
+1814(the)X
+1941(recovery)X
+2252(\256les!)X
+2461(The)X
+2615(same)X
+2809(caution)X
+3074(applies)X
+3330(to)X
+3421(directories)X
+3789(such)X
+3965(as)X
+7 f
+576 2031(/tmp)N
+1 f
+792(which)X
+1012(are)X
+1135(cleared)X
+1392(of)X
+1483(their)X
+1654(contents)X
+1945(by)X
+2049(a)X
+2108(system)X
+2353(reboot,)X
+2601(or)X
+7 f
+2691(/usr/tmp)X
+1 f
+3098(which)X
+3317(is)X
+3393(periodically)X
+3799(cleared)X
+576 2121(of)N
+663(old)X
+785(\256les)X
+938(on)X
+1038(many)X
+1236(systems.\))X
+776 2244(The)N
+926(recovery)X
+1233(directory)X
+1548(should)X
+1786(be)X
+1887(owned)X
+2126(by)X
+2231(root,)X
+2405(or)X
+2497(at)X
+2580(least)X
+2752(by)X
+2857(a)X
+2918(pseudo-user.)X
+3371(In)X
+3463(addition,)X
+3770(if)X
+3844(direc-)X
+576 2334(tory)N
+727(``sticky-bit'')X
+1159(semantics)X
+1497(are)X
+1618(available,)X
+1950(the)X
+2070(directory)X
+2382(should)X
+2617(have)X
+2791(the)X
+2911(sticky-bit)X
+3234(set)X
+3344(so)X
+3436(that)X
+3577(\256les)X
+3731(may)X
+3890(only)X
+576 2424(be)N
+676(removed)X
+981(by)X
+1085(their)X
+1256(owners.)X
+1552(The)X
+1702(recovery)X
+2009(directory)X
+2324(must)X
+2504(be)X
+2605(read,)X
+2789(write,)X
+2999(and)X
+3140(executable)X
+3509(by)X
+3614(any)X
+3755(user,)X
+3934(i.e.)X
+576 2514(mode)N
+774(1777.)X
+776 2637(If)N
+850(the)X
+968(recovery)X
+1270(directory)X
+1581(does)X
+1749(not)X
+1872(exist,)X
+3 f
+2064(ex)X
+1 f
+2140(/)X
+3 f
+2162(vi)X
+1 f
+2245(will)X
+2390(attempt)X
+2651(to)X
+2734(create)X
+2948(it.)X
+3053(This)X
+3216(can)X
+3349(result)X
+3548(in)X
+3631(the)X
+3750(recovery)X
+576 2727(directory)N
+895(being)X
+1102(owned)X
+1345(by)X
+1454(a)X
+1518(normal)X
+1773(user,)X
+1955(which)X
+2179(means)X
+2412(that)X
+2560(that)X
+2708(user)X
+2870(will)X
+3022(be)X
+3126(able)X
+3288(to)X
+3378(remove)X
+3647(other)X
+3840(user's)X
+576 2817(recovery)N
+880(and)X
+1018(backup)X
+1272(\256les.)X
+1467(This)X
+1631(is)X
+1706(annoying,)X
+2046(but)X
+2170(is)X
+2245(not)X
+2369(a)X
+2427(security)X
+2703(issue)X
+2886(as)X
+2976(the)X
+3097(user)X
+3254(cannot)X
+3491(otherwise)X
+3826(access)X
+576 2907(or)N
+663(modify)X
+914(the)X
+1032(\256les.)X
+776 3030(The)N
+924(recovery)X
+1229(\256le)X
+1354(has)X
+1484(all)X
+1587(of)X
+1677(the)X
+1798(necessary)X
+2134(information)X
+2535(in)X
+2621(it)X
+2689(to)X
+2775(enable)X
+3009(the)X
+3131(user)X
+3289(to)X
+3375(recover)X
+3641(the)X
+3763(edit)X
+3907(ses-)X
+576 3120(sion.)N
+774(In)X
+866(addition,)X
+1173(it)X
+1242(has)X
+1374(all)X
+1479(of)X
+1571(the)X
+1694(necessary)X
+2032(email)X
+2235(headers)X
+2505(for)X
+2 f
+2623(sendmail)X
+1 f
+2912(\(8\).)X
+3070(When)X
+3286(the)X
+3408(system)X
+3654(is)X
+3731(rebooted,)X
+576 3210(all)N
+677(of)X
+765(the)X
+884(\256les)X
+1038(in)X
+7 f
+1121(/var/tmp/vi.recover)X
+1 f
+2054(named)X
+2289(``)X
+3 f
+2343 0.3077(recover.XXXXXX)AX
+1 f
+2971('')X
+3046(should)X
+3280(be)X
+3377(sent)X
+3527(to)X
+3611(their)X
+3780(owners,)X
+576 3300(by)N
+684(email,)X
+910(using)X
+1111(the)X
+3 f
+9 f
+1237(-)X
+1239(-)X
+3 f
+1283(t)X
+1 f
+1338(option)X
+1570(of)X
+3 f
+1665(sendmail)X
+1 f
+1999(\(or)X
+2121(a)X
+2185(similar)X
+2434(mechanism)X
+2826(in)X
+2915(other)X
+3107(mailers\).)X
+3437(If)X
+3 f
+3518(ex)X
+1 f
+3594(/)X
+3 f
+3616(vi)X
+1 f
+3705(receives)X
+3996(a)X
+576 3390(hangup)N
+839(\(SIGHUP\))X
+1209(signal,)X
+1447(or)X
+1541(the)X
+1666(user)X
+1828(executes)X
+2133(the)X
+3 f
+2259(ex)X
+2363(preserve)X
+1 f
+2686(command,)X
+3 f
+3050(ex)X
+1 f
+3126(/)X
+3 f
+3148(vi)X
+1 f
+3238(will)X
+3390(automatically)X
+3854(email)X
+576 3480(the)N
+694(recovery)X
+996(information)X
+1394(to)X
+1476(the)X
+1594(user.)X
+776 3603(If)N
+853(your)X
+1023(system)X
+1268(does)X
+1438(not)X
+1564(have)X
+1740(the)X
+3 f
+1862(sendmail)X
+1 f
+2192(utility)X
+2406(\(or)X
+2524(a)X
+2584(mailer)X
+2813(program)X
+3109(which)X
+3329(supports)X
+3624(its)X
+3723(interface\))X
+576 3693(the)N
+700(source)X
+936(\256le)X
+7 f
+1063(nvi/common/recover.c)X
+1 f
+2048(will)X
+2197(have)X
+2374(to)X
+2461(be)X
+2562(modi\256ed)X
+2871(to)X
+2958(use)X
+3090(your)X
+3262(local)X
+3443(mail)X
+3610(delivery)X
+3898(pro-)X
+576 3783(grams.)N
+833(Note,)X
+1030(if)X
+3 f
+1100(nex)X
+1 f
+(/)S
+3 f
+1242(nvi)X
+1 f
+1369(is)X
+1443(changed)X
+1732(to)X
+1815(use)X
+1944(another)X
+2207(mailer,)X
+2454(it)X
+2520(is)X
+2595(important)X
+2928(to)X
+3012(remember)X
+3360(that)X
+3502(the)X
+3622(owner)X
+3845(of)X
+3934(the)X
+576 3873(\256le)N
+708(given)X
+916(to)X
+1008(the)X
+1136(mailer)X
+1371(is)X
+1454(the)X
+3 f
+1582(nex)X
+1 f
+(/)S
+3 f
+1724(nvi)X
+1 f
+1860(user,)X
+2044(so)X
+2145(nothing)X
+2419(in)X
+2511(the)X
+2638(\256le)X
+2769(should)X
+3011(be)X
+3116(trusted)X
+3363(as)X
+3459(it)X
+3532(may)X
+3699(have)X
+3880(been)X
+576 3963(modi\256ed)N
+880(in)X
+962(an)X
+1058(effort)X
+1257(to)X
+1339(compromise)X
+1755(the)X
+1873(system.)X
+776 4086(Finally,)N
+1046(the)X
+1168(owner)X
+1393(execute)X
+1663(bit)X
+1771(is)X
+1848(set)X
+1961(on)X
+2065(backup)X
+2321(\256les)X
+2478(when)X
+2676(they)X
+2838(are)X
+2961(created,)X
+3238(and)X
+3378(unset)X
+3571(when)X
+3770(they)X
+3933(are)X
+576 4176(\256rst)N
+724(modi\256ed,)X
+1052(e.g.)X
+1192(backup)X
+1448(\256les)X
+1605(that)X
+1749(have)X
+1925(no)X
+2029(associated)X
+2383(email)X
+2585(recovery)X
+2891(\256le)X
+3017(will)X
+3165(have)X
+3341(this)X
+3480(bit)X
+3588(set.)X
+3741(\(There)X
+3979(is)X
+576 4266(also)N
+735(a)X
+801(small)X
+1004(window)X
+1292(where)X
+1519(empty)X
+1749(\256les)X
+1912(can)X
+2054(be)X
+2160(created)X
+2424(and)X
+2571(not)X
+2704(yet)X
+2833(have)X
+3016(this)X
+3162(bit)X
+3277(set.)X
+3437(This)X
+3610(is)X
+3694(due)X
+3841(to)X
+3934(the)X
+576 4356(method)N
+836(in)X
+918(which)X
+1134(the)X
+1252(\256les)X
+1405(are)X
+1524(created.\))X
+1844(Such)X
+2024(\256les)X
+2177(should)X
+2410(be)X
+2506(deleted)X
+2758(when)X
+2952(the)X
+3070(system)X
+3312(reboots.)X
+776 4479(A)N
+884(simple)X
+1147(way)X
+1331(to)X
+1443(do)X
+1573(this)X
+1738(cleanup)X
+2038(is)X
+2141(to)X
+2253(insert)X
+2481(the)X
+2630(following)X
+2992(Bourne)X
+3279(shell)X
+3481(script)X
+3710(into)X
+3885(your)X
+7 f
+576 4569(/etc/rc.local)N
+1 f
+1224(\(or)X
+1342(other)X
+1531(startup\))X
+1800(\256le.)X
+1966(The)X
+2115(script)X
+2316(should)X
+2552(work)X
+2740(with)X
+2905(the)X
+3026(historic)X
+3289(Bourne)X
+3548(shell,)X
+3742(a)X
+3801(POSIX)X
+576 4659(1003.2)N
+818(shell)X
+991(or)X
+1080(the)X
+1201(Korn)X
+1389(shell.)X
+1603(\(A)X
+1711(copy)X
+1890(of)X
+1980(this)X
+2118(script)X
+2319(is)X
+2395(included)X
+2694(as)X
+7 f
+2784(nvi/install/recover.script)X
+1 f
+576 4749(in)N
+658(the)X
+3 f
+776(nex)X
+1 f
+(/)S
+3 f
+918(nvi)X
+1 f
+1044(distribution.\))X
+
+5 p
+%%Page: 5 4
+10 s 10 xH 0 xS 1 f 1 i
+3 f
+576 474(Nvi/Nex)N
+872 0.3906(Reference)AX
+3698(USD:13-5)X
+7 f
+896 762(#)N
+1184(@\(#\)recover.script)X
+2336(8.4)X
+2528(\(Berkeley\))X
+3056(8/13/94)X
+896 852(#)N
+896 942(#)N
+992(Recover)X
+1376(nvi)X
+1568(editor)X
+1904(files:)X
+896 1032(RECDIR=/var/tmp/vi.recover)N
+896 1122(SENDMAIL=/usr/lib/sendmail)N
+896 1212(echo)N
+1136('Recovering)X
+1712(nvi)X
+1904(editor)X
+2240(sessions.')X
+896 1392(#)N
+992(Unmodified)X
+1520(nvi)X
+1712(editor)X
+2048(backup)X
+2384(files)X
+2672(are)X
+2864(either)X
+3200(zero)X
+3440(length)X
+3776(or)X
+896 1482(#)N
+992(have)X
+1232(the)X
+1424(execute)X
+1808(bit)X
+2000(set.)X
+2288(Delete)X
+2624(both)X
+2864(cases.)X
+896 1572(vibackup=`echo)N
+1616($RECDIR/vi.*`)X
+896 1662(if)N
+1040([)X
+1136("$vibackup")X
+1712(!=)X
+1856("$RECDIR/vi.*")X
+2576(];)X
+2720(then)X
+1184 1752(for)N
+1376(i)X
+1472(in)X
+1616($vibackup;)X
+2144(do)X
+1472 1842(if)N
+1616(test)X
+1856(-x)X
+2000($i)X
+2144(-o)X
+2288(!)X
+2384(-s)X
+2528($i;)X
+2720(then)X
+1760 1932(rm)N
+1904($i)X
+1472 2022(fi)N
+1184 2112(done)N
+896 2202(fi)N
+896 2382(#)N
+992(It)X
+1136(is)X
+1280(possible)X
+1712(to)X
+1856(get)X
+2048(incomplete)X
+2576(recovery)X
+3008(files,)X
+3344(if)X
+3488(the)X
+3680(editor)X
+896 2472(#)N
+992(crashes)X
+1376(at)X
+1520(the)X
+1712(right)X
+2000(time.)X
+2336(Delete)X
+2672(any)X
+2864(recovery)X
+3296(files)X
+3584(without)X
+896 2562(#)N
+992(corresponding)X
+1664(backup)X
+2000(files,)X
+2336(otherwise)X
+2816(send)X
+3056(mail)X
+3296(to)X
+3440(the)X
+3632(user.)X
+896 2652(virecovery=`echo)N
+1712($RECDIR/recover.*`)X
+896 2742(if)N
+1040([)X
+1136("$virecovery")X
+1808(!=)X
+1952("$RECDIR/recover.*")X
+2912(];)X
+3056(then)X
+1184 2832(for)N
+1376(i)X
+1472(in)X
+1616($virecovery;)X
+2240(do)X
+1472 2922(recfile=`awk)N
+2096('/\303X-vi-recover-path:/{print)X
+3488($2}')X
+3728(<)X
+3824($i`)X
+1472 3012(if)N
+1616(test)X
+1856(!)X
+1952(-n)X
+2096($recfile)X
+2528(-a)X
+2672(-s)X
+2816($recfile;)X
+3296(then)X
+1760 3102($SENDMAIL)N
+2240(-t)X
+2384(<)X
+2480($i)X
+1472 3192(else)N
+1760 3282(rm)N
+1904($i)X
+1472 3372(fi)N
+1184 3462(done)N
+896 3552(fi)N
+1 f
+776 3798(If)N
+859(you)X
+1008(are)X
+1136(not)X
+1267(using)X
+1469(the)X
+1596(default)X
+1848(value)X
+2051(for)X
+2174(the)X
+3 f
+2301(recdir)X
+1 f
+2540(option,)X
+2793(be)X
+2898(sure)X
+3062(to)X
+3154(substitute)X
+3490(the)X
+3618(value)X
+3822(you're)X
+576 3888(using)N
+769(for)X
+883(the)X
+7 f
+1001(RECDIR)X
+1 f
+1309(value)X
+1503(in)X
+1585(the)X
+1703(recovery)X
+2005(script.)X
+776 4011(If)N
+882(the)X
+1032(path)X
+1222(of)X
+1341(your)X
+1540(system's)X
+3 f
+1872(sendmail)X
+1 f
+2230(program)X
+2555(\(or)X
+2702(whatever)X
+3050(mailer)X
+3308(you're)X
+3571(using\))X
+3824(is)X
+3930(not)X
+7 f
+576 4101(/usr/lib/sendmail)N
+1 f
+(,)S
+1451(be)X
+1566(sure)X
+1739(to)X
+1840(substitute)X
+2184(the)X
+2320(correct)X
+2582(pathname)X
+2932(for)X
+3064(the)X
+7 f
+3200(SENDMAIL)X
+1 f
+3622(value)X
+3834(in)X
+3934(the)X
+576 4191(recovery)N
+878(script.)X
+1116(Consult)X
+1384(the)X
+1502(manual)X
+1758(page)X
+1930(for)X
+2044(details)X
+2273(on)X
+2373(recovering)X
+2737(preserved)X
+3070(or)X
+3157(aborted)X
+3418(editing)X
+3660(sessions.)X
+3 f
+576 4377(4.)N
+676(Sizing)X
+904(the)X
+1031(Screen)X
+1 f
+776 4500(The)N
+926(size)X
+1076(of)X
+1168(the)X
+1291(screen)X
+1522(can)X
+1659(be)X
+1760(set)X
+1874(in)X
+1961(a)X
+2022(number)X
+2292(of)X
+2384(ways.)X
+3 f
+2614(Ex)X
+1 f
+2707(/)X
+3 f
+2729(vi)X
+1 f
+2817(takes)X
+3008(the)X
+3132(following)X
+3469(steps)X
+3655(until)X
+3827(values)X
+576 4590(are)N
+695(obtained)X
+991(for)X
+1105(both)X
+1267(the)X
+1385(number)X
+1650(of)X
+1737(rows)X
+1913(and)X
+2049(number)X
+2314(of)X
+2401(columns)X
+2692(in)X
+2774(the)X
+2892(screen.)X
+616 4713(\(1\))N
+830(If)X
+904(the)X
+1022(environmental)X
+1505(variable)X
+7 f
+1784(LINES)X
+1 f
+2044(exists,)X
+2266(it)X
+2330(is)X
+2403(used)X
+2570(to)X
+2652(specify)X
+2904(the)X
+3022(number)X
+3287(of)X
+3374(rows)X
+3550(in)X
+3632(the)X
+3750(screen.)X
+616 4836(\(2\))N
+830(If)X
+909(the)X
+1032(environmental)X
+1520(variable)X
+7 f
+1804(COLUMNS)X
+1 f
+2165(exists,)X
+2393(it)X
+2463(is)X
+2542(used)X
+2715(to)X
+2803(specify)X
+3061(the)X
+3185(number)X
+3456(of)X
+3549(columns)X
+3846(in)X
+3934(the)X
+830 4926(screen.)N
+616 5049(\(3\))N
+830(The)X
+975(TIOCGWINSZ)X
+2 f
+1494(ioctl)X
+1 f
+1636(\(2\))X
+1750(is)X
+1823(attempted)X
+2159(on)X
+2259(the)X
+2377(standard)X
+2669(error)X
+2846(\256le)X
+2968(descriptor.)X
+616 5172(\(4\))N
+830(The)X
+978(termcap)X
+1260(entry)X
+1448(\(or)X
+1565(terminfo)X
+1864(entry)X
+2053(on)X
+2157(System)X
+2416(V)X
+2498(machines\))X
+2852(is)X
+2929(checked)X
+3217(for)X
+3335(the)X
+3457(``li'')X
+3633(entry)X
+3822(\(rows\))X
+830 5262(and)N
+966(the)X
+1084(``co'')X
+1288(entry)X
+1473(\(columns\).)X
+616 5385(\(5\))N
+830(The)X
+975(number)X
+1240(of)X
+1327(rows)X
+1503(is)X
+1576(set)X
+1685(to)X
+1767(24,)X
+1887(and)X
+2023(the)X
+2141(number)X
+2406(of)X
+2493(columns)X
+2784(is)X
+2857(set)X
+2966(to)X
+3048(80.)X
+776 5508(If)N
+851(a)X
+908(window)X
+1187(change)X
+1436(size)X
+1582(signal)X
+1794(\(SIGWINCH\))X
+2270(is)X
+2344(received,)X
+2658(the)X
+2777(new)X
+2932(window)X
+3211(size)X
+3357(is)X
+3431(retrieved)X
+3739(using)X
+3934(the)X
+576 5598(TIOCGWINSZ)N
+2 f
+1095(ioctl)X
+1 f
+1237(\(2\))X
+1351(call,)X
+1507(and)X
+1643(all)X
+1743(other)X
+1928(information)X
+2326(is)X
+2399(ignored.)X
+
+6 p
+%%Page: 6 5
+10 s 10 xH 0 xS 1 f 1 i
+3 f
+576 474(USD:13-6)N
+3391(Nvi/Nex)X
+3687 0.3906(Reference)AX
+576 762(5.)N
+676(Character)X
+1049(Display)X
+1 f
+776 885(In)N
+865(both)X
+3 f
+1030(ex)X
+1 f
+1129(and)X
+3 f
+1268(vi)X
+1 f
+1353(printable)X
+1661(characters)X
+2011(as)X
+2101(de\256ned)X
+2360(by)X
+2 f
+2463(isprint)X
+1 f
+2671(\(3\))X
+2788(are)X
+2910(displayed)X
+3240(using)X
+3436(the)X
+3557(local)X
+3736(character)X
+576 975(set.)N
+776 1098(Non-printable)N
+1255(characters,)X
+1631(for)X
+1754(which)X
+2 f
+1980(iscntrl)X
+1 f
+2184(\(3\))X
+2308(returns)X
+2561(true,)X
+2736(and)X
+2882(which)X
+3108(are)X
+3237(less)X
+3387(than)X
+3555(octal)X
+3741(\\076,)X
+3933(are)X
+576 1188(displayed)N
+915(as)X
+1014(the)X
+1144(string)X
+1357(``)X
+7 f
+1411(\303<character>)X
+1 f
+('',)S
+2092(where)X
+7 f
+2320(<character>)X
+1 f
+2879(is)X
+2963(the)X
+3092(character)X
+3419(that)X
+3570(is)X
+3654(the)X
+3783(original)X
+576 1278 0.3250(character's)AN
+961(value)X
+1166(offset)X
+1380(from)X
+1568(the)X
+1698(``)X
+7 f
+1752(@)X
+1 f
+('')S
+1886(character.)X
+2254(For)X
+2397(example,)X
+2721(the)X
+2851(octal)X
+3039(character)X
+3367(\\001)X
+3541(is)X
+3626(displayed)X
+3965(as)X
+576 1368(``)N
+7 f
+630(\303A)X
+1 f
+(''.)S
+845(If)X
+2 f
+924(iscntrl)X
+1 f
+1128(\(3\))X
+1247(returns)X
+1495(true)X
+1645(for)X
+1764(the)X
+1887(octal)X
+2068(character)X
+2389(\\177,)X
+2576(it)X
+2645(is)X
+2723(displayed)X
+3054(as)X
+3145(the)X
+3267(string)X
+3473(``)X
+7 f
+3527(\303?)X
+1 f
+(''.)S
+3741(All)X
+3867(other)X
+576 1458(characters)N
+947(are)X
+1090(displayed)X
+1441(as)X
+1552(either)X
+1779(hexadecimal)X
+2229(values,)X
+2498(in)X
+2604(the)X
+2746(form)X
+2946(``)X
+7 f
+3000(0x<high-halfbyte>)X
+3888(...)X
+576 1548(0x<low-halfbyte>)N
+1 f
+('',)S
+1469(or)X
+1587(as)X
+1705(octal)X
+1911(values,)X
+2186(in)X
+2298(the)X
+2446(form)X
+2652(``)X
+7 f
+2706(\\<high-one-or-two-bits>)X
+3888(...)X
+576 1638(\\<low-three-bits>)N
+1 f
+(''.)S
+1506(The)X
+1651(display)X
+1902(of)X
+1989(unknown)X
+2307(characters)X
+2654(is)X
+2727(based)X
+2930(on)X
+3030(the)X
+3148(value)X
+3342(of)X
+3429(the)X
+3 f
+3547(octal)X
+1 f
+3732(option.)X
+776 1761(In)N
+3 f
+864(vi)X
+1 f
+947(command)X
+1285(mode,)X
+1505(the)X
+1625(cursor)X
+1848(is)X
+1923(always)X
+2168(positioned)X
+2523(on)X
+2625(the)X
+2745(last)X
+2878(column)X
+3140(of)X
+3229(characters)X
+3578(which)X
+3796(take)X
+3952(up)X
+576 1851(more)N
+765(than)X
+927(one)X
+1067(column)X
+1331(on)X
+1435(the)X
+1557(screen.)X
+1827(In)X
+3 f
+1918(vi)X
+1 f
+2003(text)X
+2146(input)X
+2333(mode,)X
+2554(the)X
+2675(cursor)X
+2899(is)X
+2975(positioned)X
+3331(on)X
+3434(the)X
+3555(\256rst)X
+3702(column)X
+3965(of)X
+576 1941(characters)N
+923(which)X
+1139(take)X
+1293(up)X
+1393(more)X
+1578(than)X
+1736(one)X
+1872(column)X
+2132(on)X
+2232(the)X
+2350(screen.)X
+3 f
+576 2127(6.)N
+676(Multiple)X
+989(Screens)X
+1 f
+3 f
+776 2250(Nvi)N
+1 f
+916(supports)X
+1207(multiple)X
+1493(screens)X
+1750(by)X
+1851(dividing)X
+2138(the)X
+2257(window)X
+2536(into)X
+2681(regions.)X
+2978(It)X
+3048(also)X
+3198(supports)X
+3490(stacks)X
+3707(of)X
+3795(screens)X
+576 2340(by)N
+676(permitting)X
+1029(the)X
+1147(user)X
+1301(to)X
+1383(change)X
+1631(the)X
+1749(set)X
+1858(of)X
+1945(screens)X
+2202(that)X
+2342(are)X
+2461(currently)X
+2771(displayed.)X
+776 2463(The)N
+924(command)X
+3 f
+1263(split)X
+1 f
+1432(divides)X
+1686(the)X
+1807(current)X
+2058(screen)X
+2287(into)X
+2434(two)X
+2577(regions)X
+2836(of)X
+2926(approximately)X
+3412(equal)X
+3609(size.)X
+3797(If)X
+3875(a)X
+3935(list)X
+576 2553(of)N
+668(\256les)X
+826(are)X
+950(speci\256ed)X
+1260(as)X
+1352(arguments)X
+1711(to)X
+1798(the)X
+3 f
+1921(split)X
+1 f
+2092(command,)X
+2452(the)X
+2574(list)X
+2695(of)X
+2786(\256les)X
+2943(to)X
+3029(be)X
+3129(edited)X
+3349(is)X
+3426(initialized)X
+3770(as)X
+3861(if)X
+3934(the)X
+3 f
+576 2643(next)N
+1 f
+747(command)X
+1087(had)X
+1227(been)X
+1403(used.)X
+1614(If)X
+1692(no)X
+1796(\256les)X
+1953(are)X
+2076(speci\256ed,)X
+2405(the)X
+2527(new)X
+2685(screen)X
+2915(will)X
+3063(begin)X
+3265(by)X
+3370(editing)X
+3617(the)X
+3740(same)X
+3930(\256le)X
+576 2733(as)N
+663(the)X
+781(previous)X
+1077(screen.)X
+776 2856(When)N
+992(more)X
+1181(than)X
+1343(one)X
+1483(screen)X
+1713(is)X
+1790(editing)X
+2036(a)X
+2097(\256le,)X
+2244(changes)X
+2528(in)X
+2615(any)X
+2756(screen)X
+2987(are)X
+3111(re\257ected)X
+3413(in)X
+3500(all)X
+3605(other)X
+3795(screens)X
+576 2946(editing)N
+820(the)X
+940(same)X
+1127(\256le.)X
+1291(Exiting)X
+1548(any)X
+1686(screen)X
+1914(without)X
+2180(saving)X
+2410(any)X
+2547(changes)X
+2827(\(or)X
+2942(explicitly)X
+3265(discarding)X
+3620(them\))X
+3828(is)X
+3902(per-)X
+576 3036(mitted)N
+800(until)X
+966(the)X
+1084(last)X
+1215(screen)X
+1441(editing)X
+1683(the)X
+1801(\256le)X
+1923(is)X
+1996(exited.)X
+776 3159(The)N
+3 f
+923(resize)X
+1 f
+1142(command)X
+1480(permits)X
+1742(resizing)X
+2018(of)X
+2107(individual)X
+2453(screens.)X
+2752(Screens)X
+3024(may)X
+3184(be)X
+3282(grown,)X
+3529(shrunk)X
+3769(or)X
+3858(set)X
+3970(to)X
+576 3249(an)N
+672(absolute)X
+959(number)X
+1224(of)X
+1311(rows.)X
+776 3372(The)N
+3 f
+921(\303W)X
+1 f
+1048(command)X
+1384(is)X
+1457(used)X
+1624(to)X
+1706(switch)X
+1935(between)X
+2223(screens.)X
+2520(Each)X
+3 f
+2701(\303W)X
+1 f
+2829(moves)X
+3059(to)X
+3142(the)X
+3261(next)X
+3420(lower)X
+3624(screen)X
+3851(in)X
+3934(the)X
+576 3462(window,)N
+874(or)X
+961(to)X
+1043(the)X
+1161(\256rst)X
+1305(screen)X
+1531(in)X
+1613(the)X
+1731(window)X
+2009(if)X
+2078(there)X
+2259(are)X
+2378(no)X
+2478(lower)X
+2681(screens.)X
+776 3585(The)N
+3 f
+925(bg)X
+1 f
+1033(command)X
+1374(``backgrounds'')X
+1917(the)X
+2040(current)X
+2293(screen.)X
+2564(The)X
+2714(screen)X
+2945(disappears)X
+3309(from)X
+3490(the)X
+3613(window,)X
+3916(and)X
+576 3675(the)N
+702(rows)X
+886(it)X
+958(occupied)X
+1276(are)X
+1403(taken)X
+1605(over)X
+1776(by)X
+1884(a)X
+1948(neighboring)X
+2363(screen.)X
+2637(It)X
+2714(is)X
+2795(an)X
+2899(error)X
+3083(to)X
+3172(attempt)X
+3439(to)X
+3528(background)X
+3934(the)X
+576 3765(only)N
+738(screen)X
+964(in)X
+1046(the)X
+1164(window.)X
+776 3888(The)N
+3 f
+935(display)X
+1212(screens)X
+1 f
+1496(command)X
+1846(displays)X
+2142(the)X
+2274(names)X
+2513(of)X
+2614(the)X
+2747(\256les)X
+2915(associated)X
+3280(with)X
+3457(the)X
+3590(current)X
+3853(back-)X
+576 3978(grounded)N
+899(screens)X
+1156(in)X
+1238(the)X
+1356(window.)X
+776 4101(The)N
+3 f
+932(fg)X
+1031([\256le])X
+1 f
+1219(command)X
+1567(``foregrounds'')X
+2095(the)X
+2225(\256rst)X
+2381(screen)X
+2619(in)X
+2713(the)X
+2843(list)X
+2972(of)X
+3071(backgrounded)X
+3558(screens)X
+3827(that)X
+3979(is)X
+576 4191(associated)N
+934(with)X
+1103(its)X
+1205(argument.)X
+1575(If)X
+1656(no)X
+1763(\256le)X
+1892(argument)X
+2222(is)X
+2302(speci\256ed,)X
+2634(the)X
+2759(\256rst)X
+2910(screen)X
+3143(on)X
+3250(the)X
+3375(list)X
+3499(is)X
+3579(foregrounded.)X
+576 4281(Foregrounding)N
+1072(consists)X
+1345(of)X
+1432(backgrounding)X
+1933(the)X
+2051(current)X
+2299(screen,)X
+2545(and)X
+2681(replacing)X
+3000(its)X
+3095(space)X
+3294(in)X
+3376(the)X
+3494(window)X
+3772(with)X
+3934(the)X
+576 4371(foregrounded)N
+1029(screen.)X
+776 4494(If)N
+852(the)X
+972(last)X
+1105(screen)X
+1333(in)X
+1417(the)X
+1537(window)X
+1817(is)X
+1892(exited,)X
+2131(and)X
+2270(there)X
+2454(are)X
+2576(backgrounded)X
+3054(screens,)X
+3334(the)X
+3455(\256rst)X
+3602(screen)X
+3831(on)X
+3934(the)X
+576 4584(list)N
+693(of)X
+780(backgrounded)X
+1255(screens)X
+1512(takes)X
+1697(over)X
+1860(the)X
+1978(window.)X
+3 f
+576 4770(7.)N
+676(Regular)X
+972(Expressions)X
+1400(and)X
+1548(Replacement)X
+2014(Strings)X
+1 f
+776 4893(Regular)N
+1050(expressions)X
+1444(are)X
+1563(used)X
+1730(in)X
+1812(line)X
+1952(addresses,)X
+2301(as)X
+2389(the)X
+2508(\256rst)X
+2653(part)X
+2799(of)X
+2887(the)X
+3 f
+3006(ex)X
+3103(substitute)X
+1 f
+3436(,)X
+3 f
+3477(global)X
+1 f
+3685(,)X
+3726(and)X
+3 f
+3863(vglo-)X
+576 4983(bal)N
+1 f
+702(commands,)X
+1089(and)X
+1225(in)X
+1307(search)X
+1533(patterns.)X
+776 5106(The)N
+927(regular)X
+1181(expressions)X
+1581(supported)X
+1923(by)X
+3 f
+2030(ex)X
+1 f
+2106(/)X
+3 f
+2128(vi)X
+1 f
+2217(are,)X
+2363(by)X
+2470(default,)X
+2740(the)X
+2865(Basic)X
+3070(Regular)X
+3351(Expressions)X
+3765(\(BRE's\))X
+576 5196(described)N
+909(in)X
+996(the)X
+1119(IEEE)X
+1318(POSIX)X
+1574(Standard)X
+1884(1003.2.)X
+2169(The)X
+3 f
+2319(extended)X
+1 f
+2651(option)X
+2880(causes)X
+3115(all)X
+3220(regular)X
+3472(expressions)X
+3870(to)X
+3956(be)X
+576 5286(interpreted)N
+976(as)X
+1095(the)X
+1245(Extended)X
+1600(Regular)X
+1906(Expressions)X
+2345(\(ERE's\))X
+2661(described)X
+3022(by)X
+3155(the)X
+3306(same)X
+3524(standard.)X
+3889(\(See)X
+2 f
+576 5376(re_format)N
+1 f
+(\(7\))S
+1025(for)X
+1154(more)X
+1354(information.\))X
+1834(Generally)X
+2186(speaking,)X
+2526(BRE's)X
+2774(are)X
+2908(the)X
+3040(Regular)X
+3328(Expressions)X
+3749(found)X
+3970(in)X
+2 f
+576 5466(ed)N
+1 f
+652(\(1\))X
+766(and)X
+2 f
+902(grep)X
+1 f
+1049(\(1\),)X
+1183(and)X
+1319(ERE's)X
+1548(are)X
+1667(the)X
+1785(Regular)X
+2059(Expressions)X
+2466(found)X
+2673(in)X
+2 f
+2755(egrep)X
+1 f
+2938(\(1\).)X
+776 5589(The)N
+922(following)X
+1254(is)X
+1328(not)X
+1451(intended)X
+1748(to)X
+1831(provide)X
+2097(a)X
+2154(description)X
+2532(of)X
+2621(Regular)X
+2897(Expressions.)X
+3346(The)X
+3493(information)X
+3893(here)X
+576 5679(only)N
+742(describes)X
+1065(strings)X
+1302(and)X
+1442(characters)X
+1793(which)X
+2013(have)X
+2189(special)X
+2436(meanings)X
+2766(in)X
+2851(the)X
+3 f
+2972(ex)X
+1 f
+3048(/)X
+3 f
+3070(vi)X
+1 f
+3155(version)X
+3414(of)X
+3504(RE's,)X
+3707(or)X
+3797(options)X
+576 5769(which)N
+792(change)X
+1040(the)X
+1158(meanings)X
+1485(of)X
+1572(characters)X
+1919(that)X
+2059(normally)X
+2368(have)X
+2540(special)X
+2783(meanings)X
+3110(in)X
+3192(RE's.)X
+
+7 p
+%%Page: 7 6
+10 s 10 xH 0 xS 1 f 1 i
+3 f
+576 474(Nvi/Nex)N
+872 0.3906(Reference)AX
+3698(USD:13-7)X
+1 f
+616 762(\(1\))N
+830(An)X
+948(empty)X
+1168(RE)X
+1290(\(e.g.)X
+1473(``)X
+7 f
+1527(//)X
+1 f
+('')S
+1697(or)X
+1784(``)X
+7 f
+1838(??)X
+1 f
+('')S
+2028(is)X
+2101(equivalent)X
+2455(to)X
+2537(the)X
+2655(last)X
+2786(RE)X
+2908(used.)X
+616 885(\(2\))N
+830(The)X
+975(construct)X
+1289(``)X
+7 f
+1343(\\<)X
+1 f
+('')S
+1513(matches)X
+1796(the)X
+1914(beginning)X
+2254(of)X
+2341(a)X
+2397(word.)X
+616 1008(\(3\))N
+830(The)X
+975(construct)X
+1289(``)X
+7 f
+1343(\\>)X
+1 f
+('')S
+1513(matches)X
+1796(the)X
+1914(end)X
+2050(of)X
+2137(a)X
+2193(word.)X
+616 1131(\(4\))N
+830(The)X
+975(character)X
+1291(``)X
+7 f
+1345(\304)X
+1 f
+('')S
+1467(matches)X
+1750(the)X
+1868(replacement)X
+2281(part)X
+2426(of)X
+2513(the)X
+2631(last)X
+3 f
+2762(substitute)X
+1 f
+3115(command.)X
+776 1254(When)N
+992(the)X
+3 f
+1114(magic)X
+1 f
+1343(option)X
+1571(is)X
+2 f
+1648(not)X
+1 f
+1774(set,)X
+1907(the)X
+2029(only)X
+2195(characters)X
+2546(with)X
+2712(special)X
+2959(meanings)X
+3290(are)X
+3413(a)X
+3473(``)X
+7 f
+3527(\303)X
+1 f
+('')S
+3653(character)X
+3974(at)X
+576 1344(the)N
+698(beginning)X
+1042(of)X
+1133(an)X
+1233(RE,)X
+1379(a)X
+1439(``)X
+7 f
+1493($)X
+1 f
+('')S
+1619(character)X
+1939(at)X
+2021(the)X
+2143(end)X
+2282(of)X
+2372(an)X
+2471(RE,)X
+2616(and)X
+2755(the)X
+2876(escaping)X
+3180(character)X
+3499(``)X
+7 f
+3553(\\)X
+1 f
+(''.)S
+3718(The)X
+3866(char-)X
+576 1434(acters)N
+788(``)X
+7 f
+842(.)X
+1 f
+('',)S
+988(``)X
+7 f
+1042(*)X
+1 f
+('',)S
+1188(``)X
+7 f
+1242([)X
+1 f
+('')S
+1368(and)X
+1508(``)X
+7 f
+1562(\304)X
+1 f
+('')S
+1688(are)X
+1811(treated)X
+2054(as)X
+2145(ordinary)X
+2441(characters)X
+2793(unless)X
+3018(preceded)X
+3334(by)X
+3439(a)X
+3500(``)X
+7 f
+3554(\\)X
+1 f
+('';)S
+3703(when)X
+3902(pre-)X
+576 1524(ceded)N
+784(by)X
+884(a)X
+940(``)X
+7 f
+994(\\)X
+1 f
+('')S
+1116(they)X
+1274(regain)X
+1495(their)X
+1662(special)X
+1905(meaning.)X
+776 1647(Replacement)N
+1215(strings)X
+1448(are)X
+1567(the)X
+1685(second)X
+1928(part)X
+2073(of)X
+2160(a)X
+3 f
+2216(substitute)X
+1 f
+2569(command.)X
+776 1770(The)N
+924(character)X
+1243(``)X
+7 f
+1297(&)X
+1 f
+('')S
+1422(\(or)X
+1539(``)X
+7 f
+1593(\\&)X
+1 f
+('')S
+1766(if)X
+1839(the)X
+3 f
+1961(magic)X
+1 f
+2190(option)X
+2418(is)X
+2 f
+2495(not)X
+1 f
+2621(set\))X
+2761(in)X
+2847(the)X
+2969(replacement)X
+3386(string)X
+3592(stands)X
+3816(for)X
+3934(the)X
+576 1860(text)N
+717(matched)X
+1010(by)X
+1111(the)X
+1230(RE)X
+1353(that)X
+1494(is)X
+1568(being)X
+1767(replaced.)X
+2101(The)X
+2247(character)X
+2564(``)X
+7 f
+2618(\304)X
+1 f
+('')S
+2741(\(or)X
+2856(``)X
+7 f
+2910(\\\304)X
+1 f
+('')S
+3081(if)X
+3151(the)X
+3 f
+3270(magic)X
+1 f
+3496(option)X
+3721(is)X
+2 f
+3794(not)X
+1 f
+3916(set\))X
+576 1950(stands)N
+806(for)X
+931(the)X
+1060(replacement)X
+1484(part)X
+1640(of)X
+1738(the)X
+1867(previous)X
+3 f
+2174(substitute)X
+1 f
+2538(command.)X
+2925(It)X
+3005(is)X
+3089(only)X
+3262(valid)X
+3453(after)X
+3632(a)X
+3 f
+3699(substitute)X
+1 f
+576 2040(command)N
+912(has)X
+1039(been)X
+1211(performed.)X
+776 2163(The)N
+922(string)X
+1125(``)X
+7 f
+1179(\\#)X
+1 f
+('',)S
+1370(where)X
+1588(``)X
+7 f
+1642(#)X
+1 f
+('')S
+1765(is)X
+1839(an)X
+1936(integer)X
+2180(value)X
+2376(from)X
+2554(1)X
+2616(to)X
+2700(9,)X
+2782(stands)X
+3004(for)X
+3120(the)X
+3240(text)X
+3382(matched)X
+3676(by)X
+3778(the)X
+3898(por-)X
+576 2253(tion)N
+728(of)X
+823(the)X
+949(RE)X
+1079(enclosed)X
+1388(in)X
+1478(the)X
+1604(``)X
+7 f
+1658(#)X
+1 f
+('''th)S
+1877(set)X
+1994(of)X
+2089(escaped)X
+2372(parentheses,)X
+2794(e.g.)X
+2957(``)X
+7 f
+3011(\\\()X
+1 f
+('')S
+3188(and)X
+3331(``)X
+7 f
+3385(\\\))X
+1 f
+(''.)S
+3602(For)X
+3740(example,)X
+576 2343(``)N
+7 f
+630(s/abc\\\(.*\\\)def/\\1/)X
+1 f
+('')S
+1568(deletes)X
+1811(the)X
+1929(strings)X
+2162(``)X
+7 f
+2216(abc)X
+1 f
+('')S
+2434(and)X
+2570(``)X
+7 f
+2624(def)X
+1 f
+('')S
+2842(from)X
+3018(the)X
+3136(matched)X
+3428(pattern.)X
+776 2466(The)N
+934(strings)X
+1180(``)X
+7 f
+1234(\\l)X
+1 f
+('',)S
+1437(``)X
+7 f
+1491(\\u)X
+1 f
+('',)S
+1694(``)X
+7 f
+1748(\\L)X
+1 f
+('')S
+1931(and)X
+2080(``)X
+7 f
+2134(\\U)X
+1 f
+('')S
+2317(can)X
+2462(be)X
+2571(used)X
+2752(to)X
+2848(modify)X
+3113(the)X
+3245(case)X
+3418(of)X
+3519(elements)X
+3838(in)X
+3934(the)X
+576 2556(replacement)N
+999(string.)X
+1251(The)X
+1406(string)X
+1618(``)X
+7 f
+1672(\\l)X
+1 f
+('')S
+1852(causes)X
+2092(the)X
+2220(next)X
+2388(character)X
+2714(to)X
+2806(be)X
+2912(converted)X
+3259(to)X
+3350(lowercase;)X
+3723(the)X
+3850(string)X
+576 2646(``)N
+7 f
+630(\\u)X
+1 f
+('')S
+815(behaves)X
+1109(similarly,)X
+1448(but)X
+1585(converts)X
+1892(to)X
+1989(uppercase)X
+2346(\(e.g.)X
+7 f
+2544(s/abc/\\U&/)X
+1 f
+3059(replaces)X
+3358(the)X
+3492(string)X
+7 f
+3710(abc)X
+1 f
+3890(with)X
+7 f
+576 2736(ABC)N
+1 f
+(\).)S
+810(The)X
+958(strings)X
+1194(``)X
+7 f
+1248(\\L)X
+1 f
+('')S
+1421(causes)X
+1654(characters)X
+2004(up)X
+2107(to)X
+2192(the)X
+2313(end)X
+2452(of)X
+2541(the)X
+2661(string)X
+2865(or)X
+2954(the)X
+3074(next)X
+3234 0.3611(occurrence)AX
+3610(of)X
+3699(the)X
+3819(strings)X
+576 2826(``)N
+7 f
+630(\\e)X
+1 f
+('')S
+806(or)X
+899(``)X
+7 f
+953(\\E)X
+1 f
+('')S
+1129(to)X
+1217(be)X
+1319(converted)X
+1663(to)X
+1752(lowercase;)X
+2123(the)X
+2248(string)X
+2457(``)X
+7 f
+2511(\\U)X
+1 f
+('')S
+2688(behaves)X
+2974(similarly,)X
+3305(but)X
+3434(converts)X
+3733(to)X
+3822(upper-)X
+576 2916(case.)N
+776 3039(If)N
+850(the)X
+968(entire)X
+1171(replacement)X
+1584(pattern)X
+1827(is)X
+1900(``)X
+7 f
+1954(%)X
+1 f
+('',)S
+2096(then)X
+2254(the)X
+2372(last)X
+2503(replacement)X
+2916(pattern)X
+3159(is)X
+3232(used)X
+3399(again.)X
+776 3162(In)N
+3 f
+867(vi)X
+1 f
+929(,)X
+973(inserting)X
+1278(a)X
+7 f
+1339(<control-M>)X
+1 f
+1892(into)X
+2041(the)X
+2164(replacement)X
+2582(string)X
+2789(will)X
+2938(cause)X
+3142(the)X
+3265(matched)X
+3562(line)X
+3707(to)X
+3794(be)X
+3895(split)X
+576 3252(into)N
+720(two)X
+860(lines)X
+1031(at)X
+1109(that)X
+1249(point.)X
+1473(\(The)X
+7 f
+1645(<control-M>)X
+1 f
+2193(will)X
+2337(be)X
+2433(discarded.\))X
+3 f
+576 3438(8.)N
+676(General)X
+972(Editor)X
+1214(Description)X
+1 f
+776 3561(When)N
+3 f
+989(ex)X
+1 f
+1086(or)X
+3 f
+1174(vi)X
+1 f
+1257(are)X
+1377(executed,)X
+1704(the)X
+1823(text)X
+1964(of)X
+2052(a)X
+2109(\256le)X
+2232(is)X
+2306(read)X
+2466(\(or)X
+2581(a)X
+2638(temporary)X
+2989(\256le)X
+3112(is)X
+3186(created\),)X
+3487(and)X
+3624(then)X
+3783(all)X
+3885(edit-)X
+576 3651(ing)N
+700(changes)X
+981(happen)X
+1235(within)X
+1461(the)X
+1581(context)X
+1838(of)X
+1926(the)X
+2045(copy)X
+2222(of)X
+2310(the)X
+2429(\256le.)X
+2 f
+2592(No)X
+2706(changes)X
+2990(affect)X
+3189(the)X
+3308(actual)X
+3529(\256le)X
+3648(until)X
+3815(the)X
+3934(\256le)X
+576 3741(is)N
+662(written)X
+921(out)X
+1 f
+1023(,)X
+1076(either)X
+1293(using)X
+1500(a)X
+1570(write)X
+1769(command)X
+2119(or)X
+2220(another)X
+2495(command)X
+2845(which)X
+3075(is)X
+3162(affected)X
+3456(by)X
+3570(the)X
+3 f
+3702(autowrite)X
+1 f
+576 3831(option.)N
+776 3954(All)N
+898(\256les)X
+1052(are)X
+1172(locked)X
+1407(\(using)X
+1628(the)X
+2 f
+1747(\257ock)X
+1 f
+1899(\(2\))X
+2014(or)X
+2 f
+2102(fcntl)X
+1 f
+2244(\(2\))X
+2359(interfaces\))X
+2720(during)X
+2950(the)X
+3069(edit)X
+3210(session,)X
+3482(to)X
+3565(avoid)X
+3764(inadver-)X
+576 4044(tently)N
+781(making)X
+1044(modi\256cations)X
+1502(to)X
+1587(multiple)X
+1876(copies)X
+2104(of)X
+2194(the)X
+2315(\256le.)X
+2480(If)X
+2557(a)X
+2616(lock)X
+2777(cannot)X
+3014(be)X
+3113(obtained)X
+3412(for)X
+3529(a)X
+3587(\256le)X
+3711(because)X
+3988(it)X
+576 4134(is)N
+657(locked)X
+899(by)X
+1007(another)X
+1276(process,)X
+1565(the)X
+1691(edit)X
+1840(session)X
+2100(is)X
+2182(read-only)X
+2519(\(as)X
+2642(if)X
+2720(the)X
+3 f
+2847(readonly)X
+1 f
+3178(option)X
+3411(or)X
+3507(the)X
+3 f
+9 f
+3634(-)X
+3636(-)X
+3 f
+3680(R)X
+1 f
+3767(\257ag)X
+3916(had)X
+576 4224(been)N
+754(speci\256ed\).)X
+1132(If)X
+1212(a)X
+1274(lock)X
+1438(cannot)X
+1678(be)X
+1780(obtained)X
+2082(for)X
+2202(other)X
+2393(reasons,)X
+2680(the)X
+2804(edit)X
+2950(session)X
+3207(will)X
+3357(continue,)X
+3679(but)X
+3807(the)X
+3930(\256le)X
+576 4314(status)N
+778(information)X
+1176(\(see)X
+1326(the)X
+3 f
+1444(<control-G>)X
+1 f
+1890(command\))X
+2253(will)X
+2397(re\257ect)X
+2618(this)X
+2753(fact.)X
+776 4437(Both)N
+3 f
+955(ex)X
+1 f
+1055(and)X
+3 f
+1195(vi)X
+1 f
+1281(are)X
+1405(modeful)X
+1697(editors,)X
+1960(i.e.)X
+2083(they)X
+2246(have)X
+2423(two)X
+2568(modes,)X
+2822(``command'')X
+3271(mode)X
+3474(and)X
+3615(``text)X
+3814(input'')X
+576 4527(mode.)N
+817(The)X
+965(former)X
+1207(is)X
+1283(intended)X
+1582(to)X
+1667(permit)X
+1898(you)X
+2040(to)X
+2124(enter)X
+2307(commands)X
+2676(which)X
+2894(modi\256es)X
+3191(already)X
+3450(existing)X
+3725(text.)X
+3907(The)X
+576 4617(latter)N
+762(is)X
+836(intended)X
+1133(to)X
+1216(permit)X
+1446(you)X
+1588(to)X
+1672(enter)X
+1855(new)X
+2011(text.)X
+2193(When)X
+3 f
+2407(ex)X
+1 f
+2505(\256rst)X
+2651(starts)X
+2842(running,)X
+3133(it)X
+3199(is)X
+3274(in)X
+3358(command)X
+3696(mode,)X
+3916(and)X
+576 4707(usually)N
+838(displays)X
+1131(a)X
+1198(prompt)X
+1460(\(see)X
+1621(the)X
+3 f
+1750(prompt)X
+1 f
+2039(option)X
+2274(for)X
+2398(more)X
+2593(information\).)X
+3068(The)X
+3223(prompt)X
+3484(is)X
+3567(a)X
+3633(single)X
+3854(colon)X
+576 4797(\(``)N
+7 f
+657(:)X
+1 f
+(''\))S
+817(character.)X
+1184(There)X
+1403(are)X
+1533(three)X
+1725(commands)X
+2103(that)X
+2255(switch)X
+3 f
+2496(ex)X
+1 f
+2604(into)X
+2760(text)X
+2912(input)X
+3108(mode:)X
+3 f
+3340(append)X
+1 f
+3592(,)X
+3 f
+3644(change)X
+1 f
+3916(and)X
+3 f
+576 4887(insert)N
+1 f
+772(.)X
+840(Once)X
+1038(in)X
+1128(input)X
+1320(mode,)X
+1546(entering)X
+1837(a)X
+1901(line)X
+2049(containing)X
+2415(only)X
+2585(a)X
+2649(single)X
+2868(period)X
+3101(\(``)X
+7 f
+3182(.)X
+1 f
+(''\))S
+3359(terminates)X
+3721(text)X
+3868(input)X
+576 4977(mode)N
+774(and)X
+910(returns)X
+1153(to)X
+1235(command)X
+1571(mode,)X
+1789(where)X
+2006(the)X
+2124(prompt)X
+2375(is)X
+2448(redisplayed.)X
+776 5100(When)N
+3 f
+989(vi)X
+1 f
+1072(\256rst)X
+1217(starts)X
+1407(running,)X
+1697(it)X
+1763(is)X
+1838(in)X
+1922(command)X
+2260(mode)X
+2460(as)X
+2549(well.)X
+2749(There)X
+2959(are)X
+3080(eleven)X
+3312(commands)X
+3681(that)X
+3823(switch)X
+3 f
+576 5190(vi)N
+1 f
+659(into)X
+804(text)X
+945(input)X
+1130(mode:)X
+3 f
+1351(A)X
+1 f
+1409(,)X
+3 f
+1450(a)X
+1 f
+(,)S
+3 f
+1531(C)X
+1 f
+1589(,)X
+3 f
+1629(c)X
+1 f
+1665(,)X
+3 f
+1705(I)X
+1 f
+1736(,)X
+3 f
+1776(i)X
+1 f
+1798(,)X
+3 f
+1838(O)X
+1 f
+1900(,)X
+3 f
+1940(o)X
+1 f
+(,)S
+3 f
+2020(R)X
+1 f
+2078(,)X
+3 f
+2118(S)X
+1 f
+2182(and)X
+3 f
+2318(s)X
+1 f
+2349(.)X
+2409(Once)X
+2599(in)X
+2681(input)X
+2865(mode,)X
+3083(entering)X
+3366(an)X
+7 f
+3462(<escape>)X
+1 f
+3866(char-)X
+576 5280(acter)N
+753(terminates)X
+1107(text)X
+1247(input)X
+1431(mode)X
+1629(and)X
+1765(returns)X
+2008(to)X
+2090(command)X
+2426(mode.)X
+776 5403(The)N
+921(following)X
+1252(words)X
+1468(have)X
+1640(special)X
+1883(meanings)X
+2210(in)X
+2292(both)X
+2454(the)X
+3 f
+2572(ex)X
+1 f
+2668(and)X
+3 f
+2804(vi)X
+1 f
+2886(command)X
+3222(descriptions:)X
+3 f
+576 5583(<interrupt>)N
+1 f
+776 5673(The)N
+927(interrupt)X
+1229(character)X
+1551(is)X
+1630(used)X
+1803(to)X
+1891(interrupt)X
+2193(the)X
+2317(current)X
+2571(operation.)X
+2940(Normally)X
+7 f
+3274(<control-C>)X
+1 f
+(,)S
+3849(what-)X
+776 5763(ever)N
+935(character)X
+1251(is)X
+1324(set)X
+1433(for)X
+1547(the)X
+1665(current)X
+1913(terminal)X
+2200(is)X
+2273(used.)X
+
+8 p
+%%Page: 8 7
+10 s 10 xH 0 xS 1 f 1 i
+3 f
+576 474(USD:13-8)N
+3391(Nvi/Nex)X
+3687 0.3906(Reference)AX
+576 762(<literal)N
+847(next>)X
+1 f
+776 852(The)N
+923(literal)X
+1132(next)X
+1292(character)X
+1610(is)X
+1685(used)X
+1854(to)X
+1938(escape)X
+2175(the)X
+2295(subsequent)X
+2673(character)X
+2991(from)X
+3169(any)X
+3307(special)X
+3552(meaning.)X
+3890(This)X
+776 942(character)N
+1102(is)X
+1185(always)X
+7 f
+1438(<control-V>)X
+1 f
+(.)S
+2036(If)X
+2120(the)X
+2248(terminal)X
+2545(is)X
+2627(not)X
+2758(set)X
+2876(up)X
+2985(to)X
+3076(do)X
+3185(XON/XOFF)X
+3614(\257ow)X
+3785(control,)X
+776 1032(then)N
+7 f
+934(<control-Q>)X
+1 f
+1482(is)X
+1555(used)X
+1722(to)X
+1804(mean)X
+1998(literal)X
+2205(next)X
+2363(as)X
+2450(well.)X
+3 f
+576 1212(current)N
+855(pathname)X
+1 f
+776 1302(The)N
+923(pathname)X
+1257(of)X
+1346(the)X
+1467(\256le)X
+1592(currently)X
+1905(being)X
+2106(edited)X
+2325(by)X
+2428(vi.)X
+2553(When)X
+2768(the)X
+2889(percent)X
+3149(character)X
+3468(\(``)X
+7 f
+3549(%)X
+1 f
+(''\))S
+3701(appears)X
+3970(in)X
+776 1392(a)N
+833(\256le)X
+956(name)X
+1151(entered)X
+1409(as)X
+1497(part)X
+1643(of)X
+1731(an)X
+3 f
+1828(ex)X
+1 f
+1925(command)X
+2262(argument,)X
+2606(it)X
+2671(is)X
+2745(replaced)X
+3039(by)X
+3140(the)X
+3259(current)X
+3508(pathname.)X
+3880(\(The)X
+776 1482(``)N
+7 f
+830(%)X
+1 f
+('')S
+952(character)X
+1268(can)X
+1400(be)X
+1496(escaped)X
+1771(by)X
+1871(preceding)X
+2208(it)X
+2272(with)X
+2434(a)X
+2490(backslash.\))X
+3 f
+576 1662(alternate)N
+904(pathname)X
+1 f
+776 1752(The)N
+921(name)X
+1115(of)X
+1202(the)X
+1320(last)X
+1451(\256le)X
+1573(name)X
+1767(mentioned)X
+2125(in)X
+2207(an)X
+3 f
+2304(ex)X
+1 f
+2401(command,)X
+2758(or,)X
+2866(the)X
+2985(previous)X
+3282(current)X
+3531(pathname)X
+3864(if)X
+3934(the)X
+776 1842(last)N
+913(\256le)X
+1041(mentioned)X
+1404(becomes)X
+1710(the)X
+1833(current)X
+2086(\256le.)X
+2253(When)X
+2470(the)X
+2593(hash)X
+2765(mark)X
+2955(character)X
+3276(\(``)X
+7 f
+3357(#)X
+1 f
+(''\))S
+3511(appears)X
+3782(in)X
+3869(a)X
+3930(\256le)X
+776 1932(name)N
+979(entered)X
+1245(as)X
+1341(part)X
+1495(of)X
+1591(an)X
+3 f
+1696(ex)X
+1 f
+1801(command)X
+2146(argument,)X
+2498(it)X
+2571(is)X
+2653(replaced)X
+2955(by)X
+3064(the)X
+3191(alternate)X
+3498(pathname.)X
+3880(\(The)X
+776 2022(``)N
+7 f
+830(#)X
+1 f
+('')S
+952(character)X
+1268(can)X
+1400(be)X
+1496(escaped)X
+1771(by)X
+1871(preceding)X
+2208(it)X
+2272(with)X
+2434(a)X
+2490(backslash.\))X
+3 f
+576 2202(buffer)N
+1 f
+776 2292(One)N
+931(of)X
+1019(a)X
+1076(number)X
+1342(of)X
+1430(named)X
+1665(areas)X
+1852(for)X
+1968(saving)X
+2199(copies)X
+2426(of)X
+2515(text.)X
+2697(Commands)X
+3083(that)X
+3225(change)X
+3475(or)X
+3564(delete)X
+3778(text)X
+3920(can)X
+776 2382(save)N
+941(the)X
+1061(changed)X
+1351(or)X
+1440(deleted)X
+1693(text)X
+1834(into)X
+1979(a)X
+2036(speci\256c)X
+2302(buffer,)X
+2540(for)X
+2655(later)X
+2819(use,)X
+2967(if)X
+3037(the)X
+3156(command)X
+3493(allows)X
+3723(it)X
+3788(\(i.e.)X
+3934(the)X
+3 f
+776 2472(ex)N
+872(change)X
+1 f
+1132(command)X
+1468(cannot)X
+1702(save)X
+1866(the)X
+1985(changed)X
+2274(text)X
+2415(in)X
+2498(a)X
+2555(named)X
+2790(buffer\).)X
+3075(Buffers)X
+3337(are)X
+3457(named)X
+3692(with)X
+3855(a)X
+3912(sin-)X
+776 2562(gle)N
+895(character,)X
+1232(preceded)X
+1544(by)X
+1645(a)X
+1702(double)X
+1941(quote,)X
+2160(e.g.)X
+7 f
+2317("<character>)X
+1 f
+(.)S
+2954(Historic)X
+3232(implementations)X
+3785(of)X
+3 f
+3872(ex)X
+1 f
+3948(/)X
+3 f
+3970(vi)X
+1 f
+776 2652(limited)N
+7 f
+1022(<character>)X
+1 f
+1570(to)X
+1652(the)X
+1770(alphanumeric)X
+2227(characters;)X
+3 f
+2596(nex)X
+1 f
+(/)S
+3 f
+2738(nvi)X
+1 f
+2864(permits)X
+3124(the)X
+3242(use)X
+3369(of)X
+3456(any)X
+3592(character.)X
+776 2832(Buffers)N
+1041(named)X
+1279(by)X
+1383(uppercase)X
+1729(characters)X
+2080(are)X
+2203(the)X
+2325(same)X
+2514(as)X
+2605(buffers)X
+2857(named)X
+3095(by)X
+3199(lowercase)X
+3545(characters,)X
+3916(e.g.)X
+776 2922(the)N
+904(buffer)X
+1131(named)X
+1375(by)X
+1485(the)X
+1613(English)X
+1887(character)X
+2213(``)X
+7 f
+2267(A)X
+1 f
+('')S
+2399(is)X
+2482(the)X
+2610(same)X
+2805(as)X
+2902(the)X
+3030(buffer)X
+3257(named)X
+3500(by)X
+3609(the)X
+3736(character)X
+776 3012(``)N
+7 f
+830(a)X
+1 f
+('',)S
+977(with)X
+1144(the)X
+1267(exception)X
+1604(that,)X
+1769(if)X
+1843(the)X
+1966(buffer)X
+2188(contents)X
+2480(are)X
+2604(being)X
+2807(changed)X
+3100(\(as)X
+3219(with)X
+3386(a)X
+3447(text)X
+3593(deletion)X
+3877(or)X
+3 f
+3970(vi)X
+776 3102(change)N
+1 f
+1036(command\),)X
+1419(the)X
+1537(text)X
+1677(is)X
+2 f
+1750(appended)X
+1 f
+2082(to)X
+2164(the)X
+2282(buffer,)X
+2519(instead)X
+2766(of)X
+2853(replacing)X
+3172(the)X
+3290(current)X
+3538(contents.)X
+776 3282(The)N
+925(buffers)X
+1177(named)X
+1415(by)X
+1519(the)X
+1641(numeric)X
+1928(characters)X
+2279(\(in)X
+2392(English,)X
+2680(``)X
+7 f
+2734(1)X
+1 f
+('')S
+2860(through)X
+3133(``)X
+7 f
+3187(9)X
+1 f
+(''\),)S
+3360(are)X
+3483(special,)X
+3751(in)X
+3838(that)X
+3983(if)X
+776 3372(at)N
+864(least)X
+1041(one)X
+1187(line)X
+1337(is)X
+1420(changed)X
+1718(or)X
+1814(deleted)X
+2075(in)X
+2166(the)X
+2293(\256le,)X
+2444(\(or)X
+2567(a)X
+2632(command)X
+2977(changes)X
+3265(or)X
+3361(deletes)X
+3613(a)X
+3678(region)X
+3912(that)X
+776 3462(crosses)N
+1032(a)X
+1093(line)X
+1238(boundary\))X
+1593(a)X
+1654(copy)X
+1835(of)X
+1927(the)X
+2050(text)X
+2195(is)X
+2273(placed)X
+2508(into)X
+2657(the)X
+2780(numeric)X
+3068(buffer)X
+3290(``)X
+7 f
+3344(1)X
+1 f
+('',)S
+3491(regardless)X
+3842(of)X
+3934(the)X
+776 3552(user)N
+933(specifying)X
+1290(another)X
+1553(buffer)X
+1772(in)X
+1856(which)X
+2074(to)X
+2158(save)X
+2323(it.)X
+2429(Before)X
+2670(this)X
+2807(copy)X
+2985(is)X
+3060(done,)X
+3258(the)X
+3378(previous)X
+3676(contents)X
+3965(of)X
+776 3642(buffer)N
+1000(``)X
+7 f
+1054(1)X
+1 f
+('')S
+1183(are)X
+1309(moved)X
+1555(into)X
+1707(buffer)X
+1932(``)X
+7 f
+1986(2)X
+1 f
+('',)S
+2136(``)X
+7 f
+2190(2)X
+1 f
+('')S
+2320(into)X
+2472(buffer)X
+2697(``)X
+7 f
+2751(3)X
+1 f
+('',)S
+2901(and)X
+3045(so)X
+3144(on.)X
+3292(The)X
+3445(contents)X
+3740(of)X
+3835(buffer)X
+776 3732(``)N
+7 f
+830(9)X
+1 f
+('')S
+961(are)X
+1089(discarded.)X
+1466(In)X
+3 f
+1562(vi)X
+1 f
+1624(,)X
+1672(text)X
+1820(may)X
+1986(be)X
+2090(explicitly)X
+2420(stored)X
+2644(into)X
+2796(the)X
+2922(numeric)X
+3213(buffers.)X
+3509(In)X
+3604(this)X
+3747(case,)X
+3934(the)X
+776 3822(buffer)N
+995(rotation)X
+1266(described)X
+1596(above)X
+1810(occurs)X
+2042(before)X
+2270(the)X
+2390(replacement)X
+2805(of)X
+2894(the)X
+3014(buffer's)X
+3291(contents.)X
+3621(\(Text)X
+3818(cannot)X
+776 3912(be)N
+874(explicitly)X
+1198(stored)X
+1416(into)X
+1562(the)X
+1682(numeric)X
+1966(buffers)X
+2215(in)X
+3 f
+2298(ex)X
+1 f
+2395(because)X
+2671(of)X
+2759(ambiguities)X
+3153(that)X
+3294(this)X
+3430(would)X
+3651(cause)X
+3851(in)X
+3934(the)X
+3 f
+776 4002(ex)N
+1 f
+872(command)X
+1208(syntax.\))X
+776 4182(When)N
+991(a)X
+3 f
+1051(vi)X
+1 f
+1137(command)X
+1477(synopsis)X
+1776(shows)X
+2000(both)X
+2166(a)X
+7 f
+2226([buffer])X
+1 f
+2634(and)X
+2774(a)X
+7 f
+2834([count])X
+1 f
+(,)S
+3214(they)X
+3376(may)X
+3538(be)X
+3638(presented)X
+3970(in)X
+776 4272(any)N
+912(order.)X
+776 4452(Finally,)N
+1052(all)X
+1162(buffers)X
+1420(are)X
+1549(either)X
+1762(``line'')X
+2020(or)X
+2117 0.3750(``character'')AX
+2551(oriented.)X
+2884(All)X
+3 f
+3016(ex)X
+1 f
+3122(commands)X
+3499(which)X
+3725(store)X
+3912(text)X
+776 4542(into)N
+922(buffers)X
+1172(are)X
+1293(line)X
+1435(oriented.)X
+1760(Some)X
+3 f
+1964(vi)X
+1 f
+2048(commands)X
+2417(which)X
+2635(store)X
+2813(text)X
+2955(into)X
+3101(buffers)X
+3351(are)X
+3471(line)X
+3612(oriented,)X
+3916(and)X
+776 4632(some)N
+980(are)X
+1114(character)X
+1445(oriented;)X
+1765(the)X
+1898(description)X
+2289(for)X
+2418(each)X
+2601(applicable)X
+3 f
+2966(vi)X
+1 f
+3063(command)X
+3414(notes)X
+3618(whether)X
+3912(text)X
+776 4722(copied)N
+1020(into)X
+1174(buffers)X
+1432(using)X
+1635(the)X
+1762(command)X
+2107(is)X
+2189(line)X
+2338(or)X
+2434(character)X
+2759(oriented.)X
+3091(In)X
+3187(addition,)X
+3498(the)X
+3 f
+3625(vi)X
+1 f
+3716(command)X
+3 f
+776 4812(display)N
+1053(buffers)X
+1 f
+1332(displays)X
+1628(the)X
+1760(current)X
+2023(orientation)X
+2405(for)X
+2534(each)X
+2717(buffer.)X
+2989(Generally,)X
+3361(the)X
+3494(only)X
+3671(importance)X
+776 4902(attached)N
+1074(to)X
+1166(this)X
+1311(orientation)X
+1688(is)X
+1771(that)X
+1921(if)X
+2000(the)X
+2128(buffer)X
+2355(is)X
+2438(subsequently)X
+2886(inserted)X
+3170(into)X
+3324(the)X
+3451(text,)X
+3620(line)X
+3769(oriented)X
+776 4992(buffers)N
+1027(create)X
+1243(new)X
+1400(lines)X
+1574(for)X
+1691(each)X
+1862(of)X
+1952(the)X
+2073(lines)X
+2247(they)X
+2408(contain,)X
+2687(and)X
+2826(character)X
+3145(oriented)X
+3431(buffers)X
+3682(create)X
+3898(new)X
+776 5082(lines)N
+951(for)X
+1069(any)X
+1209(lines)X
+2 f
+1384(other)X
+1 f
+1577(than)X
+1739(the)X
+1860(\256rst)X
+2007(and)X
+2146(last)X
+2280(lines)X
+2454(they)X
+2615(contain.)X
+2914(The)X
+3062(\256rst)X
+3209(and)X
+3348(last)X
+3482(lines)X
+3656(are)X
+3778(inserted)X
+776 5172(into)N
+927(the)X
+1052(text)X
+1199(at)X
+1284(the)X
+1409(current)X
+1664(cursor)X
+1892(position,)X
+2196(becoming)X
+2539(part)X
+2691(of)X
+2785(the)X
+2910(current)X
+3165(line.)X
+3352(If)X
+3433(there)X
+3621(is)X
+3701(more)X
+3894(than)X
+776 5262(one)N
+912(line)X
+1052(in)X
+1134(the)X
+1252(buffer,)X
+1489(however,)X
+1806(the)X
+1924(current)X
+2172(line)X
+2312(itself)X
+2492(will)X
+2636(be)X
+2732(split.)X
+3 f
+576 5442(unnamed)N
+915(buffer)X
+1 f
+776 5532(The)N
+924(unnamed)X
+1241(buffer)X
+1461(is)X
+1537(a)X
+1596(text)X
+1739(storage)X
+1994(area)X
+2152(which)X
+2371(is)X
+2447(used)X
+2617(by)X
+2720(commands)X
+3090(that)X
+3233(take)X
+3390(a)X
+3450(buffer)X
+3671(as)X
+3762(an)X
+3862(argu-)X
+776 5622(ment,)N
+976(when)X
+1170(no)X
+1270(buffer)X
+1487(is)X
+1560(speci\256ed)X
+1865(by)X
+1965(the)X
+2083(user.)X
+2277(There)X
+2485(is)X
+2558(no)X
+2658(way)X
+2812(to)X
+2894(explicitly)X
+3216 0.4531(reference)AX
+3537(this)X
+3672(buffer.)X
+
+9 p
+%%Page: 9 8
+10 s 10 xH 0 xS 1 f 1 i
+3 f
+576 474(Nvi/Nex)N
+872 0.3906(Reference)AX
+1237(\(Vi)X
+1364(Commands\))X
+3698(USD:13-9)X
+576 762(9.)N
+676(Vi)X
+776(Description)X
+1 f
+3 f
+776 885(Vi)N
+1 f
+879(takes)X
+1067(up)X
+1170(the)X
+1291(entire)X
+1497(screen)X
+1727(to)X
+1813(display)X
+2068(the)X
+2190(edited)X
+2410(\256le,)X
+2556(except)X
+2790(for)X
+2908(the)X
+3030(bottom)X
+3280(line)X
+3424(of)X
+3515(the)X
+3637(screen.)X
+3907(The)X
+576 975(bottom)N
+824(line)X
+966(of)X
+1055(the)X
+1175(screen)X
+1403(is)X
+1478(used)X
+1647(to)X
+1731(enter)X
+3 f
+1914(ex)X
+1 f
+2012(commands,)X
+2401(and)X
+2539(for)X
+3 f
+2655(vi)X
+1 f
+2739(error)X
+2918(and)X
+3056(informational)X
+3513(messages.)X
+3877(If)X
+3952(no)X
+576 1065(other)N
+777(information)X
+1191(is)X
+1281(being)X
+1496(displayed,)X
+1860(the)X
+1995(default)X
+2255(display)X
+2523(can)X
+2672(show)X
+2878(the)X
+3013(current)X
+3278(cursor)X
+3516(row)X
+3678(and)X
+3831(cursor)X
+576 1155(column,)N
+863(an)X
+966(indication)X
+1313(of)X
+1407(whether)X
+1693(the)X
+1818(\256le)X
+1947(has)X
+2081(been)X
+2260(modi\256ed,)X
+2591(and)X
+2734(the)X
+2859(current)X
+3114(mode)X
+3319(of)X
+3413(the)X
+3538(editor.)X
+3792(See)X
+3934(the)X
+3 f
+576 1245(ruler)N
+1 f
+750(,)X
+3 f
+790(showdirty)X
+1 f
+1152(and)X
+3 f
+1288(showmode)X
+1 f
+1668(options)X
+1923(for)X
+2037(more)X
+2222(information.)X
+776 1368(Empty)N
+1012(lines)X
+1186(do)X
+1289(not)X
+1414(have)X
+1589(any)X
+1729(special)X
+1976(representation)X
+2455(on)X
+2559(the)X
+2681(screen,)X
+2931(but)X
+3057(lines)X
+3232(on)X
+3336(the)X
+3458(screen)X
+3688(that)X
+3832(would)X
+576 1458(logically)N
+886(come)X
+1090(after)X
+1268(the)X
+1396(end)X
+1542(of)X
+1639(the)X
+1767(\256le)X
+1899(are)X
+2028(displayed)X
+2365(as)X
+2461(a)X
+2526(single)X
+2746(tilde)X
+2917(\(``)X
+7 f
+2998(\304)X
+1 f
+(''\))S
+3156(character.)X
+3521(To)X
+3639(differentiate)X
+576 1548(between)N
+871(empty)X
+1098(lines)X
+1276(and)X
+1419(lines)X
+1597(consisting)X
+1948(of)X
+2042(only)X
+2211(whitespace)X
+2596(characters,)X
+2971(use)X
+3106(the)X
+3 f
+3232(list)X
+1 f
+3362(option.)X
+3634(Historically,)X
+576 1638(implementations)N
+1130(of)X
+3 f
+1218(vi)X
+1 f
+1301(have)X
+1474(also)X
+1624(displayed)X
+1952(some)X
+2141(lines)X
+2312(as)X
+2399(single)X
+2610(asterisk)X
+2875(\(``)X
+7 f
+2956(@)X
+1 f
+(''\))S
+3105(characters.)X
+3492(These)X
+3704(were)X
+3881(lines)X
+576 1728(that)N
+717(were)X
+895(not)X
+1018(correctly)X
+1326(displayed,)X
+1675(i.e.)X
+1795(lines)X
+1968(on)X
+2070(the)X
+2190(screen)X
+2418(that)X
+2560(did)X
+2684(not)X
+2808(correspond)X
+3187(to)X
+3271(lines)X
+3444(in)X
+3528(the)X
+3648(\256le,)X
+3792(or)X
+3881(lines)X
+576 1818(that)N
+716(did)X
+838(not)X
+960(\256t)X
+1046(on)X
+1146(the)X
+1264(current)X
+1512(screen.)X
+3 f
+1778(Nvi)X
+1 f
+1918(never)X
+2117(displays)X
+2399(lines)X
+2570(in)X
+2652(this)X
+2787(fashion.)X
+3 f
+776 1941(Vi)N
+1 f
+881(is)X
+959(a)X
+1020(modeful)X
+1312(editor,)X
+1544(i.e.)X
+1667(it)X
+1736(has)X
+1868(two)X
+2013(modes,)X
+2268(``command'')X
+2718(mode)X
+2922(and)X
+3064(``text)X
+3264(input'')X
+3508(mode.)X
+3752(When)X
+3 f
+3970(vi)X
+1 f
+576 2031(\256rst)N
+724(starts,)X
+937(it)X
+1005(is)X
+1082(in)X
+1168(command)X
+1508(mode.)X
+1750(There)X
+1962(are)X
+2085(several)X
+2337(commands)X
+2708(that)X
+2852(change)X
+3 f
+3104(vi)X
+1 f
+3189(into)X
+3336(text)X
+3479(input)X
+3666(mode.)X
+3907(The)X
+7 f
+576 2121(<escape>)N
+1 f
+980(character)X
+1296(is)X
+1369(used)X
+1536(to)X
+1618(resolve)X
+1870(the)X
+1988(text)X
+2128(input)X
+2312(into)X
+2456(the)X
+2574(\256le,)X
+2716(and)X
+2852(exit)X
+2992(back)X
+3164(into)X
+3308(command)X
+3644(mode.)X
+3882(In)X
+3 f
+3970(vi)X
+1 f
+576 2211(command)N
+916(mode,)X
+1138(the)X
+1260(cursor)X
+1485(is)X
+1562(always)X
+1809(positioned)X
+2166(on)X
+2269(the)X
+2390(last)X
+2524(column)X
+2787(of)X
+2877(characters)X
+3227(which)X
+3446(take)X
+3603(up)X
+3706(more)X
+3894(than)X
+576 2301(one)N
+714(column)X
+976(on)X
+1078(the)X
+1198(screen.)X
+1466(In)X
+3 f
+1555(vi)X
+1 f
+1639(text)X
+1782(insert)X
+1983(mode,)X
+2204(the)X
+2325(cursor)X
+2549(is)X
+2625(positioned)X
+2981(on)X
+3084(the)X
+3205(\256rst)X
+3352(column)X
+3615(of)X
+3705(characters)X
+576 2391(which)N
+792(take)X
+946(up)X
+1046(more)X
+1231(than)X
+1389(one)X
+1525(column)X
+1785(on)X
+1885(the)X
+2003(screen.)X
+776 2514(Generally,)N
+1138(if)X
+1212(the)X
+1335(cursor)X
+1561(line)X
+1707(and)X
+1849(cursor)X
+2076(column)X
+2342(are)X
+2467(not)X
+2595(on)X
+2701(the)X
+2825(screen,)X
+3077(then)X
+3241(the)X
+3365(screen)X
+3597(is)X
+3676(scrolled)X
+3956(\(if)X
+576 2604(the)N
+695(target)X
+899(cursor)X
+1121(is)X
+1195(close\))X
+1407(or)X
+1494(repainted)X
+1813(\(if)X
+1909(the)X
+2027(target)X
+2230(cursor)X
+2451(is)X
+2524(far)X
+2634(away\))X
+2851(so)X
+2942(that)X
+3082(the)X
+3200(cursor)X
+3421(is)X
+3494(on)X
+3594(the)X
+3712(screen.)X
+3978(If)X
+576 2694(the)N
+699(screen)X
+930(is)X
+1009(scrolled,)X
+1309(it)X
+1379(is)X
+1458(moved)X
+1702(a)X
+1764(minimal)X
+2056(amount,)X
+2342(and)X
+2484(the)X
+2608(cursor)X
+2835(line)X
+2981(will)X
+3131(usually)X
+3388(appear)X
+3629(at)X
+3713(the)X
+3837(top)X
+3965(or)X
+576 2784(bottom)N
+832(of)X
+929(the)X
+1057(screen.)X
+1333(In)X
+1430(the)X
+1558(screen)X
+1794(is)X
+1877(repainted,)X
+2226(the)X
+2354(cursor)X
+2585(line)X
+2735(will)X
+2889(appear)X
+3134(in)X
+3226(the)X
+3354(center)X
+3581(of)X
+3678(the)X
+3806(screen,)X
+576 2874(unless)N
+799(the)X
+920(cursor)X
+1144(is)X
+1220(suf\256ciently)X
+1603(close)X
+1791(to)X
+1876(the)X
+1997(beginning)X
+2340(or)X
+2430(end)X
+2569(of)X
+2660(the)X
+2782(\256le)X
+2908(that)X
+3052(this)X
+3191(is)X
+3268(not)X
+3394(possible.)X
+3720(If)X
+3798(the)X
+3 f
+3920(lef-)X
+576 2964(tright)N
+1 f
+794(option)X
+1020(is)X
+1095(set,)X
+1226(the)X
+1346(screen)X
+1574(may)X
+1734(be)X
+1832(scrolled)X
+2108(or)X
+2197(repainted)X
+2518(in)X
+2602(a)X
+2660(horizontal)X
+3007(direction)X
+3314(as)X
+3403(well)X
+3563(as)X
+3651(in)X
+3734(a)X
+3791(vertical)X
+576 3054(one.)N
+776 3177(A)N
+869(major)X
+1091(difference)X
+1453(between)X
+1756(the)X
+1889(historical)X
+3 f
+2222(vi)X
+1 f
+2319(presentation)X
+2746(and)X
+3 f
+2897(nvi)X
+1 f
+3038(is)X
+3126(in)X
+3224(the)X
+3358(scrolling)X
+3674(and)X
+3826(screen)X
+576 3267(oriented)N
+893(position)X
+1204(commands,)X
+3 f
+1625(<control-B>)X
+1 f
+2042(,)X
+3 f
+2116(<control-D>)X
+1 f
+2538(,)X
+3 f
+2612(<control-E>)X
+1 f
+3029(,)X
+3 f
+3103(<control-F>)X
+1 f
+3516(,)X
+3 f
+3590(<control-U>)X
+1 f
+4012(,)X
+3 f
+576 3357(<control-Y>)N
+1 f
+998(,)X
+3 f
+1049(H)X
+1 f
+1111(,)X
+3 f
+1162(L)X
+1 f
+1246(and)X
+3 f
+1394(M)X
+1 f
+1470(.)X
+1542(In)X
+1641(historical)X
+1971(implementations)X
+2536(of)X
+3 f
+2635(vi)X
+1 f
+2697(,)X
+2749(these)X
+2946(commands)X
+3325(acted)X
+3527(on)X
+3639(physical)X
+3938(\(as)X
+576 3447(opposed)N
+877(to)X
+973(logical,)X
+1245(or)X
+1346(screen\))X
+1613(lines.)X
+1838(For)X
+1982(lines)X
+2166(that)X
+2319(were)X
+2509(suf\256ciently)X
+2902(long)X
+3077(in)X
+3172(relation)X
+3450(to)X
+3545(the)X
+3676(size)X
+3834(of)X
+3934(the)X
+576 3537(screen,)N
+822(this)X
+957(meant)X
+1174(that)X
+1315(single)X
+1527(line)X
+1668(scroll)X
+1867(commands)X
+2235(might)X
+2442(repaint)X
+2686(the)X
+2805(entire)X
+3009(screen,)X
+3256(scrolling)X
+3557(or)X
+3645(screen)X
+3872(posi-)X
+576 3627(tioning)N
+823(command)X
+1160(might)X
+1367(not)X
+1489(change)X
+1737(the)X
+1855(screen)X
+2081(or)X
+2168(move)X
+2366(the)X
+2484(cursor)X
+2705(at)X
+2783(all,)X
+2903(and)X
+3039(some)X
+3228(lines)X
+3399(simply)X
+3636(could)X
+3834(not)X
+3956(be)X
+576 3717(displayed,)N
+927(even)X
+1104(though)X
+3 f
+1351(vi)X
+1 f
+1438(would)X
+1663(edit)X
+1808(the)X
+1931(\256le)X
+2058(that)X
+2203(contained)X
+2540(them.)X
+2765(In)X
+3 f
+2857(nvi)X
+1 f
+2963(,)X
+3008(these)X
+3198(commands)X
+3570(act)X
+3689(on)X
+3794(logical,)X
+576 3807(i.e.)N
+718(screen)X
+968(lines.)X
+1203(You)X
+1385(are)X
+1528(unlikely)X
+1834(to)X
+1939(notice)X
+2178(any)X
+2337(difference)X
+2707(unless)X
+2950(you)X
+3113(are)X
+3255(editing)X
+3520(\256les)X
+3696(with)X
+3881(lines)X
+576 3897(signi\256cantly)N
+991(longer)X
+1216(than)X
+1374(a)X
+1430(screen)X
+1656(width.)X
+3 f
+776 4020(Vi)N
+1 f
+883(keeps)X
+1094(track)X
+1283(of)X
+1378(the)X
+1504(currently)X
+1822(``most)X
+2059(attractive'')X
+2440(cursor)X
+2669(position.)X
+2994(Each)X
+3183(command)X
+3527(description)X
+3911(\(for)X
+576 4110(commands)N
+945(that)X
+1087(can)X
+1221(change)X
+1471(the)X
+1591(current)X
+1841(cursor)X
+2064(position\),)X
+2390(speci\256es)X
+2688(if)X
+2759(the)X
+2879(cursor)X
+3101(is)X
+3175(set)X
+3285(to)X
+3368(a)X
+3425(speci\256c)X
+3691(location)X
+3970(in)X
+576 4200(the)N
+705(line,)X
+876(or)X
+974(if)X
+1054(it)X
+1129(is)X
+1213(moved)X
+1462(to)X
+1555(the)X
+1685(``most)X
+1926(attractive)X
+2257(cursor)X
+2490(position''.)X
+2873(The)X
+3030(latter)X
+3227(means)X
+3464(that)X
+3616(the)X
+3746(cursor)X
+3979(is)X
+576 4290(moved)N
+825(to)X
+918(the)X
+1047(cursor)X
+1279(position)X
+1567(that)X
+1717(is)X
+1800(vertically)X
+2133(as)X
+2230(close)X
+2425(as)X
+2522(possible)X
+2814(to)X
+2906(the)X
+3034(current)X
+3292(cursor)X
+3523(position.)X
+3850(If)X
+3934(the)X
+576 4380(current)N
+826(line)X
+968(is)X
+1043(shorter)X
+1288(than)X
+1448(the)X
+1568(cursor)X
+1791(position)X
+3 f
+2070(vi)X
+1 f
+2154(would)X
+2376(select,)X
+2601(the)X
+2722(cursor)X
+2946(is)X
+3022(positioned)X
+3378(on)X
+3481(the)X
+3602(last)X
+3736(character)X
+576 4470(in)N
+666(the)X
+792(line.)X
+980(\(If)X
+1089(the)X
+1215(line)X
+1363(is)X
+1444(empty,)X
+1692(the)X
+1818(cursor)X
+2047(is)X
+2128(positioned)X
+2489(on)X
+2596(the)X
+2721(\256rst)X
+2872(column)X
+3139(of)X
+3233(the)X
+3358(line.\))X
+3572(If)X
+3653(a)X
+3716(command)X
+576 4560(moves)N
+810(the)X
+933(cursor)X
+1159(to)X
+1246(the)X
+1369(most)X
+1549(attractive)X
+1873(position,)X
+2175(it)X
+2245(does)X
+2418(not)X
+2546(alter)X
+2715(the)X
+2839(current)X
+3093(cursor)X
+3320(position,)X
+3623(and)X
+3765(a)X
+3827(subse-)X
+576 4650(quent)N
+775(movement)X
+1134(will)X
+1279(again)X
+1474(attempt)X
+1735(to)X
+1818(move)X
+2017(the)X
+2136(cursor)X
+2358(to)X
+2441(that)X
+2581(position.)X
+2898(Therefore,)X
+3256(although)X
+3556(a)X
+3612(movement)X
+3970(to)X
+576 4740(a)N
+640(line)X
+788(shorter)X
+1039(than)X
+1205(the)X
+1331(currently)X
+1649(most)X
+1832(attractive)X
+2159(position)X
+2444(will)X
+2596(cause)X
+2803(the)X
+2929(cursor)X
+3158(to)X
+3248(move)X
+3454(to)X
+3544(the)X
+3671(end)X
+3816(of)X
+3912(that)X
+576 4830(line,)N
+737(a)X
+794(subsequent)X
+1171(movement)X
+1530(to)X
+1613(a)X
+1670(longer)X
+1896(line)X
+2037(will)X
+2182(cause)X
+2382(the)X
+2501(cursor)X
+2723(to)X
+2806(move)X
+3005(back)X
+3178(to)X
+3260(the)X
+3378(most)X
+3553(attractive)X
+3872(posi-)X
+576 4920(tion.)N
+776 5043(In)N
+864(addition,)X
+1167(the)X
+3 f
+1286($)X
+1 f
+1347(command)X
+1684(makes)X
+1910(the)X
+2029(end)X
+2166(of)X
+2254(each)X
+2423(line)X
+2564(the)X
+2684(most)X
+2861(attractive)X
+3182(cursor)X
+3405(position)X
+3684(rather)X
+3894(than)X
+576 5133(a)N
+632(speci\256c)X
+897(column.)X
+776 5256(Each)N
+3 f
+958(vi)X
+1 f
+1042(command)X
+1380(described)X
+1710(below)X
+1928(notes)X
+2119(where)X
+2338(the)X
+2458(cursor)X
+2681(ends)X
+2850(up)X
+2952(after)X
+3122(it)X
+3188(is)X
+3263(executed.)X
+3611(This)X
+3775(position)X
+576 5346(is)N
+653(described)X
+985(in)X
+1071(terms)X
+1273(of)X
+1364(characters)X
+1715(on)X
+1819(the)X
+1940(line,)X
+2103(i.e.)X
+2244(``the)X
+2419(previous)X
+2718 0.3409(character'',)AX
+3111(or,)X
+3221(``the)X
+3396(last)X
+3530(character)X
+3849(in)X
+3934(the)X
+576 5436(line''.)N
+810(This)X
+972(is)X
+1045(to)X
+1127(avoid)X
+1325(needing)X
+1599(to)X
+1681(continually)X
+2061(refer)X
+2234(to)X
+2316(on)X
+2416(what)X
+2592(part)X
+2737(of)X
+2824(the)X
+2942(character)X
+3258(the)X
+3376(cursor)X
+3597(rests.)X
+776 5559(The)N
+921(following)X
+1252(words)X
+1468(have)X
+1640(special)X
+1883(meaning)X
+2179(for)X
+3 f
+2293(vi)X
+1 f
+2375(commands.)X
+
+10 p
+%%Page: 10 9
+10 s 10 xH 0 xS 1 f 1 i
+3 f
+576 474(USD:13-10)N
+2826(Nvi/Nex)X
+3122 0.3906(Reference)AX
+3487(\(Vi)X
+3614(Commands\))X
+576 762(previous)N
+889(context)X
+1 f
+776 852(The)N
+927(position)X
+1210(of)X
+1303(the)X
+1427(cursor)X
+1654(before)X
+1886(the)X
+2010(command)X
+2352(which)X
+2574(caused)X
+2819(the)X
+2944(last)X
+3082(absolute)X
+3376(movement)X
+3741(was)X
+3893(exe-)X
+776 942(cuted.)N
+1012(Each)X
+3 f
+1195(vi)X
+1 f
+1279(command)X
+1617(described)X
+1947(in)X
+2031(the)X
+2151(next)X
+2311(section)X
+2559(that)X
+2700(is)X
+2774(considered)X
+3143(an)X
+3240(absolute)X
+3528(movement)X
+3887(is)X
+3961(so)X
+776 1032(noted.)N
+1014(In)X
+1101(addition,)X
+1403(specifying)X
+2 f
+1757(any)X
+1 f
+1893(address)X
+2154(to)X
+2236(an)X
+3 f
+2332(ex)X
+1 f
+2428(command)X
+2764(is)X
+2837(considered)X
+3205(an)X
+3301(absolute)X
+3588(movement.)X
+3 f
+576 1212(motion)N
+1 f
+776 1302(A)N
+863(second)X
+3 f
+1115(vi)X
+1 f
+1206(command)X
+1551(can)X
+1693(be)X
+1799(used)X
+1976(as)X
+2073(an)X
+2179(optional)X
+2471(trailing)X
+2732(argument)X
+3065(to)X
+3157(the)X
+3 f
+3285(vi)X
+3377(!)X
+1 f
+3404(,)X
+3 f
+3454(<)X
+1 f
+3500(,)X
+3 f
+3550(>)X
+1 f
+3596(,)X
+3 f
+3646(c)X
+1 f
+3682(,)X
+3 f
+3732(d)X
+1 f
+3776(,)X
+3 f
+3826(y)X
+1 f
+(,)S
+3916(and)X
+776 1392(\(depending)N
+1158(on)X
+1259(the)X
+3 f
+1378(tildeop)X
+1 f
+1633(option\))X
+3 f
+1884(\304)X
+1 f
+1931(commands.)X
+2338(This)X
+2500(command)X
+2836(indicates)X
+3141(the)X
+3259(end)X
+3395(of)X
+3482(the)X
+3600(region)X
+3825(of)X
+3912(text)X
+776 1482(that's)N
+993(affected)X
+1292(by)X
+1411(the)X
+1548(command.)X
+1943(The)X
+2107(motion)X
+2372(command)X
+2727(may)X
+2904(be)X
+3019(either)X
+3242(the)X
+3380(command)X
+3736(character)X
+776 1572(repeated)N
+1070(\(in)X
+1180(which)X
+1397(case)X
+1557(it)X
+1622(means)X
+1848(the)X
+1967(current)X
+2216(line\))X
+2384(or)X
+2472(a)X
+2528(cursor)X
+2749(movement)X
+3107(command.)X
+3483(In)X
+3570(the)X
+3688(latter)X
+3873(case,)X
+776 1662(the)N
+894(region)X
+1119(affected)X
+1399(by)X
+1499(the)X
+1617(command)X
+1953(is)X
+2026(from)X
+2202(the)X
+2320(starting)X
+2581(or)X
+2669(stopping)X
+2965(cursor)X
+3187(position)X
+3465(which)X
+3682(comes)X
+3908(\256rst)X
+776 1752(in)N
+859(the)X
+978(\256le,)X
+1120(to)X
+1202(immediately)X
+1622(before)X
+1848(the)X
+1966(starting)X
+2226(or)X
+2313(stopping)X
+2608(cursor)X
+2829(position)X
+3106(which)X
+3322(comes)X
+3547(later)X
+3710(in)X
+3792(the)X
+3910(\256le.)X
+776 1842(Commands)N
+1166(that)X
+1313(operate)X
+1577(on)X
+1684(lines)X
+1862(instead)X
+2116(of)X
+2210(using)X
+2410(beginning)X
+2757(and)X
+2900(ending)X
+3145(cursor)X
+3373(positions)X
+3688(operate)X
+3952(on)X
+776 1932(all)N
+880(of)X
+971(the)X
+1093(lines)X
+1268(that)X
+1412(are)X
+1535(wholly)X
+1781(or)X
+1872(partially)X
+2163(in)X
+2248(the)X
+2369(region.)X
+2637(In)X
+2727(addition,)X
+3032(some)X
+3224(other)X
+3412(commands)X
+3782(become)X
+776 2022(line)N
+922(oriented)X
+1211(depending)X
+1571(on)X
+1677(where)X
+1900(in)X
+1988(the)X
+2112(text)X
+2258(they)X
+2422(are)X
+2548(used.)X
+2762(The)X
+2914(command)X
+3257(descriptions)X
+3671(below)X
+3894(note)X
+776 2112(these)N
+961(special)X
+1204(cases.)X
+776 2292(The)N
+921(following)X
+1252(commands)X
+1619(may)X
+1777(all)X
+1877(be)X
+1973(used)X
+2140(as)X
+2227(motion)X
+2473(components)X
+2880(for)X
+3 f
+2994(vi)X
+1 f
+3076(commands:)X
+7 f
+776 2505(<control-A>)N
+1472(<control-H>)X
+2120(<control-J>)X
+2768(<control-M>)X
+776 2595(<control-N>)N
+1472(<control-P>)X
+2312(<space>)X
+3248($)X
+1256 2685(%)N
+1424('<character>)X
+2600(\()X
+3248(\))X
+1256 2775(+)N
+1952(,)X
+2600(-)X
+3248(/)X
+1256 2865(0)N
+1952(;)X
+2600(?)X
+3248(B)X
+1256 2955(E)N
+1952(F)X
+2600(G)X
+3248(H)X
+1256 3045(L)N
+1952(M)X
+2600(N)X
+3248(T)X
+1256 3135(W)N
+1904([[)X
+2552(]])X
+3248(\303)X
+1256 3225(_)N
+1424(`<character>)X
+2600(b)X
+3248(e)X
+1256 3315(f)N
+1952(h)X
+2600(j)X
+3248(k)X
+1256 3405(l)N
+1952(n)X
+2600(t)X
+3248(w)X
+1256 3495({)N
+1952(|)X
+2600(})X
+1 f
+776 3708(The)N
+923(optional)X
+1207(count)X
+1407(pre\256x)X
+1617(available)X
+1930(for)X
+2047(some)X
+2239(of)X
+2329(the)X
+3 f
+2450(vi)X
+1 f
+2535(commands)X
+2905(that)X
+3048(take)X
+3205(motion)X
+3454(commands,)X
+3844(or)X
+3934(the)X
+776 3798(count)N
+975(pre\256x)X
+1183(available)X
+1494(for)X
+1609(the)X
+3 f
+1728(vi)X
+1 f
+1811(commands)X
+2179(that)X
+2320(are)X
+2439(used)X
+2606(as)X
+2693(motion)X
+2939(components,)X
+3366(may)X
+3524(be)X
+3620(included)X
+3916(and)X
+776 3888(is)N
+2 f
+850(always)X
+1 f
+1093(considered)X
+1463(part)X
+1610(of)X
+1699(the)X
+1819(motion)X
+2067(argument.)X
+2432(For)X
+2565(example,)X
+2879(the)X
+2999(commands)X
+3368(``)X
+7 f
+3422(c2w)X
+1 f
+('')S
+3642(and)X
+3780(``)X
+7 f
+3834(2cw)X
+1 f
+('')S
+776 3978(are)N
+903(equivalent,)X
+1285(and)X
+1429(the)X
+1555(region)X
+1788(affected)X
+2076(by)X
+2184(the)X
+3 f
+2310(c)X
+1 f
+2374(command)X
+2718(is)X
+2799(two)X
+2947(words)X
+3171(of)X
+3266(text.)X
+3454(In)X
+3549(addition,)X
+3858(if)X
+3934(the)X
+776 4068(optional)N
+1066(count)X
+1272(pre\256x)X
+1487(is)X
+1568(speci\256ed)X
+1881(for)X
+2003(both)X
+2173(the)X
+3 f
+2299(vi)X
+1 f
+2389(command)X
+2733(and)X
+2877(its)X
+2980(motion)X
+3234(component,)X
+3639(the)X
+3766(effect)X
+3979(is)X
+776 4158(multiplicative)N
+1246(and)X
+1388(is)X
+1467(considered)X
+1841(part)X
+1992(of)X
+2085(the)X
+2209(motion)X
+2461(argument.)X
+2830(For)X
+2967(example,)X
+3285(the)X
+3408(commands)X
+3780(``)X
+7 f
+3834(4cw)X
+1 f
+('')S
+776 4248(and)N
+912(``)X
+7 f
+966(2c2w)X
+1 f
+('')S
+1232(are)X
+1351(equivalent,)X
+1725(and)X
+1861(the)X
+1979(region)X
+2204(affected)X
+2484(by)X
+2584(the)X
+3 f
+2702(c)X
+1 f
+2758(command)X
+3094(is)X
+3167(four)X
+3321(words)X
+3537(of)X
+3624(text.)X
+3 f
+576 4428(count)N
+1 f
+776 4518(A)N
+859(positive)X
+1137(number)X
+1407(used)X
+1579(as)X
+1671(an)X
+1772(optional)X
+2059(argument)X
+2387(to)X
+2474(most)X
+2654(commands,)X
+3046(either)X
+3254(to)X
+3341(give)X
+3504(a)X
+3566(size)X
+3717(or)X
+3810(a)X
+3872(posi-)X
+776 4608(tion)N
+930(\(for)X
+1081(display)X
+1342(or)X
+1439(movement)X
+1807(commands\),)X
+2231(or)X
+2328(as)X
+2425(a)X
+2491(repeat)X
+2718(count)X
+2926(\(for)X
+3077(commands)X
+3454(that)X
+3604(modify)X
+3865(text\).)X
+776 4698(The)N
+932(count)X
+1141(argument)X
+1475(is)X
+1559(always)X
+1813(optional)X
+2106(and)X
+2254(defaults)X
+2540(to)X
+2634(1)X
+2706(unless)X
+2938(otherwise)X
+3282(noted)X
+3492(in)X
+3586(the)X
+3716(command)X
+776 4788(description.)N
+776 4968(When)N
+995(a)X
+3 f
+1059(vi)X
+1 f
+1149(command)X
+1493(synopsis)X
+1796(shows)X
+2024(both)X
+2194(a)X
+7 f
+2258([buffer])X
+1 f
+2670(and)X
+7 f
+2814([count])X
+1 f
+(,)S
+3198(they)X
+3364(may)X
+3530(be)X
+3634(presented)X
+3970(in)X
+776 5058(any)N
+912(order.)X
+3 f
+576 5238(bigword)N
+1 f
+776 5328(A)N
+854(set)X
+963(of)X
+1050(non-whitespace)X
+1575(characters)X
+1923(preceded)X
+2235(and)X
+2372(followed)X
+2678(by)X
+2779(whitespace)X
+3157(characters)X
+3505(or)X
+3593(the)X
+3712(beginning)X
+776 5418(or)N
+863(end)X
+999(of)X
+1086(the)X
+1204(\256le)X
+1326(or)X
+1413(line.)X
+776 5598(Groups)N
+1040(of)X
+1135(empty)X
+1363(lines)X
+1542(\(or)X
+1664(lines)X
+1843(containing)X
+2209(only)X
+2379(whitespace)X
+2764 0.3250(characters\))AX
+3146(are)X
+3274(treated)X
+3522(as)X
+3618(a)X
+3683(single)X
+3903(big-)X
+776 5688(word.)N
+
+11 p
+%%Page: 11 10
+10 s 10 xH 0 xS 1 f 1 i
+3 f
+576 474(Nvi/Nex)N
+872 0.3906(Reference)AX
+1237(\(Vi)X
+1364(Commands\))X
+3658(USD:13-11)X
+576 762(word)N
+1 f
+776 852(Generally,)N
+1133(in)X
+1215(languages)X
+1556(where)X
+1773(it)X
+1837(is)X
+1910(applicable,)X
+3 f
+2280(vi)X
+1 f
+2362(recognizes)X
+2726(two)X
+2866(kinds)X
+3060(of)X
+3148(words.)X
+3405(First,)X
+3592(a)X
+3649(sequence)X
+3965(of)X
+776 942(letters,)N
+1027(digits)X
+1239(and)X
+1390(underscores,)X
+1829(delimited)X
+2166(at)X
+2259(both)X
+2435(ends)X
+2616(by:)X
+2752(characters)X
+3113(other)X
+3312(than)X
+3484(letters,)X
+3734(digits,)X
+3965(or)X
+776 1032(underscores;)N
+1206(the)X
+1328(beginning)X
+1672(or)X
+1763(end)X
+1903(of)X
+1994(a)X
+2054(line;)X
+2220(the)X
+2343(beginning)X
+2688(or)X
+2780(end)X
+2921(of)X
+3013(the)X
+3136(\256le.)X
+3303(Second,)X
+3584(a)X
+3645(sequence)X
+3965(of)X
+776 1122(characters)N
+1126(other)X
+1313(than)X
+1473(letters,)X
+1711(digits,)X
+1930(underscores,)X
+2356(or)X
+2445(whitespace)X
+2824(characters,)X
+3193(delimited)X
+3517(at)X
+3597(both)X
+3761(ends)X
+3930(by:)X
+776 1212(a)N
+838(letter,)X
+1049(digit,)X
+1241(underscore,)X
+1640(or)X
+1733(whitespace)X
+2116(character;)X
+2460(the)X
+2584(beginning)X
+2930(or)X
+3024(end)X
+3167(of)X
+3261(a)X
+3324(line;)X
+3493(the)X
+3618(beginning)X
+3965(or)X
+776 1302(end)N
+912(of)X
+999(the)X
+1117(\256le.)X
+776 1482(Groups)N
+1032(of)X
+1119(empty)X
+1339(lines)X
+1510(\(or)X
+1624(lines)X
+1795(containing)X
+2153(only)X
+2315(whitespace)X
+2692 0.3250(characters\))AX
+3066(are)X
+3185(treated)X
+3424(as)X
+3511(a)X
+3567(single)X
+3778(word.)X
+3 f
+576 1662(paragraph)N
+1 f
+776 1752(An)N
+898(area)X
+1057(of)X
+1148(text)X
+1292(that)X
+1436(begins)X
+1670(with)X
+1837(either)X
+2045(the)X
+2168(beginning)X
+2513(of)X
+2605(a)X
+2666(\256le,)X
+2813(an)X
+2914(empty)X
+3139(line,)X
+3304(or)X
+3396(a)X
+3457(section)X
+3709(boundary,)X
+776 1842(and)N
+912(continues)X
+1239(until)X
+1405(either)X
+1608(an)X
+1704(empty)X
+1924(line,)X
+2084(section)X
+2331(boundary,)X
+2674(or)X
+2761(the)X
+2879(end)X
+3015(of)X
+3102(the)X
+3220(\256le.)X
+776 2022(Groups)N
+1037(of)X
+1129(empty)X
+1355(lines)X
+1532(\(or)X
+1652(lines)X
+1829(containing)X
+2193(only)X
+2361(whitespace)X
+2744 0.3250(characters\))AX
+3124(are)X
+3249(treated)X
+3494(as)X
+3587(a)X
+3649(single)X
+3866(para-)X
+776 2112(graph.)N
+776 2292(Additional)N
+1138(paragraph)X
+1480(boundaries)X
+1852(can)X
+1984(be)X
+2080(de\256ned)X
+2336(using)X
+2529(the)X
+3 f
+2647(paragraph)X
+1 f
+3031(option.)X
+3 f
+576 2472(section)N
+1 f
+776 2562(An)N
+903(area)X
+1067(of)X
+1163(text)X
+1312(that)X
+1461(starts)X
+1659(with)X
+1830(the)X
+1957(beginning)X
+2306(of)X
+2402(the)X
+2529(\256le)X
+2660(or)X
+2756(a)X
+2822(line)X
+2972(whose)X
+3207(\256rst)X
+3361(character)X
+3687(is)X
+3770(an)X
+3876(open)X
+776 2652(brace)N
+971(\(``)X
+7 f
+1052({)X
+1 f
+(''\))S
+1201(and)X
+1337(continues)X
+1664(until)X
+1830(the)X
+1948(next)X
+2106(section)X
+2353(or)X
+2440(the)X
+2558(end)X
+2694(of)X
+2781(the)X
+2899(\256le.)X
+776 2832(Additional)N
+1138(section)X
+1385(boundaries)X
+1757(can)X
+1889(be)X
+1985(de\256ned)X
+2241(using)X
+2434(the)X
+3 f
+2552(sections)X
+1 f
+2839(option.)X
+3 f
+576 3012(sentence)N
+1 f
+776 3102(An)N
+895(area)X
+1051(of)X
+1139(text)X
+1280(that)X
+1421(begins)X
+1651(with)X
+1814(either)X
+2018(the)X
+2137(beginning)X
+2478(of)X
+2566(the)X
+2685(\256le)X
+2808(or)X
+2896(the)X
+3015(\256rst)X
+3160(nonblank)X
+3479(character)X
+3796(follow-)X
+776 3192(ing)N
+901(the)X
+1022(previous)X
+1321(sentence,)X
+1641(paragraph,)X
+2006(or)X
+2096(section)X
+2346(boundary)X
+2672(and)X
+2811(continues)X
+3141(until)X
+3310(the)X
+3431(end)X
+3570(of)X
+3660(the)X
+3781(\256le)X
+3906(or)X
+3996(a)X
+776 3282(or)N
+866(a)X
+926(period)X
+1155(\(``)X
+7 f
+1236(.)X
+1 f
+(''\))S
+1409(exclamation)X
+1825(point)X
+2013(\(``)X
+7 f
+2094(!)X
+1 f
+(''\))S
+2267(or)X
+2358(question)X
+2653(mark)X
+2842(\(``)X
+7 f
+2923(?)X
+1 f
+(''\))S
+3096(character,)X
+3436(followed)X
+3745(by)X
+3849(either)X
+776 3372(an)N
+882(end-of-line)X
+1269(or)X
+1366(two)X
+1516(whitespace)X
+1903(characters.)X
+2300(Any)X
+2468(number)X
+2743(of)X
+2840(closing)X
+3101(parentheses)X
+3505(\(``)X
+7 f
+3586(\))X
+1 f
+(''\),)S
+3764(brackets)X
+776 3462(\(``)N
+7 f
+857(])X
+1 f
+(''\))S
+1007(or)X
+1095(double-quote)X
+1540(\(``)X
+7 f
+1621(")X
+1 f
+(''\))S
+1772(characters)X
+2121(can)X
+2255(appear)X
+2492(between)X
+2782(the)X
+2902(period,)X
+3149(exclamation)X
+3563(point,)X
+3769(or)X
+3858(ques-)X
+776 3552(tion)N
+920(mark)X
+1105(and)X
+1241(the)X
+1359(whitespace)X
+1736(characters)X
+2083(or)X
+2170(end-of-line.)X
+776 3732(Groups)N
+1040(of)X
+1135(empty)X
+1363(lines)X
+1542(\(or)X
+1664(lines)X
+1843(containing)X
+2209(only)X
+2379(whitespace)X
+2764 0.3250(characters\))AX
+3146(are)X
+3273(treated)X
+3520(as)X
+3615(a)X
+3679(single)X
+3898(sen-)X
+776 3822(tence.)N
+3 f
+576 4008(10.)N
+716(Vi)X
+816(Commands)X
+1 f
+776 4131(The)N
+926(following)X
+1262(section)X
+1514(describes)X
+1838(the)X
+1961(commands)X
+2333(available)X
+2649(in)X
+2737(the)X
+2861(command)X
+3203(mode)X
+3407(of)X
+3500(the)X
+3 f
+3624(vi)X
+1 f
+3712(editor.)X
+3965(In)X
+576 4221(each)N
+745(entry)X
+931(below,)X
+1168(the)X
+1287(tag)X
+1406(line)X
+1547(is)X
+1621(a)X
+1678(usage)X
+1882(synopsis)X
+2178(for)X
+2293(the)X
+2412(command)X
+2749(character.)X
+3106(In)X
+3194(addition,)X
+3496(the)X
+3614(\256nal)X
+3776(line)X
+3916(and)X
+576 4311(column)N
+836(the)X
+954(cursor)X
+1175(rests)X
+1342(upon,)X
+1542(and)X
+1678(any)X
+1814(options)X
+2069(which)X
+2285(affect)X
+2489(the)X
+2607(command)X
+2943(are)X
+3062(noted.)X
+3 f
+576 4491([count])N
+841(<control-A>)X
+1 f
+776 4581(Search)N
+1034(forward)X
+7 f
+1328(count)X
+1 f
+1607(times)X
+1819(for)X
+1952(the)X
+2089(current)X
+2356(word.)X
+2600(The)X
+2764(current)X
+3031(word)X
+3236(begins)X
+3485(at)X
+3583(the)X
+3721(\256rst)X
+3885(non-)X
+776 4671(whitespace)N
+1164(character)X
+1491(on)X
+1602(or)X
+1699(after)X
+1877(the)X
+2005(current)X
+2263(cursor)X
+2494(position,)X
+2801(and)X
+2947(extends)X
+3222(up)X
+3332(to)X
+3424(the)X
+3552(next)X
+3720(non-word)X
+776 4761(character)N
+1095(or)X
+1185(the)X
+1306(end)X
+1445(of)X
+1535(the)X
+1656(line.)X
+1839(The)X
+1987(search)X
+2216(is)X
+2292(literal,)X
+2522(i.e.)X
+2643(no)X
+2746(characters)X
+3096(in)X
+3182(the)X
+3304(word)X
+3493(have)X
+3669(any)X
+3809(special)X
+776 4851(meaning)N
+1076(in)X
+1162(terms)X
+1364(of)X
+1455(Regular)X
+1733(Expressions.)X
+2184(It)X
+2257(is)X
+2334(an)X
+2434(error)X
+2615(if)X
+2687(no)X
+2790(matching)X
+3111(pattern)X
+3357(is)X
+3433(found)X
+3643(between)X
+3934(the)X
+776 4941(starting)N
+1036(position)X
+1313(and)X
+1449(the)X
+1567(end)X
+1703(of)X
+1790(the)X
+1908(\256le.)X
+776 5121(The)N
+3 f
+926(<control-A>)X
+1 f
+1373(command)X
+1714(is)X
+1792(an)X
+1893(absolute)X
+2185(movement.)X
+2588(The)X
+3 f
+2738(<control-A>)X
+1 f
+3185(command)X
+3526(may)X
+3690(be)X
+3792(used)X
+3965(as)X
+776 5211(the)N
+896(motion)X
+1144(component)X
+1522(of)X
+1611(other)X
+3 f
+1798(vi)X
+1 f
+1881(commands,)X
+2269(in)X
+2352(which)X
+2569(case)X
+2729(any)X
+2866(text)X
+3007(copied)X
+3242(into)X
+3387(a)X
+3444(buffer)X
+3662(is)X
+3736(character)X
+776 5301(oriented.)N
+776 5481(Line:)N
+1136(Set)X
+1258(to)X
+1340(the)X
+1458(line)X
+1598(where)X
+1815(the)X
+1933(word)X
+2118(is)X
+2191(found.)X
+776 5571(Column:)N
+1136(Set)X
+1258(to)X
+1340(the)X
+1458(\256rst)X
+1602(character)X
+1918(of)X
+2005(the)X
+2123(word.)X
+776 5661(Options:)N
+1136(Affected)X
+1438(by)X
+1538(the)X
+3 f
+1656(extended)X
+1 f
+1963(,)X
+3 f
+2003(ignorecase)X
+1 f
+2384(and)X
+3 f
+2520(wrapscan)X
+1 f
+2869(options.)X
+
+12 p
+%%Page: 12 11
+10 s 10 xH 0 xS 1 f 1 i
+3 f
+576 474(USD:13-12)N
+2826(Nvi/Nex)X
+3122 0.3906(Reference)AX
+3487(\(Vi)X
+3614(Commands\))X
+576 762([count])N
+841(<control-B>)X
+1 f
+776 852(Page)N
+965(backward)X
+7 f
+1311(count)X
+1 f
+1585(screens.)X
+1896(Two)X
+2077(lines)X
+2262(of)X
+2363(overlap)X
+2638(are)X
+2771(maintained)X
+3161(by)X
+3275(displaying)X
+3642(the)X
+3774(window)X
+776 942(starting)N
+1042(at)X
+1126(line)X
+7 f
+1272(\(top_line)X
+1758(-)X
+1860(count)X
+2154(*)X
+2256(window_size\))X
+2886(+)X
+2988(2)X
+1 f
+(,)S
+3081(where)X
+7 f
+3303(window_size)X
+1 f
+3856(is)X
+3934(the)X
+776 1032(value)N
+973(of)X
+1063(the)X
+3 f
+1184(window)X
+1 f
+1473(option.)X
+1741(\(In)X
+1859(the)X
+1981(case)X
+2144(of)X
+2235(split)X
+2396(screens,)X
+2677(this)X
+2816(size)X
+2965(is)X
+3042(corrected)X
+3366(to)X
+3452(the)X
+3574(current)X
+3826(screen)X
+776 1122(size.\))N
+988(This)X
+1150(is)X
+1223(an)X
+1319(error)X
+1496(if)X
+1565(the)X
+1683(movement)X
+2041(is)X
+2114(past)X
+2263(the)X
+2381(beginning)X
+2721(of)X
+2808(the)X
+2926(\256le.)X
+776 1302(The)N
+3 f
+921(<control-B>)X
+1 f
+1358(command)X
+1694(is)X
+1767(an)X
+1863(absolute)X
+2150(movement.)X
+776 1482(Line:)N
+1136(Set)X
+1258(to)X
+1340(the)X
+1458(last)X
+1589(line)X
+1729(of)X
+1816(text)X
+1956(displayed)X
+2283(on)X
+2383(the)X
+2501(screen.)X
+776 1572(Column:)N
+1136(Set)X
+1258(to)X
+1340(the)X
+1458(\256rst)X
+1602(nonblank)X
+1920(character)X
+2236(of)X
+2323(the)X
+2441(line.)X
+776 1662(Options:)N
+1136(None.)X
+3 f
+576 1842([count])N
+841(<control-D>)X
+1 f
+776 1932(Scroll)N
+990(forward)X
+7 f
+1268(count)X
+1 f
+1531(lines.)X
+1745(If)X
+7 f
+1822(count)X
+1 f
+2085(is)X
+2161(not)X
+2286(speci\256ed,)X
+2614(scroll)X
+2815(forward)X
+3093(the)X
+3214(number)X
+3482(of)X
+3572(lines)X
+3747(speci\256ed)X
+776 2022(by)N
+881(the)X
+1004(last)X
+3 f
+1140(<control-D>)X
+1 f
+1587(or)X
+3 f
+1679(<control-U>)X
+1 f
+2126(command.)X
+2507(If)X
+2586(this)X
+2726(is)X
+2803(the)X
+2925(\256rst)X
+3 f
+3073(<control-D>)X
+1 f
+3519(or)X
+3 f
+3610(<control-U>)X
+1 f
+776 2112(command,)N
+1141(scroll)X
+1348(forward)X
+1632(half)X
+1786(the)X
+1913(number)X
+2188(of)X
+2285(lines)X
+2466(in)X
+2558(the)X
+2686(screen.)X
+2962(\(In)X
+3086(the)X
+3214(case)X
+3383(of)X
+3480(split)X
+3647(screens,)X
+3934(the)X
+776 2202(default)N
+1026(scrolling)X
+1333(distance)X
+1623(is)X
+1703(corrected)X
+2029(to)X
+2117(half)X
+2268(the)X
+2392(current)X
+2646(screen)X
+2878(size.\))X
+3096(This)X
+3264(is)X
+3343(an)X
+3445(error)X
+3628(if)X
+3703(the)X
+3827(move-)X
+776 2292(ment)N
+956(is)X
+1029(past)X
+1178(the)X
+1296(end)X
+1432(of)X
+1519(the)X
+1637(\256le.)X
+776 2472(The)N
+3 f
+921(<control-D>)X
+1 f
+1363(command)X
+1699(is)X
+1772(an)X
+1868(absolute)X
+2155(movement.)X
+776 2652(Line:)N
+1136(Set)X
+1258(to)X
+1340(the)X
+1458(current)X
+1706(line)X
+1846(plus)X
+1999(the)X
+2117(number)X
+2382(of)X
+2469(lines)X
+2640(scrolled.)X
+776 2742(Column:)N
+1136(Set)X
+1258(to)X
+1340(the)X
+1458(\256rst)X
+1602(nonblank)X
+1920(character)X
+2236(of)X
+2323(the)X
+2441(line.)X
+776 2832(Options:)N
+1136(None.)X
+3 f
+576 3012([count])N
+841(<control-E>)X
+1 f
+776 3102(Scroll)N
+987(forward)X
+7 f
+1262(count)X
+1 f
+1522(lines,)X
+1713(leaving)X
+1969(the)X
+2087(cursor)X
+2308(on)X
+2408(the)X
+2526(current)X
+2774(line)X
+2914(and)X
+3050(column,)X
+3330(if)X
+3399(possible.)X
+3721(This)X
+3883(is)X
+3956(an)X
+776 3192(error)N
+953(if)X
+1022(the)X
+1140(movement)X
+1498(is)X
+1571(past)X
+1720(the)X
+1838(end)X
+1974(of)X
+2061(the)X
+2179(\256le.)X
+776 3372(Line:)N
+1136(Unchanged)X
+1524(unless)X
+1747(the)X
+1868(current)X
+2119(line)X
+2262(scrolls)X
+2494(off)X
+2611(the)X
+2732(screen,)X
+2981(in)X
+3066(which)X
+3285(case)X
+3447(it)X
+3514(is)X
+3590(set)X
+3702(to)X
+3787(the)X
+3908(\256rst)X
+1136 3462(line)N
+1276(on)X
+1376(the)X
+1494(screen.)X
+776 3552(Column:)N
+1136(Unchanged)X
+1523(unless)X
+1744(the)X
+1863(current)X
+2112(line)X
+2253(scrolls)X
+2483(off)X
+2598(the)X
+2717(screen,)X
+2964(in)X
+3047(which)X
+3264(case)X
+3424(it)X
+3489(is)X
+3563(set)X
+3673(to)X
+3757(the)X
+3877(most)X
+1136 3642(attractive)N
+1455(cursor)X
+1676(position.)X
+776 3732(Options:)N
+1136(None.)X
+3 f
+576 3912([count])N
+841(<control-F>)X
+1 f
+776 4002(Page)N
+955(forward)X
+7 f
+1233(count)X
+1 f
+1496(screens.)X
+1797(Two)X
+1968(lines)X
+2143(of)X
+2234(overlap)X
+2499(are)X
+2622(maintained)X
+3002(by)X
+3106(displaying)X
+3463(the)X
+3585(window)X
+3867(start-)X
+776 4092(ing)N
+900(at)X
+980(line)X
+7 f
+1122(top_line)X
+1556(+)X
+1654(count)X
+1944(*)X
+2042(window_size)X
+2620(-)X
+2718(2)X
+1 f
+(,)S
+2808(where)X
+7 f
+3027(window_size)X
+1 f
+3577(is)X
+3651(the)X
+3770(value)X
+3965(of)X
+776 4182(the)N
+3 f
+903(window)X
+1 f
+1198(option.)X
+1471(\(In)X
+1594(the)X
+1721(case)X
+1889(of)X
+1985(split)X
+2151(screens,)X
+2437(this)X
+2581(size)X
+2735(is)X
+2817(corrected)X
+3146(to)X
+3238(the)X
+3366(current)X
+3624(screen)X
+3860(size.\))X
+776 4272(This)N
+938(is)X
+1011(an)X
+1107(error)X
+1284(if)X
+1353(the)X
+1471(movement)X
+1829(is)X
+1902(past)X
+2051(the)X
+2169(end)X
+2305(of)X
+2392(the)X
+2510(\256le.)X
+776 4452(The)N
+3 f
+921(<control-F>)X
+1 f
+1354(command)X
+1690(is)X
+1763(an)X
+1859(absolute)X
+2146(movement.)X
+776 4632(Line:)N
+1136(Set)X
+1258(to)X
+1340(the)X
+1458(\256rst)X
+1602(line)X
+1742(on)X
+1842(the)X
+1960(screen.)X
+776 4722(Column:)N
+1136(Set)X
+1258(to)X
+1340(the)X
+1458(\256rst)X
+1602(nonblank)X
+1920(character)X
+2236(of)X
+2323(the)X
+2441(current)X
+2689(line.)X
+776 4812(Options:)N
+1136(None.)X
+3 f
+576 4992(<control-G>)N
+1 f
+776 5082(Display)N
+1055(the)X
+1183(\256le)X
+1315(information.)X
+1763(The)X
+1918(information)X
+2326(includes)X
+2624(the)X
+2753(current)X
+3012(pathname,)X
+3375(the)X
+3504(current)X
+3763(line,)X
+3934(the)X
+776 5172(number)N
+1043(of)X
+1132(total)X
+1296(lines)X
+1469(in)X
+1553(the)X
+1673(\256le,)X
+1817(the)X
+1937(current)X
+2187(line)X
+2329(as)X
+2418(a)X
+2476(percentage)X
+2847(of)X
+2936(the)X
+3056(total)X
+3220(lines)X
+3393(in)X
+3477(the)X
+3597(\256le,)X
+3741(if)X
+3811(the)X
+3930(\256le)X
+776 5262(has)N
+905(been)X
+1079(modi\256ed,)X
+1405(was)X
+1552(able)X
+1708(to)X
+1792(be)X
+1890(locked,)X
+2146(if)X
+2217(the)X
+2337(\256le's)X
+2519(name)X
+2715(has)X
+2844(been)X
+3018(changed,)X
+3328(and)X
+3466(if)X
+3537(the)X
+3658(edit)X
+3801(session)X
+776 5352(is)N
+849(read-only.)X
+776 5532(Line:)N
+1136(Unchanged.)X
+776 5622(Column:)N
+1136(Unchanged.)X
+776 5712(Options:)N
+1136(None.)X
+
+13 p
+%%Page: 13 12
+10 s 10 xH 0 xS 1 f 1 i
+3 f
+576 474(Nvi/Nex)N
+872 0.3906(Reference)AX
+1237(\(Vi)X
+1364(Commands\))X
+3658(USD:13-13)X
+576 762(<control-H>)N
+576 852([count])N
+841(h)X
+1 f
+776 942(Move)N
+989(the)X
+1113(cursor)X
+1340(back)X
+7 f
+1518(count)X
+1 f
+1784(characters)X
+2137(in)X
+2225(the)X
+2349(current)X
+2603(line.)X
+2789(This)X
+2957(is)X
+3036(an)X
+3138(error)X
+3321(if)X
+3396(the)X
+3520(cursor)X
+3747(is)X
+3827(on)X
+3934(the)X
+776 1032(\256rst)N
+920(character)X
+1236(in)X
+1318(the)X
+1436(line.)X
+776 1212(The)N
+3 f
+923(<control-H>)X
+1 f
+1372(and)X
+3 f
+1511(h)X
+1 f
+1578(commands)X
+1948(may)X
+2109(be)X
+2208(used)X
+2378(as)X
+2468(the)X
+2589(motion)X
+2838(component)X
+3217(of)X
+3307(other)X
+3 f
+3495(vi)X
+1 f
+3580(commands,)X
+3970(in)X
+776 1302(which)N
+992(case)X
+1151(any)X
+1287(text)X
+1427(copied)X
+1661(into)X
+1805(a)X
+1861(buffer)X
+2078(is)X
+2151(character)X
+2467(oriented.)X
+776 1482(Line:)N
+1136(Unchanged.)X
+776 1572(Column:)N
+1136(Set)X
+1263(to)X
+1350(the)X
+7 f
+1473(current)X
+1862(-)X
+1963(count)X
+1 f
+2229(character,)X
+2571(or,)X
+2684(the)X
+2808(\256rst)X
+2958(character)X
+3280(in)X
+3368(the)X
+3492(line)X
+3638(if)X
+7 f
+3713(count)X
+1 f
+3979(is)X
+1136 1662(greater)N
+1380(than)X
+1538(or)X
+1625(equal)X
+1819(to)X
+1901(the)X
+2019(number)X
+2284(of)X
+2371(characters)X
+2718(in)X
+2800(the)X
+2918(line)X
+3058(before)X
+3284(the)X
+3402(cursor.)X
+776 1752(Options:)N
+1136(None.)X
+3 f
+576 1932([count])N
+841(<control-J>)X
+576 2022([count])N
+841(<control-N>)X
+576 2112([count])N
+841(j)X
+1 f
+776 2202(Move)N
+993(the)X
+1121(cursor)X
+1352(down)X
+7 f
+1560(count)X
+1 f
+1830(lines)X
+2011(without)X
+2285(changing)X
+2609(the)X
+2737(current)X
+2995(column.)X
+3305(This)X
+3477(is)X
+3560(an)X
+3666(error)X
+3854(if)X
+3934(the)X
+776 2292(movement)N
+1134(is)X
+1207(past)X
+1356(the)X
+1474(end)X
+1610(of)X
+1697(the)X
+1815(\256le.)X
+776 2472(The)N
+3 f
+927(<control-J>)X
+1 f
+1331(,)X
+3 f
+1377(<control-N>)X
+1 f
+1825(and)X
+3 f
+1967(j)X
+1 f
+2020(commands)X
+2393(may)X
+2557(be)X
+2659(used)X
+2832(as)X
+2925(the)X
+3049(motion)X
+3301(component)X
+3684(of)X
+3778(other)X
+3 f
+3970(vi)X
+1 f
+776 2562(commands,)N
+1163(in)X
+1245(which)X
+1461(case)X
+1620(any)X
+1756(text)X
+1896(copied)X
+2130(into)X
+2274(a)X
+2330(buffer)X
+2547(is)X
+2620(line)X
+2760(oriented.)X
+776 2742(Line:)N
+1136(Set)X
+1258(to)X
+1340(the)X
+1458(current)X
+1706(line)X
+1846(plus)X
+7 f
+1999(count)X
+1 f
+(.)S
+776 2832(Column:)N
+1136(The)X
+1281(most)X
+1456(attractive)X
+1775(cursor)X
+1996(position.)X
+776 2922(Options:)N
+1136(None.)X
+3 f
+576 3102(<control-L>)N
+576 3192(<control-R>)N
+1 f
+776 3282(Repaint)N
+1045(the)X
+1163(screen.)X
+776 3462(Line:)N
+1136(Unchanged.)X
+776 3552(Column:)N
+1136(Unchanged.)X
+776 3642(Options:)N
+1136(None.)X
+3 f
+576 3822([count])N
+841(<control-M>)X
+576 3912([count])N
+841(+)X
+1 f
+776 4002(Move)N
+984(the)X
+1103(cursor)X
+1325(down)X
+7 f
+1524(count)X
+1 f
+1785(lines)X
+1957(to)X
+2040(the)X
+2159(\256rst)X
+2304(nonblank)X
+2623(character)X
+2940(of)X
+3028(that)X
+3169(line.)X
+3350(This)X
+3513(is)X
+3587(an)X
+3684(error)X
+3863(if)X
+3934(the)X
+776 4092(movement)N
+1134(is)X
+1207(past)X
+1356(the)X
+1474(end)X
+1610(of)X
+1697(the)X
+1815(\256le.)X
+776 4272(The)N
+3 f
+922(<control-M>)X
+1 f
+1384(and)X
+3 f
+1522(+)X
+1 f
+1590(commands)X
+1959(may)X
+2119(be)X
+2217(used)X
+2386(as)X
+2475(the)X
+2595(motion)X
+2843(component)X
+3221(of)X
+3310(other)X
+3 f
+3497(vi)X
+1 f
+3581(commands,)X
+3970(in)X
+776 4362(which)N
+992(case)X
+1151(any)X
+1287(text)X
+1427(copied)X
+1661(into)X
+1805(a)X
+1861(buffer)X
+2078(is)X
+2151(line)X
+2291(oriented.)X
+776 4542(Line:)N
+1136(Set)X
+1258(to)X
+1340(the)X
+1458(current)X
+1706(line)X
+1846(plus)X
+7 f
+1999(count)X
+1 f
+(.)S
+776 4632(Column:)N
+1136(Set)X
+1258(to)X
+1340(the)X
+1458(\256rst)X
+1602(nonblank)X
+1920(character)X
+2236(in)X
+2318(the)X
+2436(line.)X
+776 4722(Options:)N
+1136(None.)X
+3 f
+576 4902([count])N
+841(<control-P>)X
+576 4992([count])N
+841(k)X
+1 f
+776 5082(Move)N
+983(the)X
+1101(cursor)X
+1323(up)X
+7 f
+1424(count)X
+1 f
+1685(lines,)X
+1877(without)X
+2142(changing)X
+2457(the)X
+2576(current)X
+2825(column.)X
+3126(This)X
+3289(is)X
+3363(an)X
+3460(error)X
+3638(if)X
+3708(the)X
+3827(move-)X
+776 5172(ment)N
+956(is)X
+1029(past)X
+1178(the)X
+1296(beginning)X
+1636(of)X
+1723(the)X
+1841(\256le.)X
+776 5352(The)N
+3 f
+924(<control-P>)X
+1 f
+1360(and)X
+3 f
+1499(k)X
+1 f
+1566(commands)X
+1937(may)X
+2099(be)X
+2199(used)X
+2370(as)X
+2461(the)X
+2583(motion)X
+2833(component)X
+3213(of)X
+3304(other)X
+3 f
+3493(vi)X
+1 f
+3579(commands,)X
+3970(in)X
+776 5442(which)N
+992(case)X
+1151(any)X
+1287(text)X
+1427(copied)X
+1661(into)X
+1805(a)X
+1861(buffer)X
+2078(is)X
+2151(line)X
+2291(oriented.)X
+776 5622(Line:)N
+1136(Set)X
+1258(to)X
+1340(the)X
+1458(current)X
+1706(line)X
+1846(minus)X
+2061(count.)X
+776 5712(Column:)N
+1136(The)X
+1281(most)X
+1456(attractive)X
+1775(cursor)X
+1996(position.)X
+
+14 p
+%%Page: 14 13
+10 s 10 xH 0 xS 1 f 1 i
+3 f
+576 474(USD:13-14)N
+2826(Nvi/Nex)X
+3122 0.3906(Reference)AX
+3487(\(Vi)X
+3614(Commands\))X
+1 f
+776 762(Options:)N
+1136(None.)X
+3 f
+576 942(<control-T>)N
+1 f
+776 1032(Return)N
+1014(to)X
+1096(the)X
+1214(most)X
+1389(recent)X
+1606(tag)X
+1724(context.)X
+2020(The)X
+3 f
+2165(<control-T>)X
+1 f
+2602(command)X
+2938(is)X
+3011(an)X
+3107(absolute)X
+3394(movement.)X
+776 1212(Line:)N
+1136(Set)X
+1258(to)X
+1340(the)X
+1458(context)X
+1714(of)X
+1801(the)X
+1919(previous)X
+2215(tag)X
+2333(command.)X
+776 1302(Column:)N
+1136(Set)X
+1258(to)X
+1340(the)X
+1458(context)X
+1714(of)X
+1801(the)X
+1919(previous)X
+2215(tag)X
+2333(command.)X
+776 1392(Options:)N
+1136(None.)X
+3 f
+576 1572(<control-U>)N
+1 f
+776 1662(Scroll)N
+1003(backward)X
+7 f
+1352(count)X
+1 f
+1628(lines.)X
+1856(If)X
+7 f
+1947(count)X
+1 f
+2224(is)X
+2314(not)X
+2453(speci\256ed,)X
+2795(scroll)X
+3010(backward)X
+3360(the)X
+3495(number)X
+3777(of)X
+3881(lines)X
+776 1752(speci\256ed)N
+1096(by)X
+1211(the)X
+1344(last)X
+3 f
+1490(<control-D>)X
+1 f
+1947(or)X
+3 f
+2049(<control-U>)X
+1 f
+2505(command.)X
+2895(If)X
+2983(this)X
+3132(is)X
+3219(the)X
+3351(\256rst)X
+3 f
+3509(<control-D>)X
+1 f
+3965(or)X
+3 f
+776 1842(<control-U>)N
+1 f
+1221(command,)X
+1580(scroll)X
+1781(backward)X
+2117(half)X
+2266(the)X
+2388(number)X
+2657(of)X
+2748(lines)X
+2923(in)X
+3009(the)X
+3131(screen.)X
+3401(\(In)X
+3519(the)X
+3641(case)X
+3804(of)X
+3895(split)X
+776 1932(screens,)N
+1057(the)X
+1179(default)X
+1426(scrolling)X
+1729(distance)X
+2015(is)X
+2091(corrected)X
+2414(to)X
+2499(half)X
+2647(the)X
+2768(current)X
+3019(screen)X
+3248(size.\))X
+3463(This)X
+3628(is)X
+3704(an)X
+3803(error)X
+3983(if)X
+776 2022(the)N
+894(movement)X
+1252(is)X
+1325(past)X
+1474(the)X
+1592(beginning)X
+1932(of)X
+2019(the)X
+2137(\256le.)X
+776 2202(The)N
+3 f
+921(<control-U>)X
+1 f
+1363(command)X
+1699(is)X
+1772(an)X
+1868(absolute)X
+2155(movement.)X
+776 2382(Line:)N
+1136(Set)X
+1258(to)X
+1340(the)X
+1458(current)X
+1706(line)X
+1846(minus)X
+2061(the)X
+2179(amount)X
+2439(scrolled.)X
+776 2472(Column:)N
+1136(Set)X
+1258(to)X
+1340(the)X
+1458(\256rst)X
+1602(nonblank)X
+1920(character)X
+2236(in)X
+2318(the)X
+2436(line.)X
+776 2562(Options:)N
+1136(None.)X
+3 f
+576 2742(<control-W>)N
+1 f
+776 2832(Switch)N
+1021(to)X
+1106(the)X
+1227(next)X
+1388(lower)X
+1594(screen)X
+1823(in)X
+1908(the)X
+2029(window,)X
+2330(or,)X
+2440(to)X
+2525(the)X
+2646(\256rst)X
+2793(screen)X
+3022(if)X
+3094(there)X
+3278(are)X
+3400(no)X
+3503(lower)X
+3709(screens)X
+3970(in)X
+776 2922(the)N
+894(window.)X
+776 3102(Line:)N
+1136(Set)X
+1258(to)X
+1340(the)X
+1458(previous)X
+1754(cursor)X
+1975(position)X
+2252(in)X
+2334(the)X
+2452(window.)X
+776 3192(Column:)N
+1136(Set)X
+1258(to)X
+1340(the)X
+1458(previous)X
+1754(cursor)X
+1975(position)X
+2252(in)X
+2334(the)X
+2452(window.)X
+776 3282(Options:)N
+1136(None.)X
+3 f
+576 3462(<control-Y>)N
+1 f
+776 3552(Scroll)N
+989(backward)X
+7 f
+1324(count)X
+1 f
+1586(lines,)X
+1779(leaving)X
+2037(the)X
+2157(current)X
+2407(line)X
+2550(and)X
+2689(column)X
+2952(as)X
+3042(is,)X
+3138(if)X
+3210(possible.)X
+3535(This)X
+3700(is)X
+3776(an)X
+3875(error)X
+776 3642(if)N
+845(the)X
+963(movement)X
+1321(is)X
+1394(past)X
+1543(the)X
+1661(beginning)X
+2001(of)X
+2088(the)X
+2206(\256le.)X
+776 3822(Line:)N
+1136(Unchanged)X
+1525(unless)X
+1748(the)X
+1869(current)X
+2120(line)X
+2263(scrolls)X
+2496(off)X
+2614(the)X
+2736(screen,)X
+2986(in)X
+3072(which)X
+3292(case)X
+3455(it)X
+3523(is)X
+3600(set)X
+3713(to)X
+3799(the)X
+3921(last)X
+1136 3912(line)N
+1276(of)X
+1363(text)X
+1503(displayed)X
+1830(on)X
+1930(the)X
+2048(screen.)X
+776 4002(Column:)N
+1136(Unchanged)X
+1536(unless)X
+1770(the)X
+1902(current)X
+2164(line)X
+2318(scrolls)X
+2561(off)X
+2689(the)X
+2821(screen,)X
+3081(in)X
+3177(which)X
+3407(case)X
+3580(it)X
+3658(is)X
+3745(the)X
+3877(most)X
+1136 4092(attractive)N
+1455(cursor)X
+1676(position.)X
+776 4182(Options:)N
+1136(None.)X
+3 f
+576 4362(<control-Z>)N
+1 f
+776 4452(Suspend)N
+1069(the)X
+1189(current)X
+1439(editor)X
+1648(session.)X
+1941(If)X
+2017(the)X
+2137(\256le)X
+2261(has)X
+2390(been)X
+2564(modi\256ed)X
+2870(since)X
+3057(it)X
+3124(was)X
+3272(last)X
+3406(completely)X
+3785(written,)X
+776 4542(and)N
+914(the)X
+3 f
+1034(autowrite)X
+1 f
+1386(option)X
+1612(is)X
+1687(set,)X
+1817(the)X
+1936(\256le)X
+2059(is)X
+2133(written)X
+2381(before)X
+2608(the)X
+2727(editor)X
+2935(session)X
+3187(is)X
+3261(suspended.)X
+3656(If)X
+3731(this)X
+3867(write)X
+776 4632(fails,)N
+954(the)X
+1072(editor)X
+1279(session)X
+1530(is)X
+1603(not)X
+1725(suspended.)X
+776 4812(Line:)N
+1136(Unchanged.)X
+776 4902(Column:)N
+1136(Unchanged.)X
+776 4992(Options:)N
+1136(Affected)X
+1438(by)X
+1538(the)X
+3 f
+1656(autowrite)X
+1 f
+2006(option.)X
+3 f
+576 5172(<escape>)N
+1 f
+776 5262(Execute)N
+3 f
+1055(ex)X
+1 f
+1151(commands)X
+1518(or)X
+1605(cancel)X
+1831(partial)X
+2056(commands.)X
+2463(If)X
+2537(an)X
+3 f
+2633(ex)X
+1 f
+2729(command)X
+3065(is)X
+3138(being)X
+3336(entered)X
+3593(\(e.g.)X
+3 f
+3776(/)X
+1 f
+3798(,)X
+3 f
+3838(?)X
+1 f
+(,)S
+3 f
+3918(:)X
+1 f
+3965(or)X
+3 f
+776 5352(!)N
+1 f
+803(\),)X
+877(the)X
+1002(command)X
+1345(is)X
+1425(executed.)X
+1778(If)X
+1859(a)X
+1922(partial)X
+2154(command)X
+2497(has)X
+2631(been)X
+2810(entered,)X
+3093(e.g.)X
+3255(or)X
+3348(the)X
+3472(command)X
+3814(is)X
+3893(can-)X
+776 5442(celled.)N
+1028(Otherwise,)X
+1398(it)X
+1462(is)X
+1535(an)X
+1631(error.)X
+776 5622(Line:)N
+1136(When)X
+1350(an)X
+3 f
+1448(ex)X
+1 f
+1546(command)X
+1884(is)X
+1959(being)X
+2159(executed,)X
+2487(the)X
+2607(current)X
+2857(line)X
+2999(is)X
+3074(set)X
+3186(as)X
+3276(described)X
+3607(for)X
+3724(that)X
+3867(com-)X
+1136 5712(mand.)N
+1374(Otherwise,)X
+1744(unchanged.)X
+
+15 p
+%%Page: 15 14
+10 s 10 xH 0 xS 1 f 1 i
+3 f
+576 474(Nvi/Nex)N
+872 0.3906(Reference)AX
+1237(\(Vi)X
+1364(Commands\))X
+3658(USD:13-15)X
+1 f
+776 762(Column:)N
+1136(When)X
+1354(an)X
+3 f
+1456(ex)X
+1 f
+1558(command)X
+1901(is)X
+1981(being)X
+2186(executed,)X
+2519(the)X
+2644(current)X
+2899(column)X
+3166(is)X
+3246(set)X
+3362(as)X
+3456(described)X
+3791(for)X
+3912(that)X
+1136 852(command.)N
+1512(Otherwise,)X
+1882(unchanged.)X
+776 942(Options:)N
+1136(None.)X
+3 f
+576 1122(<control-]>)N
+1 f
+776 1212(Push)N
+953(a)X
+1011(tag)X
+1131 0.4531(reference)AX
+1454(onto)X
+1618(the)X
+1738(tag)X
+1858(stack.)X
+2085(The)X
+2232(tags)X
+2383(\256les)X
+2538(\(see)X
+2691(the)X
+3 f
+2812(tags)X
+1 f
+2973(option)X
+3200(for)X
+3317(more)X
+3505(information\))X
+3933(are)X
+776 1302(searched)N
+1086(for)X
+1207(a)X
+1270(tag)X
+1395(matching)X
+1720(the)X
+1845(current)X
+2100(word.)X
+2332(The)X
+2484(current)X
+2739(word)X
+2931(begins)X
+3167(at)X
+3252(the)X
+3377(\256rst)X
+3528(non-whitespace)X
+776 1392(character)N
+1092(on)X
+1192(or)X
+1279(after)X
+1447(the)X
+1565(current)X
+1813(cursor)X
+2034(position,)X
+2331(and)X
+2468(extends)X
+2734(up)X
+2835(to)X
+2918(the)X
+3037(next)X
+3196(non-word)X
+3529(character)X
+3846(or)X
+3934(the)X
+776 1482(end)N
+914(of)X
+1003(the)X
+1123(line.)X
+1305(If)X
+1381(a)X
+1439(matching)X
+1759(tag)X
+1879(is)X
+1954(found,)X
+2183(the)X
+2302(current)X
+2551(\256le)X
+2674(is)X
+2748(discarded)X
+3077(and)X
+3214(the)X
+3333(\256le)X
+3456(containing)X
+3815(the)X
+3934(tag)X
+776 1572 0.4531(reference)AN
+1097(is)X
+1170(edited.)X
+776 1752(If)N
+851(the)X
+971(current)X
+1221(\256le)X
+1345(has)X
+1474(been)X
+1648(modi\256ed)X
+1954(since)X
+2141(it)X
+2207(was)X
+2354(last)X
+2487(completely)X
+2865(written,)X
+3134(the)X
+3254(command)X
+3592(will)X
+3738(fail.)X
+3907(The)X
+3 f
+776 1842(<control-]>)N
+1 f
+1187(command)X
+1523(is)X
+1596(an)X
+1692(absolute)X
+1979(movement.)X
+776 2022(Line:)N
+1136(Set)X
+1258(to)X
+1340(the)X
+1458(line)X
+1598(containing)X
+1956(the)X
+2074(matching)X
+2392(tag)X
+2510(string.)X
+776 2112(Column:)N
+1136(Set)X
+1258(to)X
+1340(the)X
+1458(start)X
+1616(of)X
+1703(the)X
+1821(matching)X
+2139(tag)X
+2257(string.)X
+776 2202(Options:)N
+1136(Affected)X
+1438(by)X
+1538(the)X
+3 f
+1656(tags)X
+1 f
+1814(and)X
+3 f
+1950(taglength)X
+1 f
+2290(options.)X
+3 f
+576 2382(<control-\303>)N
+1 f
+776 2472(Switch)N
+1018(to)X
+1100(the)X
+1218(most)X
+1393(recently)X
+1672(edited)X
+1888(\256le.)X
+776 2652(If)N
+852(the)X
+972(\256le)X
+1096(has)X
+1225(been)X
+1399(modi\256ed)X
+1705(since)X
+1892(it)X
+1958(was)X
+2105(last)X
+2238(completely)X
+2616(written,)X
+2886(and)X
+3025(the)X
+3 f
+3146(autowrite)X
+1 f
+3499(option)X
+3726(is)X
+3802(set,)X
+3934(the)X
+776 2742(\256le)N
+905(is)X
+984(written)X
+1237(out.)X
+1405(If)X
+1485(this)X
+1626(write)X
+1817(fails,)X
+2001(the)X
+2125(command)X
+2467(will)X
+2617(fail.)X
+2790(Otherwise,)X
+3166(if)X
+3241(the)X
+3365(current)X
+3619(\256le)X
+3747(has)X
+3880(been)X
+776 2832(modi\256ed)N
+1080(since)X
+1265(it)X
+1329(was)X
+1474(last)X
+1605(completely)X
+1981(written,)X
+2248(the)X
+2366(command)X
+2702(will)X
+2846(fail.)X
+776 3012(Line:)N
+1136(Set)X
+1258(to)X
+1340(the)X
+1458(line)X
+1598(the)X
+1716(cursor)X
+1937(was)X
+2082(on)X
+2182(when)X
+2376(the)X
+2494(\256le)X
+2616(was)X
+2761(last)X
+2892(edited.)X
+776 3102(Column:)N
+1136(Set)X
+1258(to)X
+1340(the)X
+1458(column)X
+1718(the)X
+1836(cursor)X
+2057(was)X
+2202(on)X
+2302(when)X
+2496(the)X
+2614(\256le)X
+2736(was)X
+2881(last)X
+3012(edited.)X
+776 3192(Options:)N
+1136(Affected)X
+1438(by)X
+1538(the)X
+3 f
+1656(autowrite)X
+1 f
+2006(option.)X
+3 f
+576 3372([count])N
+841(<space>)X
+576 3462([count])N
+841(l)X
+1 f
+776 3552(Move)N
+984(the)X
+1103(cursor)X
+1325(forward)X
+7 f
+1602(count)X
+1 f
+1864(characters)X
+2213(without)X
+2479(changing)X
+2795(the)X
+2915(current)X
+3165(line.)X
+3347(This)X
+3511(is)X
+3586(an)X
+3684(error)X
+3863(if)X
+3934(the)X
+776 3642(cursor)N
+997(is)X
+1070(on)X
+1170(the)X
+1288(last)X
+1419(character)X
+1735(in)X
+1817(the)X
+1935(line.)X
+776 3822(The)N
+3 f
+921(<space>)X
+1 f
+1220(and)X
+3 f
+1356(l)X
+1 f
+1398(commands)X
+1765(may)X
+1923(be)X
+2019(used)X
+2186(as)X
+2273(the)X
+2391(motion)X
+2637(component)X
+3013(of)X
+3100(other)X
+3 f
+3285(vi)X
+1 f
+3367(commands,)X
+3754(in)X
+3836(which)X
+776 3912(case)N
+937(any)X
+1075(text)X
+1217(copied)X
+1453(into)X
+1599(a)X
+1657(buffer)X
+1876(is)X
+1951(character)X
+2269(oriented.)X
+2594(In)X
+2683(addition,)X
+2987(these)X
+3173(commands)X
+3541(may)X
+3700(be)X
+3797(used)X
+3965(as)X
+776 4002(the)N
+908(motion)X
+1168(components)X
+1589(of)X
+1690(other)X
+1889(commands)X
+2271(when)X
+2480(the)X
+2613(cursor)X
+2849(is)X
+2937(on)X
+3052(the)X
+3185(last)X
+3331(character)X
+3662(in)X
+3759(the)X
+3892(line,)X
+776 4092(without)N
+1040(error.)X
+776 4272(Line:)N
+1136(Unchanged.)X
+776 4362(Column:)N
+1136(Set)X
+1259(to)X
+1342(the)X
+1461(current)X
+1710(character)X
+2027(plus)X
+2181(the)X
+2300(next)X
+7 f
+2459(count)X
+1 f
+2720(characters,)X
+3088(or)X
+3177(to)X
+3261(the)X
+3381(last)X
+3514(character)X
+3832(on)X
+3934(the)X
+1136 4452(line)N
+1278(if)X
+7 f
+1349(count)X
+1 f
+1611(is)X
+1686(greater)X
+1932(than)X
+2092(the)X
+2212(number)X
+2478(of)X
+2566(characters)X
+2914(in)X
+2997(the)X
+3116(line)X
+3257(after)X
+3426(the)X
+3545(current)X
+3794(charac-)X
+1136 4542(ter.)N
+776 4632(Options:)N
+1136(None.)X
+3 f
+576 4812([count])N
+841(!)X
+888(motion)X
+1148(shell-argument\(s\))X
+1 f
+776 4902(Replace)N
+1055(text)X
+1195(with)X
+1357(results)X
+1586(from)X
+1762(a)X
+1818(shell)X
+1989(command.)X
+2366(Pass)X
+2529(the)X
+2648(lines)X
+2820(speci\256ed)X
+3126(by)X
+3227(the)X
+7 f
+3346(count)X
+1 f
+3607(and)X
+7 f
+3744(motion)X
+1 f
+776 4992(arguments)N
+1136(as)X
+1229(standard)X
+1527(input)X
+1717(to)X
+1805(the)X
+1928(program)X
+2225(named)X
+2464(by)X
+2569(the)X
+3 f
+2692(shell)X
+1 f
+2872(option,)X
+3121(and)X
+3262(replace)X
+3520(those)X
+3714(lines)X
+3890(with)X
+776 5082(the)N
+894(output)X
+1118(\(both)X
+1307(standard)X
+1599(error)X
+1776(and)X
+1912(standard)X
+2204(output\))X
+2455(of)X
+2542(that)X
+2682(command.)X
+776 5262(After)N
+966(the)X
+1084(motion)X
+1330(is)X
+1403(entered,)X
+3 f
+1680(vi)X
+1 f
+1762(prompts)X
+2044(for)X
+2158(arguments)X
+2512(to)X
+2594(the)X
+2712(shell)X
+2883(command.)X
+776 5442(Within)N
+1026(those)X
+1223(arguments,)X
+1605(``)X
+7 f
+1659(%)X
+1 f
+('')S
+1790(and)X
+1935(``)X
+7 f
+1989(#)X
+1 f
+('')S
+2120(characters)X
+2476(are)X
+2604(expanded)X
+2941(to)X
+3032(the)X
+3159(current)X
+3416(and)X
+3561(alternate)X
+3867(path-)X
+776 5532(names,)N
+1024(respectively.)X
+1475(The)X
+1623(``)X
+7 f
+1677(!)X
+1 f
+('')S
+1822(character)X
+2141(is)X
+2217(expanded)X
+2548(with)X
+2713(the)X
+2833(command)X
+3171(text)X
+3313(of)X
+3402(the)X
+3522(previous)X
+3 f
+3820(!)X
+1 f
+3889(or)X
+3 f
+3978(:!)X
+1 f
+776 5622(commands.)N
+1183 0.3125(\(Therefore,)AX
+1568(the)X
+1686(command)X
+3 f
+2022(!!)X
+1 f
+2116(repeats)X
+2364(the)X
+2482(previous)X
+3 f
+2778(!)X
+1 f
+2845(command.\))X
+3248(The)X
+3393(special)X
+3637(meanings)X
+3965(of)X
+776 5712(``)N
+7 f
+830(%)X
+1 f
+('',)S
+975(``)X
+7 f
+1029(#)X
+1 f
+('')S
+1154(and)X
+1293(``)X
+7 f
+1347(!)X
+1 f
+('')S
+1492(can)X
+1627(be)X
+1726(overridden)X
+2097(by)X
+2200(escaping)X
+2504(them)X
+2687(with)X
+2852(a)X
+2910(backslash.)X
+3284(If)X
+3360(no)X
+3 f
+3462(!)X
+1 f
+3531(or)X
+3 f
+3620(:!)X
+1 f
+3716(command)X
+776 5802(has)N
+907(yet)X
+1029(been)X
+1205(executed,)X
+1535(it)X
+1603(is)X
+1680(an)X
+1780(error)X
+1961(to)X
+2047(use)X
+2178(an)X
+2278(unescaped)X
+2637(``)X
+7 f
+2691(!)X
+1 f
+('')S
+2837(character.)X
+3197(The)X
+3 f
+3346(!)X
+1 f
+3417(command)X
+3758(does)X
+2 f
+3930(not)X
+
+16 p
+%%Page: 16 15
+10 s 10 xH 0 xS 2 f 1 i
+3 f
+576 474(USD:13-16)N
+2826(Nvi/Nex)X
+3122 0.3906(Reference)AX
+3487(\(Vi)X
+3614(Commands\))X
+1 f
+776 762(do)N
+880(shell)X
+1055(expansion)X
+1404(on)X
+1508(the)X
+1630(strings)X
+1867(provided)X
+2175(as)X
+2265(arguments.)X
+2662(If)X
+2739(any)X
+2878(of)X
+2968(the)X
+3089(above)X
+3304(expansions)X
+3683(change)X
+3934(the)X
+776 852(arguments)N
+1130(the)X
+1248(user)X
+1402(entered,)X
+1679(the)X
+1797(command)X
+2133(is)X
+2206(redisplayed)X
+2596(at)X
+2674(the)X
+2792(bottom)X
+3038(of)X
+3125(the)X
+3243(screen.)X
+3 f
+776 1032(Vi)N
+1 f
+882(then)X
+1046(executes)X
+1349(the)X
+1473(program)X
+1771(named)X
+2011(by)X
+2117(the)X
+3 f
+2241(shell)X
+1 f
+2422(option,)X
+2672(with)X
+2840(a)X
+3 f
+9 f
+2902(-)X
+2904(-)X
+3 f
+2948(c)X
+1 f
+3010(\257ag)X
+3156(followed)X
+3467(by)X
+3573(the)X
+3698(arguments)X
+776 1122(\(which)N
+1019(are)X
+1138(bundled)X
+1416(into)X
+1560(a)X
+1616(single)X
+1827(argument\).)X
+776 1302(The)N
+3 f
+921(!)X
+1 f
+988(command)X
+1324(is)X
+1397(permitted)X
+1724(in)X
+1806(an)X
+1902(empty)X
+2122(\256le.)X
+776 1482(If)N
+850(the)X
+968(\256le)X
+1090(has)X
+1217(been)X
+1389(modi\256ed)X
+1693(since)X
+1878(it)X
+1942(was)X
+2087(last)X
+2218(completely)X
+2594(written,)X
+2861(the)X
+3 f
+2979(!)X
+1 f
+3046(command)X
+3382(will)X
+3526(warn)X
+3707(you.)X
+776 1662(Line:)N
+1136(The)X
+1281(\256rst)X
+1425(line)X
+1565(of)X
+1652(the)X
+1770(replaced)X
+2063(text.)X
+776 1752(Column:)N
+1136(The)X
+1281(\256rst)X
+1425(column)X
+1685(of)X
+1772(the)X
+1890(replaced)X
+2183(text.)X
+776 1842(Options:)N
+1136(Affected)X
+1438(by)X
+1538(the)X
+3 f
+1656(shell)X
+1 f
+1831(option.)X
+3 f
+576 2022([count])N
+841(#)X
+901(+|-|#)X
+1 f
+776 2112(Increment)N
+1135(or)X
+1235(decrement)X
+1603(the)X
+1734(current)X
+1996(number.)X
+2315(The)X
+2474(current)X
+2736(number)X
+3015(begins)X
+3258(at)X
+3350(the)X
+3482(\256rst)X
+3640(non-number)X
+776 2202(character)N
+1095(on)X
+1198(or)X
+1288(before)X
+1517(the)X
+1638(current)X
+1889(cursor)X
+2113(position,)X
+2413(or)X
+2503(the)X
+2624(beginning)X
+2967(of)X
+3057(the)X
+3178(line,)X
+3341(and)X
+3480(extends)X
+3748(up)X
+3850(to)X
+3934(the)X
+776 2292(\256rst)N
+920(non-number)X
+1332(character)X
+1649(on)X
+1750(or)X
+1838(after)X
+2007(the)X
+2126(current)X
+2375(cursor)X
+2597(position)X
+2875(or)X
+2963(the)X
+3082(end)X
+3219(of)X
+3307(the)X
+3426(line.)X
+3607(If)X
+3682(the)X
+3801(trailing)X
+776 2382(character)N
+1094(is)X
+1169(a)X
+7 f
+1227(+)X
+1 f
+(,)S
+1317(the)X
+1437(number)X
+1704(is)X
+1779(incremented)X
+2198(by)X
+7 f
+2300(count)X
+1 f
+(.)S
+2602(If)X
+2678(the)X
+2798(trailing)X
+3051(character)X
+3369(is)X
+3444(a)X
+7 f
+3502(-)X
+1 f
+(,)S
+3592(the)X
+3712(number)X
+3979(is)X
+776 2472(decremented)N
+1220(by)X
+7 f
+1333(count)X
+1 f
+(.)S
+1646(If)X
+1733(the)X
+1864(trailing)X
+2128(character)X
+2457(is)X
+2543(a)X
+7 f
+2612(#)X
+1 f
+(,)S
+2713(the)X
+2844(previous)X
+3154(increment)X
+3509(or)X
+3610(decrement)X
+3979(is)X
+776 2562(repeated.)N
+776 2742(The)N
+927(format)X
+1167(of)X
+1260(the)X
+1384(number)X
+1656(\(decimal,)X
+1984(hexadecimal,)X
+2437(and)X
+2580(octal,)X
+2783(and)X
+2926(leading)X
+3189(0's\))X
+3341(is)X
+3421(retained)X
+3707(unless)X
+3934(the)X
+776 2832(new)N
+930(value)X
+1124(cannot)X
+1358(be)X
+1454(represented)X
+1845(in)X
+1927(the)X
+2045(previous)X
+2341(format.)X
+776 3012(Line:)N
+1136(Unchanged.)X
+776 3102(Column:)N
+1136(Set)X
+1258(to)X
+1340(the)X
+1458(\256rst)X
+1602(character)X
+1918(in)X
+2000(the)X
+2118(cursor)X
+2339(word.)X
+776 3192(Options:)N
+1136(None.)X
+3 f
+576 3372([count])N
+841($)X
+1 f
+776 3462(Move)N
+989(the)X
+1113(cursor)X
+1340(to)X
+1428(the)X
+1552(end)X
+1694(of)X
+1787(a)X
+1849(line.)X
+2035(If)X
+7 f
+2115(count)X
+1 f
+2381(is)X
+2460(speci\256ed,)X
+2792(the)X
+2917(cursor)X
+3145(moves)X
+3381(down)X
+7 f
+3586(count)X
+3881(-)X
+3984(1)X
+1 f
+776 3552(lines.)N
+776 3732(It)N
+845(is)X
+918(not)X
+1040(an)X
+1136(error)X
+1313(to)X
+1395(use)X
+1522(the)X
+3 f
+1640($)X
+1 f
+1700(command)X
+2036(when)X
+2230(the)X
+2348(cursor)X
+2569(is)X
+2642(on)X
+2742(the)X
+2860(last)X
+2991(character)X
+3308(in)X
+3391(the)X
+3510(line)X
+3651(or)X
+3739(when)X
+3934(the)X
+776 3822(line)N
+916(is)X
+989(empty.)X
+776 4002(The)N
+3 f
+921($)X
+1 f
+981(command)X
+1317(may)X
+1475(be)X
+1571(used)X
+1739(as)X
+1827(the)X
+1946(motion)X
+2193(component)X
+2570(of)X
+2658(other)X
+3 f
+2844(vi)X
+1 f
+2927(commands,)X
+3315(in)X
+3398(which)X
+3615(case)X
+3775(any)X
+3912(text)X
+776 4092(copied)N
+1014(into)X
+1161(a)X
+1220(buffer)X
+1440(is)X
+1516(character)X
+1835(oriented,)X
+2141(unless)X
+2364(the)X
+2485(cursor)X
+2709(is)X
+2785(at,)X
+2886(or)X
+2976(before)X
+3205(the)X
+3326(\256rst)X
+3473(nonblank)X
+3794(charac-)X
+776 4182(ter)N
+885(in)X
+971(the)X
+1093(line,)X
+1257(in)X
+1343(which)X
+1563(case)X
+1726(it)X
+1794(is)X
+1871(line)X
+2015(oriented.)X
+2343(It)X
+2417(is)X
+2495(not)X
+2622(an)X
+2723(error)X
+2905(to)X
+2992(use)X
+3124(the)X
+3 f
+3247($)X
+1 f
+3312(command)X
+3653(as)X
+3745(a)X
+3806(motion)X
+776 4272(component)N
+1154(when)X
+1350(the)X
+1470(cursor)X
+1693(is)X
+1768(on)X
+1870(the)X
+1990(last)X
+2123(character)X
+2441(in)X
+2525(the)X
+2645(line,)X
+2807(although)X
+3109(it)X
+3175(is)X
+3249(an)X
+3346(error)X
+3524(when)X
+3719(the)X
+3838(line)X
+3979(is)X
+776 4362(empty.)N
+776 4542(Line:)N
+1136(Set)X
+1258(to)X
+1340(the)X
+1458(current)X
+1706(line)X
+1846(plus)X
+7 f
+1999(count)X
+1 f
+2259(minus)X
+2474(1.)X
+776 4632(Column:)N
+1136(Set)X
+1258(to)X
+1340(the)X
+1458(last)X
+1589(character)X
+1905(in)X
+1987(the)X
+2105(line.)X
+776 4722(Options:)N
+1136(None.)X
+3 f
+576 4902(%)N
+1 f
+776 4992(Move)N
+986(to)X
+1071(the)X
+1192(matching)X
+1513(character.)X
+1872(The)X
+2020(cursor)X
+2244(moves)X
+2477(to)X
+2563(the)X
+2685(parenthesis)X
+3070(or)X
+3161(curly)X
+3350(brace)X
+3549(which)X
+2 f
+3769(matches)X
+1 f
+776 5082(the)N
+900(parenthesis)X
+1287(or)X
+1380(curly)X
+1570(brace)X
+1770(found)X
+1982(at)X
+2065(the)X
+2188(current)X
+2441(cursor)X
+2667(position)X
+2949(or)X
+3041(which)X
+3262(is)X
+3340(the)X
+3463(closest)X
+3706(one)X
+3847(to)X
+3934(the)X
+776 5172(right)N
+964(of)X
+1068(the)X
+1203(cursor)X
+1441(on)X
+1558(the)X
+1693(line.)X
+1890(It)X
+1976(is)X
+2066(an)X
+2179(error)X
+2373(to)X
+2472(execute)X
+2756(the)X
+3 f
+2892(%)X
+1 f
+3010(command)X
+3364(on)X
+3482(a)X
+3556(line)X
+3714(without)X
+3996(a)X
+776 5262(parenthesis)N
+1157(or)X
+1244(curly)X
+1429(brace.)X
+1664(Historically,)X
+2082(any)X
+7 f
+2218(count)X
+1 f
+2478(speci\256ed)X
+2783(to)X
+2865(the)X
+3 f
+2983(%)X
+1 f
+3083(command)X
+3419(was)X
+3564(ignored.)X
+776 5442(The)N
+3 f
+921(%)X
+1 f
+1021(command)X
+1357(is)X
+1430(an)X
+1527(absolute)X
+1815(movement.)X
+2214(The)X
+3 f
+2360(%)X
+1 f
+2461(command)X
+2798(may)X
+2957(be)X
+3054(used)X
+3222(as)X
+3310(the)X
+3429(motion)X
+3676(component)X
+776 5532(of)N
+871(other)X
+3 f
+1064(vi)X
+1 f
+1153(commands,)X
+1547(in)X
+1636(which)X
+1859(case)X
+2025(any)X
+2168(text)X
+2315(copied)X
+2556(into)X
+2707(a)X
+2770(buffer)X
+2994(is)X
+3074(character)X
+3397(oriented,)X
+3707(unless)X
+3934(the)X
+776 5622(starting)N
+1036(point)X
+1220(of)X
+1307(the)X
+1425(region)X
+1650(is)X
+1723(at)X
+1801(or)X
+1888(before)X
+2115(the)X
+2234(\256rst)X
+2379(nonblank)X
+2698(character)X
+3015(on)X
+3116(its)X
+3212(line,)X
+3373(and)X
+3510(the)X
+3629(ending)X
+3868(point)X
+776 5712(is)N
+849(at)X
+927(or)X
+1014(after)X
+1182(the)X
+1300(last)X
+1431(nonblank)X
+1749(character)X
+2065(on)X
+2165(its)X
+2260(line,)X
+2420(in)X
+2502(which)X
+2718(case)X
+2877(it)X
+2941(is)X
+3014(line)X
+3154(oriented.)X
+
+17 p
+%%Page: 17 16
+10 s 10 xH 0 xS 1 f 1 i
+3 f
+576 474(Nvi/Nex)N
+872 0.3906(Reference)AX
+1237(\(Vi)X
+1364(Commands\))X
+3658(USD:13-17)X
+1 f
+776 762(Line:)N
+1136(Set)X
+1258(to)X
+1340(the)X
+1458(line)X
+1598(containing)X
+1956(the)X
+2074(matching)X
+2392(character.)X
+776 852(Column:)N
+1136(Set)X
+1258(to)X
+1340(the)X
+1458(matching)X
+1776(character.)X
+776 942(Options:)N
+1136(None.)X
+3 f
+576 1122(&)N
+1 f
+776 1212(Repeat)N
+1019(the)X
+1137(previous)X
+1433(substitution)X
+1825(command)X
+2161(on)X
+2261(the)X
+2379(current)X
+2627(line.)X
+776 1392(Historically,)N
+1194(any)X
+7 f
+1330(count)X
+1 f
+1590(speci\256ed)X
+1895(to)X
+1977(the)X
+3 f
+2095(&)X
+1 f
+2182(command)X
+2518(was)X
+2663(ignored.)X
+776 1572(Line:)N
+1136(Unchanged.)X
+776 1662(Column:)N
+1136(Unchanged)X
+1531(if)X
+1609(the)X
+1736(cursor)X
+1966(was)X
+2120(on)X
+2229(the)X
+2356(last)X
+2496(character)X
+2821(in)X
+2912(the)X
+3039(line,)X
+3208(otherwise,)X
+3569(set)X
+3688(to)X
+3780(the)X
+3908(\256rst)X
+1136 1752(nonblank)N
+1454(character)X
+1770(in)X
+1852(the)X
+1970(line.)X
+776 1842(Options:)N
+1136(Affected)X
+1438(by)X
+1538(the)X
+3 f
+1656(edcompatible)X
+1 f
+2114(,)X
+3 f
+2154(extended)X
+1 f
+2461(,)X
+3 f
+2501(ignorecase)X
+1 f
+2882(and)X
+3 f
+3018(magic)X
+1 f
+3243(options.)X
+3 f
+576 2022 0.3182(\302<character>)AN
+576 2112 0.3182(`<character>)AN
+1 f
+776 2202(Return)N
+1014(to)X
+1096(a)X
+1152(context)X
+1408(marked)X
+1669(by)X
+1769(the)X
+1888(character)X
+7 f
+2205(<character>)X
+1 f
+(.)S
+2794(If)X
+7 f
+2869(<character>)X
+1 f
+3418(is)X
+3492(the)X
+3611(``)X
+7 f
+3665(')X
+1 f
+('')S
+3788(or)X
+3876(``)X
+7 f
+3930(`)X
+1 f
+('')S
+776 2292(character,)N
+1113(return)X
+1326(to)X
+1409(the)X
+1528(previous)X
+1825(context.)X
+2122(If)X
+7 f
+2197(<character>)X
+1 f
+2746(is)X
+2820(any)X
+2956(other)X
+3141(character,)X
+3477(return)X
+3689(to)X
+3771(the)X
+3889(con-)X
+776 2382(text)N
+921(marked)X
+1187(by)X
+1292(that)X
+1437(character)X
+1759(\(see)X
+1915(the)X
+3 f
+2039(m)X
+1 f
+2132(command)X
+2474(for)X
+2594(more)X
+2785(information\).)X
+3256(If)X
+3336(the)X
+3460(command)X
+3802(is)X
+3881(the)X
+3 f
+4005(\302)X
+1 f
+776 2472(command,)N
+1137(only)X
+1304(the)X
+1427(line)X
+1572(value)X
+1771(is)X
+1848(restored,)X
+2151(and)X
+2291(the)X
+2413(cursor)X
+2638(is)X
+2715(placed)X
+2949(on)X
+3053(the)X
+3175(\256rst)X
+3323(nonblank)X
+3645(character)X
+3965(of)X
+776 2562(that)N
+916(line.)X
+1096(If)X
+1170(the)X
+1288(command)X
+1624(is)X
+1697(the)X
+3 f
+1815(`)X
+1 f
+1862(command,)X
+2218(both)X
+2380(the)X
+2498(line)X
+2638(and)X
+2774(column)X
+3034(values)X
+3259(are)X
+3378(restored.)X
+776 2742(It)N
+849(is)X
+926(an)X
+1026(error)X
+1207(if)X
+1280(the)X
+1402(context)X
+1662(no)X
+1766(longer)X
+1995(exists)X
+2202(because)X
+2482(of)X
+2574(line)X
+2719(deletion.)X
+3042(\(Contexts)X
+3378(follow)X
+3612(lines)X
+3788(that)X
+3933(are)X
+776 2832(moved,)N
+1034(or)X
+1121(which)X
+1337(are)X
+1456(deleted)X
+1708(and)X
+1844(then)X
+2002(restored.\))X
+776 3012(The)N
+3 f
+924(\302)X
+1 f
+974(and)X
+3 f
+1113(`)X
+1 f
+1163(commands)X
+1533(are)X
+1655(both)X
+1820(absolute)X
+2110(movements.)X
+2542(They)X
+2730(may)X
+2891(be)X
+2990(used)X
+3160(as)X
+3250(a)X
+3309(motion)X
+3558(component)X
+3938(for)X
+776 3102(other)N
+3 f
+962(vi)X
+1 f
+1045(commands.)X
+1453(For)X
+1585(the)X
+3 f
+1704(\302)X
+1 f
+1752(command,)X
+2108(any)X
+2244(text)X
+2384(copied)X
+2618(into)X
+2762(a)X
+2818(buffer)X
+3035(is)X
+3108(line)X
+3248(oriented.)X
+3571(For)X
+3702(the)X
+3 f
+3820(`)X
+1 f
+3867(com-)X
+776 3192(mand,)N
+1002(any)X
+1146(text)X
+1294(copied)X
+1536(into)X
+1688(a)X
+1752(buffer)X
+1977(is)X
+2058(character)X
+2382(oriented,)X
+2693(unless)X
+2921(it)X
+2993(both)X
+3163(starts)X
+3360(and)X
+3504(stops)X
+3696(at)X
+3782(the)X
+3908(\256rst)X
+776 3282(character)N
+1099(in)X
+1188(the)X
+1313(line,)X
+1480(in)X
+1569(which)X
+1792(case)X
+1958(it)X
+2029(is)X
+2109(line)X
+2255(oriented.)X
+2584(In)X
+2677(addition,)X
+2985(when)X
+3185(using)X
+3384(the)X
+3 f
+3508(`)X
+1 f
+3561(command)X
+3903(as)X
+3996(a)X
+776 3372(motion)N
+1025(component,)X
+1424(commands)X
+1794(which)X
+2013(move)X
+2214(backward)X
+2550(and)X
+2689(started)X
+2926(at)X
+3007(the)X
+3128(\256rst)X
+3275(character)X
+3594(in)X
+3679(the)X
+3801(line,)X
+3965(or)X
+776 3462(move)N
+983(forward)X
+1267(and)X
+1412(ended)X
+1633(at)X
+1719(the)X
+1845(\256rst)X
+1997(character)X
+2321(in)X
+2411(the)X
+2537(line,)X
+2705(are)X
+2832(corrected)X
+3160(to)X
+3250(the)X
+3376(last)X
+3515(character)X
+3839(of)X
+3934(the)X
+776 3552(starting)N
+1036(and)X
+1172(ending)X
+1410(lines,)X
+1601(respectively.)X
+776 3732(Line:)N
+1136(Set)X
+1258(to)X
+1340(the)X
+1458(line)X
+1598(from)X
+1774(the)X
+1892(context.)X
+776 3822(Column:)N
+1136(Set)X
+1261(to)X
+1346(the)X
+1467(\256rst)X
+1614(nonblank)X
+1935(character)X
+2254(in)X
+2340(the)X
+2462(line,)X
+2626(for)X
+2744(the)X
+3 f
+2866(\302)X
+1 f
+2917(command,)X
+3277(and)X
+3417(set)X
+3530(to)X
+3616(the)X
+3738(context's)X
+1136 3912(column)N
+1396(for)X
+1510(the)X
+3 f
+1628(`)X
+1 f
+1675(command.)X
+776 4002(Options:)N
+1136(None.)X
+3 f
+576 4182([count])N
+841(\()X
+1 f
+776 4272(Back)N
+961(up)X
+7 f
+1061(count)X
+1 f
+1321(sentences.)X
+776 4452(The)N
+3 f
+922(\()X
+1 f
+970(command)X
+1307(is)X
+1382(an)X
+1480(absolute)X
+1769(movement.)X
+2169(The)X
+3 f
+2316(\()X
+1 f
+2365(command)X
+2703(may)X
+2863(be)X
+2961(used)X
+3130(as)X
+3219(the)X
+3339(motion)X
+3587(component)X
+3965(of)X
+776 4542(other)N
+3 f
+963(vi)X
+1 f
+1047(commands,)X
+1436(in)X
+1520(which)X
+1738(case)X
+1899(any)X
+2036(text)X
+2177(copied)X
+2412(into)X
+2557(a)X
+2614(buffer)X
+2832(is)X
+2906(character)X
+3223(oriented,)X
+3527(unless)X
+3748(the)X
+3867(start-)X
+776 4632(ing)N
+913(and)X
+1064(stopping)X
+1374(points)X
+1604(of)X
+1706(the)X
+1839(region)X
+2079(are)X
+2213(the)X
+2346(\256rst)X
+2505(character)X
+2836(in)X
+2933(the)X
+3066(line,)X
+3241(in)X
+3338(which)X
+3569(case)X
+3743(it)X
+3823(is)X
+3912(line)X
+776 4722(oriented.)N
+1111(In)X
+1210(the)X
+1340(latter)X
+1537(case,)X
+1728(the)X
+1858(stopping)X
+2165(point)X
+2361(of)X
+2460(the)X
+2590(region)X
+2827(is)X
+2911(adjusted)X
+3209(to)X
+3302(be)X
+3409(the)X
+3538(end)X
+3685(of)X
+3783(the)X
+3912(line)X
+776 4812(immediately)N
+1196(before)X
+1422(it,)X
+1506(and)X
+1642(not)X
+1764(the)X
+1882(original)X
+2151(cursor)X
+2372(position.)X
+776 4992(Line:)N
+1136(Set)X
+1258(to)X
+1340(the)X
+1458(line)X
+1598(containing)X
+1956(the)X
+2074(beginning)X
+2414(of)X
+2501(the)X
+2619(sentence.)X
+776 5082(Column:)N
+1136(Set)X
+1258(to)X
+1340(the)X
+1458(\256rst)X
+1602(nonblank)X
+1920(character)X
+2236(of)X
+2323(the)X
+2441(sentence.)X
+776 5172(Options:)N
+1136(None.)X
+3 f
+576 5352([count])N
+841(\))X
+1 f
+776 5442(Move)N
+983(forward)X
+7 f
+1258(count)X
+1 f
+1518(sentences.)X
+776 5622(The)N
+3 f