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