wordsmith
[nvi.git] / README
blob9abe8af11b9b64aed4a1496337f5943cffd38036
1 #       $Id: README,v 8.22 1993/11/09 09:26:40 bostic Exp $ (Berkeley) $Date: 1993/11/09 09:26:40 $
3 This is the README for version 0.81 of nex/nvi, a (soon to be) freely
4 redistributable replacement for the vi/ex text editors.
6 This is still ALPHA software, please do not redistribute it without
7 talking to me first.  It can be retrieved via anonymous ftp from
8 vangogh.cs.berkeley.edu:~ftp/hidden/nvi.tar.Z.
10 A BETA version will be released RSN, and it will be redistributable
11 as you choose.  The beta version and future versions of this software
12 will be available by anonymous ftp from ftp.cs.berkeley.edu, in the
13 file ucb/4bsd/nvi.tar.Z, or from ftp.uu.net.
15 If you have any questions or problems with nvi, please send them to
16 me by email at one of the following email addresses:
18         uunet!bostic
19         bostic@cs.berkeley.edu
21 Keith Bostic
22 =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
24 o Credit where it's due:
26         This software was originally derived from software contributed
27         to the University of California, Berkeley by Steve Kirkendall,
28         the author of the vi clone elvis.  Without his work, this work
29         would have been far more difficult.
31         POSIX 1003.2 style regular expression support is courtesy of
32         Henry Spencer, for which I am *very* grateful.
34         The reworked curses implementation was done by Elan Amir
35         while at the University of California, Berkeley.
37 o From the original vi acknowledgements, by William Joy and Mark Horton:
39         Bruce Englar encouraged the early development of this display
40         editor.  Peter Kessler helped bring sanity to version 2's
41         command layout.  Bill Joy wrote versions 1 and 2.0 through 2.7,
42         and created the framework that users see in the present editor.
43         Mark Horton added macros and other features and made the editor
44         work on a large number of terminals and Unix systems.
46 =-=-=-=-=-=-=-=-=-=-=
47 o Comments:
49 This software is alpha software, although it's getting fairly stable.  I
50 believe that almost all of the necessary functionality for ex/vi is in
51 it, but it's definitely not ready for prime time.  Code fixes are, of
52 course, very much appreciated, but if you don't have time, please send me
53 as much information as you can as to how to reproduce the bug, and I'll
54 fix it here.  In particular, the screen routines are nasty stuff, and you
55 probably don't want to mess with them.  Stack traces of core dumps are
56 helpful, but an example file with a set of keystrokes is even better.
58 Nvi is mostly 8-bit clean.  This isn't difficult to fix, and was left in
59 during initial development to make things easier.  Wide character support
60 will be integrated at the same time it is made fully 8-bit clean.
62 =-=-=-=-=-=-=-=-=-=-=
63 o New features:
65 There aren't a lot of new features in nex/nvi, but there are a few
66 things you might like:
68         o 8-bit clean data, practically infinite lines/files.
69                 ^Vx[0-9A-Fa-f]* in input mode will insert any
70                 legal character value.
71         o Split screens:
72                 :sp[lit] [file ...] splits the screen.
73                 ^W switches between screens.
74         o Shell screens:
75                 :sc[ript] [file ...] runs a shell in the screen.
76                 Carriage return sends a line to the shell.
77         o Buffer display:
78                 :b[display] displays the current cut buffers.
79         o Tag stacks:
80                 ^T returns from previous tag location.
81                 :tagpop returns to previous tag location.
82                 :tagtop returns to original tag location.
83         o Infinite undo:
84                 :set nundo toggles this behavior.
85                 u un-does the previous operation.
86                 U re-does the next operation.
87         o Usage information:
88                 :exu[sage] [cmd] for ex commands.
89                 :viu[sage] [key] for vi commands.
90                 :help
91         o Extended RE expressions:
92                 :set extended turns on extended RE's, so you can
93                 do "/in|or" and search for the next occurrence of
94                 more than one expression.
95         o Word search:
96                 ^A searches for the word referenced by the cursor.
97         o Number increment:
98                 # increments the number referenced by the cursor.
99         o Previous file:
100                 :prev[ious][!] edits the previous file from the
101                 argument list.
103 =-=-=-=-=-=-=-=-=-=-=
104 o Porting information:
106 The directory PORT has directories per machine/OS combination, with
107 old-style Makefiles which build nvi.  See it and the file PORT/README
108 for more information.
110 =-=-=-=-=-=-=-=-=-=-=
111 o Directories:
113 The main directory, nvi, contains some source files for various pieces
114 of code that are shared by all the editors, mostly logging code or code
115 translating line numbers into requests to the dbopen(3) database code.
116 It also has the code for adding, deleting, and changing "records" in
117 the underlying database.
119 The nvi/ex directory is the ex source code.  Because vi has the colon
120 command, lots of this code is used by vi.  Generally, if functionality
121 is shared by both ex and vi, it's in nvi/ex, if it's vi only, it's in
122 nvi/vi.  Files are generally named by the command(s) they support, but
123 occasionally with a name that describes their functionality.
125 The nvi/sex directory is the screen support for the ex editor.
127 The nvi/vi directory is the vi source code.
129 The nvi/svi directory is the screen support for a curses based vi editor.
131 The nvi/docs directory has technical information about data structures
132 and some of the trickier parts of vi like quoting, key mapping, input
133 queues, and executing buffers.
135 =-=-=-=-=-=-=-=-=-=-=
136 o Temporary files and recovery:
138 There is no "recovery" program for nvi, nor does it run setuid.  Users
139 may "recover" any file which they may read, thus, the superuser can
140 recover any edit session.
142 Edit sessions are backed by files in /var/tmp/vi.recover, and are named
143 "vi.XXX", where "XXX" is a number related to the process id.  When the
144 file is first modified, a second file, which contains an email message for
145 the user, is created, and is named "recover.XXX", where, again, "XXX" is
146 associated with the process id.  Both files are removed at the end of a
147 normal edit session, but will remain if the edit session is abnormally
148 terminated or the user enters the ex/vi ":preserve" command.
150 The use of /var/tmp/vi.recover may be changed by setting the "directory"
151 option in the user or system .exrc file.
153 The recover file has all of the necessary information in it to enable the
154 user to recover the edit session.  In addition, it has all of the
155 necessary email headers for sendmail.  When the system is rebooted, all
156 of the files in /var/tmp/vi.recover named "recover.XXX" should be sent
157 by email, using the -t flag of sendmail (or a similar mechanism with other
158 mailers).  A simple way to do this is to insert the following script into
159 your rc.local file:
161         for i in /var/tmp/vi.recover/recover.*; do
162                 sendmail -t < $i
163         done
165 If nex/nvi receives a hangup (SIGHUP) signal, it will email the recovery
166 information to the user itself.