don't automatically ignore "/tmp" files, causes ":next /tmp" and
[nvi.git] / README
blob8873accd65ec7b5655d705e8df8bb170c3961e62
1 #       $Id: README,v 8.32 1993/12/04 10:21:39 bostic Exp $ (Berkeley) $Date: 1993/12/04 10:21:39 $
3 This is the README for version 0.91 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                 :resize count grows/shrinks the current screen.
75         o Background/foreground screens
76                 :bg backgrounds the current screen.
77                 :di[splay] s[creens] lists the hidden screens.
78                 :fg [file] foregrounds the specified (or next) screen.
79         o Shell screens:
80                 :sc[ript] [file ...] runs a shell in the screen.
81                 Carriage return sends a line to the shell.
82         o Buffer, screens, tags display:
83                 :di[splay] b[uffers] displays the current cut buffers.
84                 :di[splay] s[creens] displays the hidden screen names.
85                 :di[splay] t[ags] displays the current tags stack.
86         o Tag stacks:
87                 ^T returns to previous tag location.
88                 :tagpop [number | file] returns to previous tag location,
89                      or, optionally tag #N, or the tag in a specific file.
90                 :tagtop returns to first tag location.
91         o Infinite undo:
92                 :set nundo toggles this behavior.
93                 u un-does the previous operation.
94                 U re-does the next operation.
95         o Usage information:
96                 :exu[sage] [cmd] for ex commands.
97                 :viu[sage] [key] for vi commands.
98                 :help
99         o Extended RE expressions:
100                 :set extended turns on extended RE's, so you can
101                     do "/in|or" and search for the next occurrence of
102                     more than one expression.
103         o Word search:
104                 ^A searches for the word referenced by the cursor.
105         o Number increment:
106                 # increments the number referenced by the cursor.
107         o Previous file:
108                 :prev[ious][!] edits the previous file from the
109                 argument list.
111 =-=-=-=-=-=-=-=-=-=-=
112 o Porting information:
114 The directory PORT has directories per machine/OS combination, with
115 old-style Makefiles which build nvi.  See it and the file PORT/README
116 for more information.
118 =-=-=-=-=-=-=-=-=-=-=
119 o Directories:
121 The main directory, nvi, contains some source files for various pieces
122 of code that are shared by all the editors, mostly logging code or code
123 translating line numbers into requests to the dbopen(3) database code.
124 It also has the code for adding, deleting, and changing "records" in
125 the underlying database.
127 The nvi/ex directory is the ex source code.  Because vi has the colon
128 command, lots of this code is used by vi.  Generally, if functionality
129 is shared by both ex and vi, it's in nvi/ex, if it's vi only, it's in
130 nvi/vi.  Files are generally named by the command(s) they support, but
131 occasionally with a name that describes their functionality.
133 The nvi/sex directory is the screen support for the ex editor.
135 The nvi/vi directory is the vi source code.
137 The nvi/svi directory is the screen support for a curses based vi editor.
139 The nvi/docs directory has technical information about data structures
140 and some of the trickier parts of vi like quoting, key mapping, input
141 queues, and executing buffers.
143 =-=-=-=-=-=-=-=-=-=-=
144 o Temporary files and recovery:
146 There is no "recovery" program for nvi, nor does it run setuid.  Users
147 may "recover" any file which they may read, thus, the superuser can
148 recover any edit session.
150 Edit sessions are backed by files in /var/tmp/vi.recover, and are named
151 "vi.XXX", where "XXX" is a number related to the process id.  When the
152 file is first modified, a second file, which contains an email message for
153 the user, is created, and is named "recover.XXX", where, again, "XXX" is
154 associated with the process id.  Both files are removed at the end of a
155 normal edit session, but will remain if the edit session is abnormally
156 terminated or the user enters the ex/vi ":preserve" command.
158 The use of /var/tmp/vi.recover may be changed by setting the "directory"
159 option in the user or system .exrc file.
161 The recover file has all of the necessary information in it to enable the
162 user to recover the edit session.  In addition, it has all of the
163 necessary email headers for sendmail.  When the system is rebooted, all
164 of the files in /var/tmp/vi.recover named "recover.XXX" should be sent
165 by email, using the -t flag of sendmail (or a similar mechanism with other
166 mailers).  A simple way to do this is to insert the following script into
167 your rc.local file:
169         for i in /var/tmp/vi.recover/recover.*; do
170                 sendmail -t < $i
171         done
173 If nex/nvi receives a hangup (SIGHUP) signal, it will email the recovery
174 information to the user itself.