1*7c478bd9Sstevel@tonic-gate#ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.12 */ 2*7c478bd9Sstevel@tonic-gate# 3*7c478bd9Sstevel@tonic-gate# CDDL HEADER START 4*7c478bd9Sstevel@tonic-gate# 5*7c478bd9Sstevel@tonic-gate# The contents of this file are subject to the terms of the 6*7c478bd9Sstevel@tonic-gate# Common Development and Distribution License, Version 1.0 only 7*7c478bd9Sstevel@tonic-gate# (the "License"). You may not use this file except in compliance 8*7c478bd9Sstevel@tonic-gate# with the License. 9*7c478bd9Sstevel@tonic-gate# 10*7c478bd9Sstevel@tonic-gate# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 11*7c478bd9Sstevel@tonic-gate# or http://www.opensolaris.org/os/licensing. 12*7c478bd9Sstevel@tonic-gate# See the License for the specific language governing permissions 13*7c478bd9Sstevel@tonic-gate# and limitations under the License. 14*7c478bd9Sstevel@tonic-gate# 15*7c478bd9Sstevel@tonic-gate# When distributing Covered Code, include this CDDL HEADER in each 16*7c478bd9Sstevel@tonic-gate# file and include the License file at usr/src/OPENSOLARIS.LICENSE. 17*7c478bd9Sstevel@tonic-gate# If applicable, add the following below this CDDL HEADER, with the 18*7c478bd9Sstevel@tonic-gate# fields enclosed by brackets "[]" replaced with your own identifying 19*7c478bd9Sstevel@tonic-gate# information: Portions Copyright [yyyy] [name of copyright owner] 20*7c478bd9Sstevel@tonic-gate# 21*7c478bd9Sstevel@tonic-gate# CDDL HEADER END 22*7c478bd9Sstevel@tonic-gate# 23*7c478bd9Sstevel@tonic-gate 24*7c478bd9Sstevel@tonic-gate********************************************************************** 25*7c478bd9Sstevel@tonic-gate*** NOTE: All pre-1980 commentary has been removed from this file. *** 26*7c478bd9Sstevel@tonic-gate********************************************************************** 27*7c478bd9Sstevel@tonic-gate 28*7c478bd9Sstevel@tonic-gateVersion SVR3.1 1986 29*7c478bd9Sstevel@tonic-gate 30*7c478bd9Sstevel@tonic-gate MAJOR STRUCTURAL CHANGES & ENHANCEMENTS: 31*7c478bd9Sstevel@tonic-gate 32*7c478bd9Sstevel@tonic-gate 1. ex/vi modified to use an interim version of getopt(3), 33*7c478bd9Sstevel@tonic-gate so that ex/vi can migrate to standardized command syntax. 34*7c478bd9Sstevel@tonic-gate Syntax changes: 35*7c478bd9Sstevel@tonic-gate 36*7c478bd9Sstevel@tonic-gate ILLEGAL (old) LEGAL 37*7c478bd9Sstevel@tonic-gate 38*7c478bd9Sstevel@tonic-gate -r [optional arg] -L (for listing of recovered files) 39*7c478bd9Sstevel@tonic-gate -r arg (to recover file "arg") 40*7c478bd9Sstevel@tonic-gate +cmd -c cmd 41*7c478bd9Sstevel@tonic-gate - (for silent) -s 42*7c478bd9Sstevel@tonic-gate 43*7c478bd9Sstevel@tonic-gate Both legal and (old) illegal options will be accepted 44*7c478bd9Sstevel@tonic-gate for a period of time; later, the old illegal options 45*7c478bd9Sstevel@tonic-gate will be dropped from ex/vi. 46*7c478bd9Sstevel@tonic-gate 47*7c478bd9Sstevel@tonic-gate 2. It is now possible to recover encrypted files. The file header has 48*7c478bd9Sstevel@tonic-gate been changed to include an encrypted flag. Therefore, if the user 49*7c478bd9Sstevel@tonic-gate types "vi -r file" when "file" is encrypted, the program will 50*7c478bd9Sstevel@tonic-gate automatically check the header flag and prompt the user for the 51*7c478bd9Sstevel@tonic-gate encryption key. The actions are as follows: 52*7c478bd9Sstevel@tonic-gate 53*7c478bd9Sstevel@tonic-gate command line encrypted file actions 54*7c478bd9Sstevel@tonic-gate ------------ -------------- ------- 55*7c478bd9Sstevel@tonic-gate vi -r file YES prompted for key associated 56*7c478bd9Sstevel@tonic-gate with recovered file 57*7c478bd9Sstevel@tonic-gate [editing session not encrypted] 58*7c478bd9Sstevel@tonic-gate 59*7c478bd9Sstevel@tonic-gate vi -r file NO regular recovery 60*7c478bd9Sstevel@tonic-gate [editing session not encrypted] 61*7c478bd9Sstevel@tonic-gate 62*7c478bd9Sstevel@tonic-gate vi -r -x file YES prompted for editing session key 63*7c478bd9Sstevel@tonic-gate [editing session encrypted, 64*7c478bd9Sstevel@tonic-gate editing session key is used 65*7c478bd9Sstevel@tonic-gate to recover file] 66*7c478bd9Sstevel@tonic-gate 67*7c478bd9Sstevel@tonic-gate vi -r -x file NO prompted for editing session key 68*7c478bd9Sstevel@tonic-gate [editing session encrypted] 69*7c478bd9Sstevel@tonic-gate 70*7c478bd9Sstevel@tonic-gate 3. The structure of /usr/preserve has been changed to improve security. 71*7c478bd9Sstevel@tonic-gate The directory /usr/preserve will have read-write-execute permissions 72*7c478bd9Sstevel@tonic-gate for everybody. Recovered files will be saved in a subdirectory in 73*7c478bd9Sstevel@tonic-gate /usr/preserve. The subdirectory name is the same as the user's id, 74*7c478bd9Sstevel@tonic-gate owned by the user, and has read-write-execute permissions for the 75*7c478bd9Sstevel@tonic-gate user only. The recovered file in the subdirectory has read-write 76*7c478bd9Sstevel@tonic-gate permissions for the user only. Expreserve, exrecover, and /usr/preserve 77*7c478bd9Sstevel@tonic-gate all have owner and group of "bin"; setuid bits in expreserve and 78*7c478bd9Sstevel@tonic-gate exrecover have been turned off. 79*7c478bd9Sstevel@tonic-gate 80*7c478bd9Sstevel@tonic-gate 4. the command "vi -r" or "vi -L" used to list recoverable files, 81*7c478bd9Sstevel@tonic-gate now lists the user's files found in /tmp as well as /usr/preserve/user 82*7c478bd9Sstevel@tonic-gate so the user has a complete list. Files are listed under the 83*7c478bd9Sstevel@tonic-gate appropriate directory names. 84*7c478bd9Sstevel@tonic-gate 85*7c478bd9Sstevel@tonic-gate 5. name of source directory "vax" changed to "port" 86*7c478bd9Sstevel@tonic-gate 87*7c478bd9Sstevel@tonic-gate 6. exit code of ex/vi reflects number of error/warning messages 88*7c478bd9Sstevel@tonic-gate incurred 89*7c478bd9Sstevel@tonic-gate 90*7c478bd9Sstevel@tonic-gate 7. ctags (used in conjunction with -t option and ":ta") now 91*7c478bd9Sstevel@tonic-gate installed in /usr/bin/ctags (manual page in Section 1). 92*7c478bd9Sstevel@tonic-gate 93*7c478bd9Sstevel@tonic-gate 8. added ed-like enhancement such that "s/text/%" will replace 94*7c478bd9Sstevel@tonic-gate "text" with the righthand side of the previous substitute 95*7c478bd9Sstevel@tonic-gate command. 96*7c478bd9Sstevel@tonic-gate 97*7c478bd9Sstevel@tonic-gate 9. added argument to case operator "~" so that multiple substitutions 98*7c478bd9Sstevel@tonic-gate per line can occur (e.g. "10~"). 99*7c478bd9Sstevel@tonic-gate 100*7c478bd9Sstevel@tonic-gate BUG FIXES: 101*7c478bd9Sstevel@tonic-gate 102*7c478bd9Sstevel@tonic-gate 1.*if input being read by source'd file and an error is 103*7c478bd9Sstevel@tonic-gate encountered, the user is bumped up to the previous source 104*7c478bd9Sstevel@tonic-gate level, instead of being thrown back into command mode. 105*7c478bd9Sstevel@tonic-gate 2.*ex/vi restores tty state if fork fails. 106*7c478bd9Sstevel@tonic-gate 3.*ex/vi allows backspacing and retyping of conditional 107*7c478bd9Sstevel@tonic-gate responses (in the case of ":s/old/new/c"). 108*7c478bd9Sstevel@tonic-gate 4.*"U" (undo line changes) no longer marks file as modified 109*7c478bd9Sstevel@tonic-gate when no editing has been done. 110*7c478bd9Sstevel@tonic-gate 5.*file not automatically considered modified when "vi +cmd file" 111*7c478bd9Sstevel@tonic-gate syntax used. 112*7c478bd9Sstevel@tonic-gate 6.*actions of "ZZ" altered as follows: 113*7c478bd9Sstevel@tonic-gate 114*7c478bd9Sstevel@tonic-gate COMMAND OLD ACTIONS NEW ACTIONS 115*7c478bd9Sstevel@tonic-gate ------- ----------- ----------- 116*7c478bd9Sstevel@tonic-gate vi newfn; ZZ no file created same as old action 117*7c478bd9Sstevel@tonic-gate vi oldfn; ZZ oldfn unchanged same as old action 118*7c478bd9Sstevel@tonic-gate vi newfn; 1,$d; ZZ no file created write empty file 119*7c478bd9Sstevel@tonic-gate vi newfn; a text (0 char; 0 bytes) 120*7c478bd9Sstevel@tonic-gate 1,$d; ZZ no file created write empty file 121*7c478bd9Sstevel@tonic-gate vi oldfn; 1,$d; ZZ oldfn unchanged write empty file 122*7c478bd9Sstevel@tonic-gate vi oldfn; a text; 123*7c478bd9Sstevel@tonic-gate 1,$d; ZZ oldfn unchanged write empty file 124*7c478bd9Sstevel@tonic-gate vi oldfn; dd all; ZZ write empty file same as old action@ 125*7c478bd9Sstevel@tonic-gate 126*7c478bd9Sstevel@tonic-gate 7.*cursor now moves to column 1 when HOME arrow key pushed in 127*7c478bd9Sstevel@tonic-gate INSERT mode. 128*7c478bd9Sstevel@tonic-gate 8.*if showmode set, it will display APPEND/INSERT/REPLACE(etc.) mode 129*7c478bd9Sstevel@tonic-gate as appropriate. 130*7c478bd9Sstevel@tonic-gate 9.*"novice" option can now be set or unset properly. 131*7c478bd9Sstevel@tonic-gate 10.*yank-put now works when wrapmargin set and user tries to 132*7c478bd9Sstevel@tonic-gate do a put at the end of a line (i.e., overlapping the wrap 133*7c478bd9Sstevel@tonic-gate margin). Similar problem also fixed for ":R" for replacements 134*7c478bd9Sstevel@tonic-gate beyond 80 columns or overlapping wrap margins (whichever comes 135*7c478bd9Sstevel@tonic-gate first). 136*7c478bd9Sstevel@tonic-gate 11.*stop "!" from being expanded within the shell escaped command 137*7c478bd9Sstevel@tonic-gate line. Now ":!!" or any "!!" (after the initial shell escape) 138*7c478bd9Sstevel@tonic-gate will cause substitution of the last command. 139*7c478bd9Sstevel@tonic-gate 12.*code fixed to allow hardtabs set to 0. Now, if hardtabs set 140*7c478bd9Sstevel@tonic-gate to 0 (i.e., terminal does not support hardtabs), ex/vi will 141*7c478bd9Sstevel@tonic-gate use spaces to emulate tabbing. 142*7c478bd9Sstevel@tonic-gate 13.*marks no longer lost after undo 143*7c478bd9Sstevel@tonic-gate 14.*Note that the REPORT variable is 5 by default. For informatory 144*7c478bd9Sstevel@tonic-gate messages when changes have been make for fewer than 5 lines, 145*7c478bd9Sstevel@tonic-gate the user should ":set report=x" where x is a number. 146*7c478bd9Sstevel@tonic-gate 15.*"/" no longer considered a command (for undo purposes) 147*7c478bd9Sstevel@tonic-gate 16.*read done by ":Nr file" command (where N is a line number) 148*7c478bd9Sstevel@tonic-gate now correctly undone (by "undo" command) 149*7c478bd9Sstevel@tonic-gate 17.*added boundary checks so that exceeding maximum permitted map 150*7c478bd9Sstevel@tonic-gate statements does not generate core dump/infinite loops 151*7c478bd9Sstevel@tonic-gate 18.*terminal-dependent mapping removed when the user redefines the 152*7c478bd9Sstevel@tonic-gate terminal by "set term=xxx" from ex editor (i.e., so only one 153*7c478bd9Sstevel@tonic-gate terminal is mapped). 154*7c478bd9Sstevel@tonic-gate 19.*'w' (advance a word) no longer fails on lines with trailing spaces. 155*7c478bd9Sstevel@tonic-gate 20.*newline character not added to empty file. 156*7c478bd9Sstevel@tonic-gate 21.*showmode indicator remains on when arrow keys used (e.g., while in 157*7c478bd9Sstevel@tonic-gate input mode, INPUT MODE indicator is on until the ESC key is pressed). 158*7c478bd9Sstevel@tonic-gate 22.*an interrupt during a write operation will no longer cause truncated 159*7c478bd9Sstevel@tonic-gate file with no backup (happened only if file had NOT been modified 160*7c478bd9Sstevel@tonic-gate during edit session; otherwise, backup was automatically initiated). 161*7c478bd9Sstevel@tonic-gate 23.*new set option "modelines" (abbreviated "ml") created to prevent 162*7c478bd9Sstevel@tonic-gate accidental interpretation of code by modelines (i.e., any characters 163*7c478bd9Sstevel@tonic-gate following "ex:" or "vi:" and ending with a ":" would be interpreted 164*7c478bd9Sstevel@tonic-gate as an ex command that would be executed before the file is loaded 165*7c478bd9Sstevel@tonic-gate into the editor). Default of modelines is OFF. 166*7c478bd9Sstevel@tonic-gate 24.*"ei:" and "vx:" no longer considered valid triggers to modelines 167*7c478bd9Sstevel@tonic-gate 25.*abbreviations fixed so they do not loop recursively 168*7c478bd9Sstevel@tonic-gate (i.e., ab yes yes!, or ab O O'Connal). 169*7c478bd9Sstevel@tonic-gate 26.*J, 1J and 2J perform same operation: joining the current line and 170*7c478bd9Sstevel@tonic-gate the next line together. 0J is actually two commands: 0 (meaning 171*7c478bd9Sstevel@tonic-gate go to the beginning of the line) and J (join). 172*7c478bd9Sstevel@tonic-gate 27.*when tmp file becomes too big, line of garbage no longer added to 173*7c478bd9Sstevel@tonic-gate file. 174*7c478bd9Sstevel@tonic-gate 28.*":n +command" no longer infinite loops on 3b2's. 175*7c478bd9Sstevel@tonic-gate 29.*%-matching is now interruptible. 176*7c478bd9Sstevel@tonic-gate 30.*version information put into /usr/lib/exstrings file. 177*7c478bd9Sstevel@tonic-gate 178*7c478bd9Sstevel@tonic-gateVersion 3.9 February 10, 1983 179*7c478bd9Sstevel@tonic-gate 180*7c478bd9Sstevel@tonic-gate A new option "showmode" (smd) causes input mode to be indicated 181*7c478bd9Sstevel@tonic-gate toward the right end of the message line. This is useful for 182*7c478bd9Sstevel@tonic-gate learning vi and for people who get confused about what mode they 183*7c478bd9Sstevel@tonic-gate are in. Only the first letter of the message is shown if "terse" 184*7c478bd9Sstevel@tonic-gate is also set. 185*7c478bd9Sstevel@tonic-gate 186*7c478bd9Sstevel@tonic-gate A new invocation "vedit" is for novices. This is like edit but 187*7c478bd9Sstevel@tonic-gate puts you into visual mode right away. It also sets showmode. 188*7c478bd9Sstevel@tonic-gate 189*7c478bd9Sstevel@tonic-gate The default number of lines to scroll in visual mode on a 190*7c478bd9Sstevel@tonic-gate control D is now the variable scroll, not half the variable 191*7c478bd9Sstevel@tonic-gate window. 192*7c478bd9Sstevel@tonic-gate 193*7c478bd9Sstevel@tonic-gate A bug causing extra CPU usage when vi is reentered after ^Z 194*7c478bd9Sstevel@tonic-gate has been fixed. This also fixes a bug causing a hang until the 195*7c478bd9Sstevel@tonic-gate user types something if you are past column 80 before ^Z. 196*7c478bd9Sstevel@tonic-gate 197*7c478bd9Sstevel@tonic-gateVersion 3.8 April 22, 1982 198*7c478bd9Sstevel@tonic-gate 199*7c478bd9Sstevel@tonic-gate The main change is conversion from termcap to terminfo. 200*7c478bd9Sstevel@tonic-gate 201*7c478bd9Sstevel@tonic-gate More function keys are supported now. Most function keys 202*7c478bd9Sstevel@tonic-gate with a meaning to vi work both in command mode and input mode. 203*7c478bd9Sstevel@tonic-gate 204*7c478bd9Sstevel@tonic-gate A bug in the encryption command causing plain text in the 205*7c478bd9Sstevel@tonic-gate temp file and encrypted text on your screen has been fixed. 206*7c478bd9Sstevel@tonic-gate 207*7c478bd9Sstevel@tonic-gate A new command "crypt" or "X" enters encryption mode once 208*7c478bd9Sstevel@tonic-gate you have started editing, like the ed "x" command. 209*7c478bd9Sstevel@tonic-gate 210*7c478bd9Sstevel@tonic-gate A new command line option "-V" (verbose) is useful for 211*7c478bd9Sstevel@tonic-gate debugging ex scripts. 212*7c478bd9Sstevel@tonic-gate 213*7c478bd9Sstevel@tonic-gate A new boolean set option "flash" allows you to control whether 214*7c478bd9Sstevel@tonic-gate vi uses the visible bell in your terminal (if it has one). 215*7c478bd9Sstevel@tonic-gate The default is "flash", do "set noflash" if the flashing 216*7c478bd9Sstevel@tonic-gate is annoying. 217*7c478bd9Sstevel@tonic-gate 218*7c478bd9Sstevel@tonic-gate The "open" boolean option has been deleted. Ex will no longer 219*7c478bd9Sstevel@tonic-gate prevent the user from entering open mode. This clears up problems 220*7c478bd9Sstevel@tonic-gate with paths and invocations containing the letter "d". 221*7c478bd9Sstevel@tonic-gate 222*7c478bd9Sstevel@tonic-gate If the local system has the Cornell "Fast Timer" driver, vi uses 223*7c478bd9Sstevel@tonic-gate it instead of alarm to detect function keys. This means that the 224*7c478bd9Sstevel@tonic-gate delay after typing escape will usually only be 0.1 second instead 225*7c478bd9Sstevel@tonic-gate of a full second. Of course, if the user continues typing, there 226*7c478bd9Sstevel@tonic-gate is no delay at all. 227*7c478bd9Sstevel@tonic-gate 228*7c478bd9Sstevel@tonic-gateVersion 3.7 October 16, 1981 229*7c478bd9Sstevel@tonic-gate 230*7c478bd9Sstevel@tonic-gate It is now possible to split lines with substitute commands from vi, 231*7c478bd9Sstevel@tonic-gate by using ^V<return> in the rhs. This takes care of the last 232*7c478bd9Sstevel@tonic-gate good reason for using ex command mode. 233*7c478bd9Sstevel@tonic-gate 234*7c478bd9Sstevel@tonic-gate Mode lines are now supported. Put a line containing 235*7c478bd9Sstevel@tonic-gate ex: xxx : 236*7c478bd9Sstevel@tonic-gate in the first or last 5 lines of the file, where xxx is any ex 237*7c478bd9Sstevel@tonic-gate command you want executed when that file is read in. To make 238*7c478bd9Sstevel@tonic-gate other programs happy, it should probably be inside a comment. 239*7c478bd9Sstevel@tonic-gate You can use vi: as well as ex:. (Note: no space allowed 240*7c478bd9Sstevel@tonic-gate between the "ex" and ":". The spaces around xxx are considered 241*7c478bd9Sstevel@tonic-gate part of the command, and so are optional.) 242*7c478bd9Sstevel@tonic-gate 243*7c478bd9Sstevel@tonic-gate If there is a file .exrc in the current directory, it will be 244*7c478bd9Sstevel@tonic-gate sourced when you enter vi, after your EXINIT or ~/.exrc. 245*7c478bd9Sstevel@tonic-gate 246*7c478bd9Sstevel@tonic-gate The changeable scrolling region of the vt100 is now used in 247*7c478bd9Sstevel@tonic-gate place of insert line, resulting in much better performance. 248*7c478bd9Sstevel@tonic-gate 249*7c478bd9Sstevel@tonic-gate Vi uses the new AL, DL, LE, RI, DO, and UP (all upper case) 250*7c478bd9Sstevel@tonic-gate termcap capabilities, which are parameterized versions of their 251*7c478bd9Sstevel@tonic-gate lower case equivalents. This will results in better performance 252*7c478bd9Sstevel@tonic-gate on ANSI terminals, and especially on the Tektronix 4025 which 253*7c478bd9Sstevel@tonic-gate has parameterized local motions but cannot cursor address. 254*7c478bd9Sstevel@tonic-gate 255*7c478bd9Sstevel@tonic-gate Vi uses backtabs again. Now it knows how to handle backtabs on 256*7c478bd9Sstevel@tonic-gate terminals that have tabs set at intervals other than 8, and it 257*7c478bd9Sstevel@tonic-gate won't use backtabs if gtty indicates it can't use tabs. 258*7c478bd9Sstevel@tonic-gate 259*7c478bd9Sstevel@tonic-gate A bug causing <escape> <del> to core dump vi has been fixed. 260*7c478bd9Sstevel@tonic-gate 261*7c478bd9Sstevel@tonic-gate A bug causing writes to filters when editing encrypted files 262*7c478bd9Sstevel@tonic-gate to write encrypted text has been fixed. 263*7c478bd9Sstevel@tonic-gate 264*7c478bd9Sstevel@tonic-gate A bug causing the message "substitution loop", when you enter a 265*7c478bd9Sstevel@tonic-gate 1,$s/xxx/yyy/g with lots of changes, has been fixed. 266*7c478bd9Sstevel@tonic-gate 267*7c478bd9Sstevel@tonic-gate A bug causing the current directory to be chmod'ed to 0 if you 268*7c478bd9Sstevel@tonic-gate set nomesg after starting up the editor has been fixed. Note 269*7c478bd9Sstevel@tonic-gate that the nomesg option is intended for your EXINIT, since it only 270*7c478bd9Sstevel@tonic-gate takes effect on entry to the editor. 271*7c478bd9Sstevel@tonic-gate 272*7c478bd9Sstevel@tonic-gate The eat newline glitch has been fixed so that vt100's and tab132's 273*7c478bd9Sstevel@tonic-gate handle long lines correctly. 274*7c478bd9Sstevel@tonic-gate 275*7c478bd9Sstevel@tonic-gate Some internal changes have been made so that vi can run under UNIX 276*7c478bd9Sstevel@tonic-gate on the Bell Labs 3B machine, the BBN C/70, and the IBM 370. 277*7c478bd9Sstevel@tonic-gate 278*7c478bd9Sstevel@tonic-gateVersion 3.6 October 30, 1980 279*7c478bd9Sstevel@tonic-gate 280*7c478bd9Sstevel@tonic-gate A kernel problem on the V7 pdp-11 overlay systems which causes 281*7c478bd9Sstevel@tonic-gate bad EMT traps to happen randomly, core dumping the editor, 282*7c478bd9Sstevel@tonic-gate has been programmed around by catching EMT traps. 283*7c478bd9Sstevel@tonic-gate 284*7c478bd9Sstevel@tonic-gate A bug which prevented using a screen larger than 48 lines has 285*7c478bd9Sstevel@tonic-gate been fixed. 286*7c478bd9Sstevel@tonic-gate 287*7c478bd9Sstevel@tonic-gate A bug which allowed you to set window to a value larger than 288*7c478bd9Sstevel@tonic-gate your screen size has been fixed. 289*7c478bd9Sstevel@tonic-gate 290*7c478bd9Sstevel@tonic-gate The screen size limit on non-VM/Unix systems has been increased 291*7c478bd9Sstevel@tonic-gate to 66 lines or 5000 characters, to allow the Ann Arbor Ambassador 292*7c478bd9Sstevel@tonic-gate terminal to be used. 293*7c478bd9Sstevel@tonic-gate 294*7c478bd9Sstevel@tonic-gate A bug which caused hangups to be ignored on USG systems has 295*7c478bd9Sstevel@tonic-gate been fixed. 296*7c478bd9Sstevel@tonic-gate 297*7c478bd9Sstevel@tonic-gate A bug which caused maps with multiple changes on multiple lines 298*7c478bd9Sstevel@tonic-gate to mess up has been fixed. 299*7c478bd9Sstevel@tonic-gate 300*7c478bd9Sstevel@tonic-gate If you get I/O errors, the file is considered "not edited" so 301*7c478bd9Sstevel@tonic-gate that you don't accidentally clobber the good file with a munged 302*7c478bd9Sstevel@tonic-gate up buffer. 303*7c478bd9Sstevel@tonic-gate 304*7c478bd9Sstevel@tonic-gate An inefficiency in 3.5 which caused the editor to always call 305*7c478bd9Sstevel@tonic-gate ttyname has been fixed. 306*7c478bd9Sstevel@tonic-gate 307*7c478bd9Sstevel@tonic-gate A bug which prevented the "source" command from working in an 308*7c478bd9Sstevel@tonic-gate EXINIT or from visual has been fixed. 309*7c478bd9Sstevel@tonic-gate 310*7c478bd9Sstevel@tonic-gate A bug which caused readonly to be cleared when reading from 311*7c478bd9Sstevel@tonic-gate a writable file with "r" has been fixed. 312*7c478bd9Sstevel@tonic-gate 313*7c478bd9Sstevel@tonic-gate The name "suspend" has been made an alias for "stop". 314*7c478bd9Sstevel@tonic-gate 315*7c478bd9Sstevel@tonic-gate The stop command now once again works correctly from command mode. 316*7c478bd9Sstevel@tonic-gate 317*7c478bd9Sstevel@tonic-gate On a dumb terminal at 1200 baud, "slowopen" is now the default. 318*7c478bd9Sstevel@tonic-gate 319*7c478bd9Sstevel@tonic-gate A bug in the shell script "makeoptions" which searched for a 320*7c478bd9Sstevel@tonic-gate string that appeared earlier in a comment has been fixed. 321*7c478bd9Sstevel@tonic-gate 322*7c478bd9Sstevel@tonic-gate A bug that caused an infinite loop when you did ":s/\</&/g" 323*7c478bd9Sstevel@tonic-gate has been fixed. 324*7c478bd9Sstevel@tonic-gate 325*7c478bd9Sstevel@tonic-gate A bug that caused & with no previous substitution to give 326*7c478bd9Sstevel@tonic-gate "re internal error" has been fixed. 327*7c478bd9Sstevel@tonic-gate 328*7c478bd9Sstevel@tonic-gate A bug in the binary search algorithm for tags which sometimes 329*7c478bd9Sstevel@tonic-gate prevented the last tag in the file from being found has been fixed. 330*7c478bd9Sstevel@tonic-gate 331*7c478bd9Sstevel@tonic-gate Error messages from expreserve no longer output a linefeed, 332*7c478bd9Sstevel@tonic-gate messing up the screen. 333*7c478bd9Sstevel@tonic-gate 334*7c478bd9Sstevel@tonic-gate The message from expreserve telling you a buffer was saved when 335*7c478bd9Sstevel@tonic-gate your phone was hung up has be amended to say the editor was 336*7c478bd9Sstevel@tonic-gate terminated, since a kill can also produce that message. 337*7c478bd9Sstevel@tonic-gate 338*7c478bd9Sstevel@tonic-gate The "directory" option, which has been broken for over 339*7c478bd9Sstevel@tonic-gate a year, has been fixed. 340*7c478bd9Sstevel@tonic-gate 341*7c478bd9Sstevel@tonic-gate The "r" command no longer invokes input mode macros. 342*7c478bd9Sstevel@tonic-gate 343*7c478bd9Sstevel@tonic-gate A bug which caused strangeness if you set wrapmargin to 1 344*7c478bd9Sstevel@tonic-gate and typed a line containing a backslash in column 80 has 345*7c478bd9Sstevel@tonic-gate been fixed. 346*7c478bd9Sstevel@tonic-gate 347*7c478bd9Sstevel@tonic-gate A bug which caused the "r<cr>" at the wrapmargin column 348*7c478bd9Sstevel@tonic-gate to mess up has been fixed. 349*7c478bd9Sstevel@tonic-gate 350*7c478bd9Sstevel@tonic-gate On terminals with both scroll reverse and insert line, 351*7c478bd9Sstevel@tonic-gate the least expensive of the two will be used to scroll up. 352*7c478bd9Sstevel@tonic-gate This is usually scroll reverse, which is much less annoying 353*7c478bd9Sstevel@tonic-gate than insert line on terminals such as the mime I and mime 2a. 354*7c478bd9Sstevel@tonic-gate 355*7c478bd9Sstevel@tonic-gate A bug which caused vi to estimate the cost of cursor motion 356*7c478bd9Sstevel@tonic-gate without taking into account padding has been fixed. 357*7c478bd9Sstevel@tonic-gate 358*7c478bd9Sstevel@tonic-gate The failure of the editor to check counts on ^F and ^B commands 359*7c478bd9Sstevel@tonic-gate has been fixed. 360*7c478bd9Sstevel@tonic-gate 361*7c478bd9Sstevel@tonic-gate The "remap" option failed completely if it was turned off. 362*7c478bd9Sstevel@tonic-gate This has been fixed. 363*7c478bd9Sstevel@tonic-gate 364*7c478bd9Sstevel@tonic-gate A check of the wrong limit on a buffer for the right hand side 365*7c478bd9Sstevel@tonic-gate of substitutions has been fixed. Overflowing this buffer could 366*7c478bd9Sstevel@tonic-gate produce a core dump. 367*7c478bd9Sstevel@tonic-gate 368*7c478bd9Sstevel@tonic-gate A bug causing the editor to go into insert mode if you typed 369*7c478bd9Sstevel@tonic-gate return during an R command has been fixed. 370*7c478bd9Sstevel@tonic-gate 371*7c478bd9Sstevel@tonic-gate A bug preventing the + command from working when you edit a 372*7c478bd9Sstevel@tonic-gate new file has been fixed by making it no longer an error to 373*7c478bd9Sstevel@tonic-gate edit a new file (when you first enter the editor.) Instead 374*7c478bd9Sstevel@tonic-gate you are told it is a new file. 375*7c478bd9Sstevel@tonic-gate 376*7c478bd9Sstevel@tonic-gate If an error happens when you are writing out a file, such as 377*7c478bd9Sstevel@tonic-gate an interrupt, you are warned that the file is incomplete. 378*7c478bd9Sstevel@tonic-gate 379*7c478bd9Sstevel@tonic-gateVersion 3.5 -- August 20, 1980 380*7c478bd9Sstevel@tonic-gate 381*7c478bd9Sstevel@tonic-gate The provisions for changing the window size with a numeric 382*7c478bd9Sstevel@tonic-gate prefix argument to certain visual commands have been deleted. 383*7c478bd9Sstevel@tonic-gate The correct way to change the window size is to use the z 384*7c478bd9Sstevel@tonic-gate command, for example z5<cr> to change the window to 5 lines. 385*7c478bd9Sstevel@tonic-gate 386*7c478bd9Sstevel@tonic-gate The code to handle the -x (encryption) option has been made 387*7c478bd9Sstevel@tonic-gate conditionally compiled, so that ex can run on an an 11/34 (!) 388*7c478bd9Sstevel@tonic-gate with overlays. Since this code calls getpass, stdio was 389*7c478bd9Sstevel@tonic-gate being pulled in even without VMUNIX being defined. The 390*7c478bd9Sstevel@tonic-gate savings from not defining CRYPT are about 4K of text and 4.5K 391*7c478bd9Sstevel@tonic-gate of bss. 392*7c478bd9Sstevel@tonic-gate 393*7c478bd9Sstevel@tonic-gate Bill Joy put in a buffering scheme under the VMUNIX flag so 394*7c478bd9Sstevel@tonic-gate that up to 64K of file is edited in-core until you make enough 395*7c478bd9Sstevel@tonic-gate changes to force a temp file sync. This makes entry into the 396*7c478bd9Sstevel@tonic-gate editor much faster, but also makes vi much bigger. 397*7c478bd9Sstevel@tonic-gate 398*7c478bd9Sstevel@tonic-gate The source to ex is now sccs'ed. 399*7c478bd9Sstevel@tonic-gate 400*7c478bd9Sstevel@tonic-gate An undocumented "feature" which caused the ^^ command to return 401*7c478bd9Sstevel@tonic-gate to the previous tag, if in the current file, instead of the 402*7c478bd9Sstevel@tonic-gate previous file, has been removed. 403*7c478bd9Sstevel@tonic-gate 404*7c478bd9Sstevel@tonic-gate A bug which prevented ex from compiling on systems with the new 405*7c478bd9Sstevel@tonic-gate tty driver but no process control (such as Cory) was fixed. 406*7c478bd9Sstevel@tonic-gate 407*7c478bd9Sstevel@tonic-gateVersion 3.4 -- June 24, 1980 408*7c478bd9Sstevel@tonic-gate 409*7c478bd9Sstevel@tonic-gate The visual page motion commands ^F and ^B now treat any preceding 410*7c478bd9Sstevel@tonic-gate counts as number of pages to move, instead of changes to the 411*7c478bd9Sstevel@tonic-gate window size. That is, 2^F moves forward 2 pages. 412*7c478bd9Sstevel@tonic-gate 413*7c478bd9Sstevel@tonic-gate A :vi <file> command from visual mode is now treated the same 414*7c478bd9Sstevel@tonic-gate as a :edit <file> or :ex <file> command. The meaning of the 415*7c478bd9Sstevel@tonic-gate vi command from ex command mode is not affected. 416*7c478bd9Sstevel@tonic-gate 417*7c478bd9Sstevel@tonic-gate Provisions to handle the new process stopping features of the 418*7c478bd9Sstevel@tonic-gate Berkeley TTY driver have been added. A new command, "stop", 419*7c478bd9Sstevel@tonic-gate takes you out of the editor cleanly and efficiently, returning 420*7c478bd9Sstevel@tonic-gate you to the shell. Resuming the editor puts you back in command 421*7c478bd9Sstevel@tonic-gate or visual mode, as appropriate. If autowrite is set and there 422*7c478bd9Sstevel@tonic-gate are outstanding changes, a write is done first unless you say 423*7c478bd9Sstevel@tonic-gate "stop!". From visual mode, the command ^Z is the same as :stop. 424*7c478bd9Sstevel@tonic-gate Note that if you have an arrow key that sends ^Z the stop function 425*7c478bd9Sstevel@tonic-gate will take priority over the arrow function. If you have your 426*7c478bd9Sstevel@tonic-gate "susp" character set to something besides ^Z, that key will be 427*7c478bd9Sstevel@tonic-gate honored as well. 428*7c478bd9Sstevel@tonic-gate 429*7c478bd9Sstevel@tonic-gate A read only mode now lets you guarantee you won't clobber your 430*7c478bd9Sstevel@tonic-gate file by accident. You can set the on/off option "readonly" (ro) 431*7c478bd9Sstevel@tonic-gate and writes will fail unless you use an ! after the write. 432*7c478bd9Sstevel@tonic-gate Commands such as x, ZZ, and autowrite, and in general anything 433*7c478bd9Sstevel@tonic-gate that writes is affected. This option is turned on if you invoke 434*7c478bd9Sstevel@tonic-gate ex with the -R flag. A new link called "view" has been created. 435*7c478bd9Sstevel@tonic-gate View is just like vi but it sets readonly. 436*7c478bd9Sstevel@tonic-gate 437*7c478bd9Sstevel@tonic-gate The encryption code from the v7 editor is now part of ex. 438*7c478bd9Sstevel@tonic-gate You invoke ex with the -x option and it will ask for a key, 439*7c478bd9Sstevel@tonic-gate as ed. The ed "x" command (to enter encryption mode from 440*7c478bd9Sstevel@tonic-gate within the editor) is not available. 441*7c478bd9Sstevel@tonic-gate 442*7c478bd9Sstevel@tonic-gate The editor now adopts the convention that a null string in the 443*7c478bd9Sstevel@tonic-gate environment is the same as not being set. This applies to 444*7c478bd9Sstevel@tonic-gate TERM, TERMCAP, and EXINIT. 445*7c478bd9Sstevel@tonic-gate 446*7c478bd9Sstevel@tonic-gate A word abbreviation mode is now available. You can define 447*7c478bd9Sstevel@tonic-gate abbreviations with the abbreviate command 448*7c478bd9Sstevel@tonic-gate :abbr foo find outer otter 449*7c478bd9Sstevel@tonic-gate which maps "foo" to "find outer otter". Abbreviations can be 450*7c478bd9Sstevel@tonic-gate turned off with the "unabbreviate" command. The syntax of these 451*7c478bd9Sstevel@tonic-gate commands is identical to the map and unmap commands, except 452*7c478bd9Sstevel@tonic-gate that the ! forms do not exist. Abbreviations are considered 453*7c478bd9Sstevel@tonic-gate when in visual input mode only, and only affect whole words 454*7c478bd9Sstevel@tonic-gate typed in, using the conservative definition. (Thus "foobar" 455*7c478bd9Sstevel@tonic-gate will not be mapped as it would using map!) 456*7c478bd9Sstevel@tonic-gate Abbreviate and unabbreviate can be abbreviated to "ab" and 457*7c478bd9Sstevel@tonic-gate "una", respectively. 458*7c478bd9Sstevel@tonic-gate 459*7c478bd9Sstevel@tonic-gate The editor now supports certain terminals that use strings other 460*7c478bd9Sstevel@tonic-gate then \r and \n for return and linefeed by implementing the cr 461*7c478bd9Sstevel@tonic-gate and nl termcap options. (Thanks to UCLA for these enhancements). 462*7c478bd9Sstevel@tonic-gate 463*7c478bd9Sstevel@tonic-gate The termcap attribute ns is now checked for, and ex refuses to 464*7c478bd9Sstevel@tonic-gate go into visual mode on such a terminal unless it has sf. 465*7c478bd9Sstevel@tonic-gate 466*7c478bd9Sstevel@tonic-gate Terminals that can cursor address but cannot go up a line 467*7c478bd9Sstevel@tonic-gate now work in visual. 468*7c478bd9Sstevel@tonic-gate 469*7c478bd9Sstevel@tonic-gate If you change your start and stop characters to something other 470*7c478bd9Sstevel@tonic-gate than the default ^S and ^Q, vi now turns them off. This causes 471*7c478bd9Sstevel@tonic-gate people who change them to escape not to lose so badly. 472*7c478bd9Sstevel@tonic-gate The quit character is once again turned off so that datamedias 473*7c478bd9Sstevel@tonic-gate which send ^\ for the right arrow key work. 474*7c478bd9Sstevel@tonic-gate 475*7c478bd9Sstevel@tonic-gate The ~ command now repeats correctly with ".". 476*7c478bd9Sstevel@tonic-gate 477*7c478bd9Sstevel@tonic-gate If you type in an unmatched ) or } in showmatch mode, the editor 478*7c478bd9Sstevel@tonic-gate will now beep to warn you about your mistake. The ) or } is 479*7c478bd9Sstevel@tonic-gate still accepted. 480*7c478bd9Sstevel@tonic-gate 481*7c478bd9Sstevel@tonic-gate The way macros are undone has been improved considerably. 482*7c478bd9Sstevel@tonic-gate The number of changes inside the macro is counted, and just 483*7c478bd9Sstevel@tonic-gate before the second change the state before the macro is recreated 484*7c478bd9Sstevel@tonic-gate internally and saved to allow the macro to be undoable as a unit. 485*7c478bd9Sstevel@tonic-gate Hence, if the macro makes only one change the particular change is 486*7c478bd9Sstevel@tonic-gate undone (which will probably not redraw the screen). If no changes 487*7c478bd9Sstevel@tonic-gate are made (for example, the arrow keys) the previous thing that could 488*7c478bd9Sstevel@tonic-gate be undone is not clobbered. 489*7c478bd9Sstevel@tonic-gate 490*7c478bd9Sstevel@tonic-gate The undomacro option has been deleted since it is no longer needed. 491*7c478bd9Sstevel@tonic-gate 492*7c478bd9Sstevel@tonic-gate Editor scripts can now contain comments. Begin the comments with " 493*7c478bd9Sstevel@tonic-gate (double quote). Comments can be on their own line or come at the 494*7c478bd9Sstevel@tonic-gate end of command lines. The comment continues to the end of the line. 495*7c478bd9Sstevel@tonic-gate 496*7c478bd9Sstevel@tonic-gate The 3rd version of the USG tty driver is now supported, making it 497*7c478bd9Sstevel@tonic-gate possible on USG systems to interrupt redrawing the screen and to 498*7c478bd9Sstevel@tonic-gate not flush output when interruptible commands take place. 499*7c478bd9Sstevel@tonic-gate 500*7c478bd9Sstevel@tonic-gate The rewind command has been added to the list of commands that 501*7c478bd9Sstevel@tonic-gate the autowrite option knows about. 502*7c478bd9Sstevel@tonic-gate 503*7c478bd9Sstevel@tonic-gate The wrapmargin option is now usable. The way it works has been 504*7c478bd9Sstevel@tonic-gate completely revamped. Now if you go past the margin (even in the 505*7c478bd9Sstevel@tonic-gate middle of a word) the entire word is erased and rewritten on the 506*7c478bd9Sstevel@tonic-gate next line. This changes the semantics of the number given to 507*7c478bd9Sstevel@tonic-gate wrapmargin. 0 still means off. Any other number is still a 508*7c478bd9Sstevel@tonic-gate distance from the right edge of the screen, but this location 509*7c478bd9Sstevel@tonic-gate is now the right edge of the area where wraps can take place, 510*7c478bd9Sstevel@tonic-gate instead of the left edge. Wrapmargin now behaves much like 511*7c478bd9Sstevel@tonic-gate fill/nojustify mode in nroff. 512*7c478bd9Sstevel@tonic-gate 513*7c478bd9Sstevel@tonic-gate A bug on the USG system where hanging up the phone causes more 514*7c478bd9Sstevel@tonic-gate than one SIGHUP to be sent has been compensated for. 515*7c478bd9Sstevel@tonic-gate 516*7c478bd9Sstevel@tonic-gate A bug which caused the :sh command not to send the vs and ti 517*7c478bd9Sstevel@tonic-gate sequences when you returned has been fixed. 518*7c478bd9Sstevel@tonic-gate 519*7c478bd9Sstevel@tonic-gate A bug which caused a file that bombed out in the middle of 520*7c478bd9Sstevel@tonic-gate an edit command to be considered modified has been fixed. 521*7c478bd9Sstevel@tonic-gate 522*7c478bd9Sstevel@tonic-gate A bug which caused the screen to be wrong after undoing a 523*7c478bd9Sstevel@tonic-gate :move command has been fixed. 524*7c478bd9Sstevel@tonic-gate 525*7c478bd9Sstevel@tonic-gate A bug which messed up the buffer and the screen after 526*7c478bd9Sstevel@tonic-gate undoing a :join command has been fixed. 527*7c478bd9Sstevel@tonic-gate 528*7c478bd9Sstevel@tonic-gate The source file ex_io.c has been split into ex_io.c and 529*7c478bd9Sstevel@tonic-gate ex_unix.c to avoid a problem where many C compilers overflowed 530*7c478bd9Sstevel@tonic-gate the symbol table. 531*7c478bd9Sstevel@tonic-gate 532*7c478bd9Sstevel@tonic-gate A bug which prevented turning off your prompt in your .exrc 533*7c478bd9Sstevel@tonic-gate has been fixed. 534*7c478bd9Sstevel@tonic-gate 535*7c478bd9Sstevel@tonic-gate Some of the code internal to the editor has been rearranged 536*7c478bd9Sstevel@tonic-gate and some comments added. 537*7c478bd9Sstevel@tonic-gate 538*7c478bd9Sstevel@tonic-gate The bug fix to the USG tty driver to output a null character 539*7c478bd9Sstevel@tonic-gate as padding at 1200 baud has been improved to output a DEL 540*7c478bd9Sstevel@tonic-gate at 1200 baud or above. 541*7c478bd9Sstevel@tonic-gate 542*7c478bd9Sstevel@tonic-gate Terminals with small screens (less than 20 columns or less 543*7c478bd9Sstevel@tonic-gate than 5 lines) should now work. 544*7c478bd9Sstevel@tonic-gate 545*7c478bd9Sstevel@tonic-gate A bug which prevented you from entering the character DEL 546*7c478bd9Sstevel@tonic-gate into the buffer if you changed your interrupt character to 547*7c478bd9Sstevel@tonic-gate something else besides DEL has been fixed. 548*7c478bd9Sstevel@tonic-gate 549*7c478bd9Sstevel@tonic-gate A bug which caused the current line to be clobbered when 550*7c478bd9Sstevel@tonic-gate you did a /, ?, or : command which mapped an input macro 551*7c478bd9Sstevel@tonic-gate successfully has been fixed. 552*7c478bd9Sstevel@tonic-gate 553*7c478bd9Sstevel@tonic-gate If you map o to O and O to o and have remap set, the editor 554*7c478bd9Sstevel@tonic-gate now catches the infinite loop. 555*7c478bd9Sstevel@tonic-gate 556*7c478bd9Sstevel@tonic-gate A put command after a macro now beeps instead of putting 557*7c478bd9Sstevel@tonic-gate a copy of the whole buffer. (Note that the arrow keys 558*7c478bd9Sstevel@tonic-gate on terminals are considered macros.) 559*7c478bd9Sstevel@tonic-gate 560*7c478bd9Sstevel@tonic-gate A bug which caused things like d) and d} to miss the last 561*7c478bd9Sstevel@tonic-gate character when they should have deleted to the end of the 562*7c478bd9Sstevel@tonic-gate buffer has been fixed. 563*7c478bd9Sstevel@tonic-gate 564*7c478bd9Sstevel@tonic-gate A bug which caused the last character to be lost when you 565*7c478bd9Sstevel@tonic-gate read in a file with no newline at the end of the last line 566*7c478bd9Sstevel@tonic-gate has been fixed. 567*7c478bd9Sstevel@tonic-gate 568*7c478bd9Sstevel@tonic-gate A bug that caused garbage to be in the buffer if the temp file 569*7c478bd9Sstevel@tonic-gate overflowed has been fixed. (This only affected non-VMUNIX systems 570*7c478bd9Sstevel@tonic-gate since the temp file cannot overflow on VMUNIX.) 571*7c478bd9Sstevel@tonic-gate 572*7c478bd9Sstevel@tonic-gate When a macro or global is undone, you no longer get picked up and 573*7c478bd9Sstevel@tonic-gate dropped on line 1. 574*7c478bd9Sstevel@tonic-gate 575*7c478bd9Sstevel@tonic-gate The character | can now be escaped with \| in file names. 576*7c478bd9Sstevel@tonic-gate 577*7c478bd9Sstevel@tonic-gate A bug which prevented the confirm option to a substitution that 578*7c478bd9Sstevel@tonic-gate was inside a source command has been fixed. 579*7c478bd9Sstevel@tonic-gate 580*7c478bd9Sstevel@tonic-gate A bug which caused the editor to not work if the tab stop size 581*7c478bd9Sstevel@tonic-gate did not divide the screen width has been fixed. 582*7c478bd9Sstevel@tonic-gate 583*7c478bd9Sstevel@tonic-gate A bug on HP terminals that caused the screen to be messed up if 584*7c478bd9Sstevel@tonic-gate you scrolled up something that began the same way as the echo line 585*7c478bd9Sstevel@tonic-gate has been fixed. 586*7c478bd9Sstevel@tonic-gate 587*7c478bd9Sstevel@tonic-gate A macro bug which sometimes caused the next character after an 588*7c478bd9Sstevel@tonic-gate escape to be ignored on an HP terminal has been fixed. 589*7c478bd9Sstevel@tonic-gate 590*7c478bd9Sstevel@tonic-gate A bug which caused unmap of strings with length 2 to fail has been 591*7c478bd9Sstevel@tonic-gate fixed. 592*7c478bd9Sstevel@tonic-gate 593*7c478bd9Sstevel@tonic-gate A bug which left vi confused if you invoked a macro containing a 594*7c478bd9Sstevel@tonic-gate quit to command mode and then did an undo has been fixed. 595*7c478bd9Sstevel@tonic-gate 596*7c478bd9Sstevel@tonic-gate An old ed bug which caused globals to fail when they did a substitute 597*7c478bd9Sstevel@tonic-gate on the next line has been fixed. 598*7c478bd9Sstevel@tonic-gate 599*7c478bd9Sstevel@tonic-gate The % operator will now find matching square brackets the same way 600*7c478bd9Sstevel@tonic-gate it does parentheses and braces. It will not display them in 601*7c478bd9Sstevel@tonic-gate showmatch mode, however, and will not use a ] to match all ('s. 602*7c478bd9Sstevel@tonic-gate 603*7c478bd9Sstevel@tonic-gate Code has been added to handle the Beehive Superbee terminal, 604*7c478bd9Sstevel@tonic-gate using f1 for escape and f2 for control C. 605*7c478bd9Sstevel@tonic-gate 606*7c478bd9Sstevel@tonic-gate The default value of the option shell is now taken from the 607*7c478bd9Sstevel@tonic-gate environment variable SHELL, if present. 608*7c478bd9Sstevel@tonic-gate 609*7c478bd9Sstevel@tonic-gateVersion 3.3 -- February 2, 1980 610*7c478bd9Sstevel@tonic-gate 611*7c478bd9Sstevel@tonic-gate The default window sizes have been changed. At 300 baud the 612*7c478bd9Sstevel@tonic-gate window is now 8 lines (was 1/2 the screen size). At 1200 baud 613*7c478bd9Sstevel@tonic-gate the window is now 16 lines (was 2/3 the screen size, which was 614*7c478bd9Sstevel@tonic-gate usually also 16 for a typical 24 line CRT). At 9600 baud the 615*7c478bd9Sstevel@tonic-gate window is still the full screen size. Any baud rate less than 616*7c478bd9Sstevel@tonic-gate 1200 behaves like 300, any over 1200 like 9600. 617*7c478bd9Sstevel@tonic-gate 618*7c478bd9Sstevel@tonic-gate A new command mode command "x" (for "xit") has been added. This 619*7c478bd9Sstevel@tonic-gate is the same as wq but will not bother to write if there have been 620*7c478bd9Sstevel@tonic-gate no changes to the file. The command letter was chosen for 621*7c478bd9Sstevel@tonic-gate convenience and compatibility with hed. 622*7c478bd9Sstevel@tonic-gate 623*7c478bd9Sstevel@tonic-gate The command "ZZ" from vi is the same as ":x<cr>". This is 624*7c478bd9Sstevel@tonic-gate the recommended way to leave the editor. Z must be typed twice 625*7c478bd9Sstevel@tonic-gate since this is two easy to type by accident and has such severe 626*7c478bd9Sstevel@tonic-gate effects if unintentional. 627*7c478bd9Sstevel@tonic-gate 628*7c478bd9Sstevel@tonic-gate The options w300, w1200, and w9600 can be set. They are synonyms 629*7c478bd9Sstevel@tonic-gate for "window", but only apply at 300, 1200, or 9600 baud, resp. 630*7c478bd9Sstevel@tonic-gate Thus you can specify you want a 12 line window at 300 baud and 631*7c478bd9Sstevel@tonic-gate a 23 line window at 1200 baud with 632*7c478bd9Sstevel@tonic-gate :set w300=12 w1200=23 633*7c478bd9Sstevel@tonic-gate 634*7c478bd9Sstevel@tonic-gate It is now possible to say 635*7c478bd9Sstevel@tonic-gate :set window=5 636*7c478bd9Sstevel@tonic-gate and get the effect the next time the screen is redrawn from scratch. 637*7c478bd9Sstevel@tonic-gate (^L and Hit return to continue don't start from scratch.) 638*7c478bd9Sstevel@tonic-gate This is sort of pointless, since both 639*7c478bd9Sstevel@tonic-gate 5:<cr> 640*7c478bd9Sstevel@tonic-gate and 641*7c478bd9Sstevel@tonic-gate z5<cr> 642*7c478bd9Sstevel@tonic-gate do the same thing with better results. 643*7c478bd9Sstevel@tonic-gate 644*7c478bd9Sstevel@tonic-gate The editor no longer uses nondestructive space, except when in 645*7c478bd9Sstevel@tonic-gate insert mode. It instead prints the character it would be 646*7c478bd9Sstevel@tonic-gate moving over. This is a real win on terminals that use an 647*7c478bd9Sstevel@tonic-gate escape sequence to nd space. 648*7c478bd9Sstevel@tonic-gate 649*7c478bd9Sstevel@tonic-gate It is now possible from visual to string several search expressions 650*7c478bd9Sstevel@tonic-gate together separated by semicolons the same as command mode. For 651*7c478bd9Sstevel@tonic-gate example, you can say 652*7c478bd9Sstevel@tonic-gate /foo/;/bar 653*7c478bd9Sstevel@tonic-gate from visual and it will move to the first "bar" after the next "foo". 654*7c478bd9Sstevel@tonic-gate This also works within one line. 655*7c478bd9Sstevel@tonic-gate 656*7c478bd9Sstevel@tonic-gate The option "mapinput" is dead. It has been replaced by a much 657*7c478bd9Sstevel@tonic-gate more powerful mechanism: :map! (e.g. put an ! after the map). 658*7c478bd9Sstevel@tonic-gate Map and unmap commands with ! apply only to input, others apply 659*7c478bd9Sstevel@tonic-gate only to command mode. 660*7c478bd9Sstevel@tonic-gate 661*7c478bd9Sstevel@tonic-gate The new option "timeout" (default on) causes macros to time out 662*7c478bd9Sstevel@tonic-gate after one second. Turn it off and they will wait forever. 663*7c478bd9Sstevel@tonic-gate 664*7c478bd9Sstevel@tonic-gate By using map! and setting notimeout, it is possible to get the 665*7c478bd9Sstevel@tonic-gate effect of emacs abbreviation mode. Sanity checking is turned off 666*7c478bd9Sstevel@tonic-gate for map when ! is present. This is a crude facility and does not 667*7c478bd9Sstevel@tonic-gate take into account things like the abbreviation being part of a longer 668*7c478bd9Sstevel@tonic-gate word. It also does not echo until it is satisfied. 669*7c478bd9Sstevel@tonic-gate 670*7c478bd9Sstevel@tonic-gate The new option "remap" (default on) causes the editor to attempt 671*7c478bd9Sstevel@tonic-gate to map the result of a macro mapping again until the mapping fails. 672*7c478bd9Sstevel@tonic-gate This makes it possible, say, to map q to # and #1 to something else 673*7c478bd9Sstevel@tonic-gate and get q1 mapped to something else. Turning it off makes it possible 674*7c478bd9Sstevel@tonic-gate to map ^L to l and map ^R to ^L without having ^R map to l. 675*7c478bd9Sstevel@tonic-gate 676*7c478bd9Sstevel@tonic-gate The new option "undomacro" (default on) makes it possible to undo 677*7c478bd9Sstevel@tonic-gate macros as a unit. Leaving it off causes macros not to be treated 678*7c478bd9Sstevel@tonic-gate specially. Macros with zero or one change work better with noum, 679*7c478bd9Sstevel@tonic-gate with two or more changes better with um. This option may go away 680*7c478bd9Sstevel@tonic-gate if it becomes unnecessary. 681*7c478bd9Sstevel@tonic-gate 682*7c478bd9Sstevel@tonic-gate The new (string) valued option "tags" allows you to specify a list 683*7c478bd9Sstevel@tonic-gate of tag files, similar to the "path" variable of csh. The files 684*7c478bd9Sstevel@tonic-gate are separated by spaces (which are entered preceded by a backslash) 685*7c478bd9Sstevel@tonic-gate and are searched left to right. The default value is 686*7c478bd9Sstevel@tonic-gate "tags /usr/lib/tags", which has the same effect as before. 687*7c478bd9Sstevel@tonic-gate It is recommended that "tags" always be the first entry. 688*7c478bd9Sstevel@tonic-gate On Ernie, /usr/lib/tags contains entries for the system defined 689*7c478bd9Sstevel@tonic-gate library procedures from section 3 of the manual. 690*7c478bd9Sstevel@tonic-gate 691*7c478bd9Sstevel@tonic-gate ^R is now the same as ^L on terminals where the right arrow key 692*7c478bd9Sstevel@tonic-gate sends ^L (The tvi and the adm 31). 693*7c478bd9Sstevel@tonic-gate 694*7c478bd9Sstevel@tonic-gate Looking for a tag now uses binary search. 695*7c478bd9Sstevel@tonic-gate 696*7c478bd9Sstevel@tonic-gate The "q" command from visual no longer works at all. You must 697*7c478bd9Sstevel@tonic-gate use "Q" to get to ex command mode. 698*7c478bd9Sstevel@tonic-gate 699*7c478bd9Sstevel@tonic-gate A minor incompatibility with the v7 ed has been fixed. Previously, 700*7c478bd9Sstevel@tonic-gate to do a global substitute with an escaped newline in the rhs, you 701*7c478bd9Sstevel@tonic-gate had to put two \'s in ex and one in ed. Ex now accepts the single 702*7c478bd9Sstevel@tonic-gate form as well as the double form. For example, instead of 703*7c478bd9Sstevel@tonic-gate g/foo/s//foo\\ 704*7c478bd9Sstevel@tonic-gate bar/g 705*7c478bd9Sstevel@tonic-gate (which still works), you can now type, as in ed, 706*7c478bd9Sstevel@tonic-gate g/foo/s//foo\ 707*7c478bd9Sstevel@tonic-gate bar/g 708*7c478bd9Sstevel@tonic-gate This means that the following ex command, which used to "work": 709*7c478bd9Sstevel@tonic-gate g/foo/s//foo bar\ 710*7c478bd9Sstevel@tonic-gate .+1,/mumble/d 711*7c478bd9Sstevel@tonic-gate won't work anymore unless you put the trailing / on the substitution. 712*7c478bd9Sstevel@tonic-gate This usage is pretty obscure anyway. 713*7c478bd9Sstevel@tonic-gate 714*7c478bd9Sstevel@tonic-gate Several bugs relating to undoing macros have been fixed. 715*7c478bd9Sstevel@tonic-gate 716*7c478bd9Sstevel@tonic-gate A bug which caused the command "g/pattern" to print an error 717*7c478bd9Sstevel@tonic-gate message if "pattern" occurred on the last line has been fixed. 718*7c478bd9Sstevel@tonic-gate 719*7c478bd9Sstevel@tonic-gate If you reply ":" to "Hit return to continue", you will again be 720*7c478bd9Sstevel@tonic-gate asked "Hit return to continue" after the next command finishes. 721*7c478bd9Sstevel@tonic-gate 722*7c478bd9Sstevel@tonic-gate The maximum length of a string valued option has been raised from 723*7c478bd9Sstevel@tonic-gate 32 to 64, for the benefit of the "tags" option. 724*7c478bd9Sstevel@tonic-gate 725*7c478bd9Sstevel@tonic-gate It is now possible to search for an escape or delete using f, F, t, 726*7c478bd9Sstevel@tonic-gate T, ;, and ,. These characters must be quoted with ^V. 727*7c478bd9Sstevel@tonic-gate 728*7c478bd9Sstevel@tonic-gate The option "ttytype" is now in correct alphabetical order. 729*7c478bd9Sstevel@tonic-gate 730*7c478bd9Sstevel@tonic-gate A bug that caused HP terminals to mess up in insert mode when inserting 731*7c478bd9Sstevel@tonic-gate before a tab which follows 7 or fewer characters at the beginning of a 732*7c478bd9Sstevel@tonic-gate line (such as a tags file) has been fixed. 733*7c478bd9Sstevel@tonic-gate 734*7c478bd9Sstevel@tonic-gate It is now possible to include control D in your EXINIT or .exrc. 735*7c478bd9Sstevel@tonic-gate 736*7c478bd9Sstevel@tonic-gate A bug which caused the screen to mess up when a glob (such as xx*) 737*7c478bd9Sstevel@tonic-gate doesn't match anything has been fixed. 738*7c478bd9Sstevel@tonic-gate 739*7c478bd9Sstevel@tonic-gate The editor now checks for extra junk after a /r.e./ from visual 740*7c478bd9Sstevel@tonic-gate (other than the allowed z command) and beeps if any is found. 741*7c478bd9Sstevel@tonic-gate Previously it was just ignored. 742*7c478bd9Sstevel@tonic-gate 743*7c478bd9Sstevel@tonic-gate A bug that caused j and k (up and down) to behave strangely after 744*7c478bd9Sstevel@tonic-gate an insertion has been fixed. 745*7c478bd9Sstevel@tonic-gate 746*7c478bd9Sstevel@tonic-gate A bug which causes term to be displayed incorrectly and which 747*7c478bd9Sstevel@tonic-gate caused a crash when changing terminal type when there happened 748*7c478bd9Sstevel@tonic-gate to be several |'s and a long string in genbuf has been fixed. 749*7c478bd9Sstevel@tonic-gate This bug was introduced in ex 2.9. 750*7c478bd9Sstevel@tonic-gate 751*7c478bd9Sstevel@tonic-gate The patch for echo lines longer than 80 characters has been 752*7c478bd9Sstevel@tonic-gate repaired to do "Hit return to continue" after such lines and 753*7c478bd9Sstevel@tonic-gate print the entire output. 754*7c478bd9Sstevel@tonic-gate 755*7c478bd9Sstevel@tonic-gate A bug that caused a messed up screen after a :sh command from 756*7c478bd9Sstevel@tonic-gate open mode has been fixed. 757*7c478bd9Sstevel@tonic-gate 758*7c478bd9Sstevel@tonic-gate A bug which caused a tag request for a nonexistent tag to leave 759*7c478bd9Sstevel@tonic-gate the editor in nomagic mode has been fixed. 760*7c478bd9Sstevel@tonic-gate 761*7c478bd9Sstevel@tonic-gate A bug which caused strange behavior if there is no default file 762*7c478bd9Sstevel@tonic-gate name when an autowrite save is attempted has been fixed. 763*7c478bd9Sstevel@tonic-gate 764*7c478bd9Sstevel@tonic-gate A bug which caused the cursor to go to the wrong position when 765*7c478bd9Sstevel@tonic-gate ^^D or 0^D is entered from column 2 in autoindent mode on terminals 766*7c478bd9Sstevel@tonic-gate that can backspace has been fixed. 767*7c478bd9Sstevel@tonic-gate 768*7c478bd9Sstevel@tonic-gateVersion 3.2 -- January 4, 1980 769*7c478bd9Sstevel@tonic-gate 770*7c478bd9Sstevel@tonic-gate A bug that caused nomagic to be set if an error happened within 771*7c478bd9Sstevel@tonic-gate a tag command has been fixed. 772*7c478bd9Sstevel@tonic-gate 773*7c478bd9Sstevel@tonic-gate A bug that caused put commands to beep after a macro containing 774*7c478bd9Sstevel@tonic-gate an error has been fixed. 775*7c478bd9Sstevel@tonic-gate 776*7c478bd9Sstevel@tonic-gate The mapinput option has been placed in alphabetical order. 777*7c478bd9Sstevel@tonic-gate 778*7c478bd9Sstevel@tonic-gate A bug that caused undo to undo more than one macro invocation 779*7c478bd9Sstevel@tonic-gate on the same line has been fixed. 780*7c478bd9Sstevel@tonic-gate 781*7c478bd9Sstevel@tonic-gate On non VM/UNIX systems, the screen size has been increased to 782*7c478bd9Sstevel@tonic-gate allow a 40 X 80 Ann Arbor to be used. 783*7c478bd9Sstevel@tonic-gate 784*7c478bd9Sstevel@tonic-gateVersion 3.2 -- December 28, 1980 785*7c478bd9Sstevel@tonic-gate 786*7c478bd9Sstevel@tonic-gate Several limits have been increased for VM/UNIX. Longer lines, 787*7c478bd9Sstevel@tonic-gate more characters of file names, longer regular expressions, etc. 788*7c478bd9Sstevel@tonic-gate Huge files can now be edited directly. Larger terminals (up to 789*7c478bd9Sstevel@tonic-gate 66 lines) can be used. 790*7c478bd9Sstevel@tonic-gate 791*7c478bd9Sstevel@tonic-gate An internal change has been made for VM/UNIX that causes error 792*7c478bd9Sstevel@tonic-gate messages to be stored directly instead of in a disk file. 793*7c478bd9Sstevel@tonic-gate This should cause faster response to errors. 794*7c478bd9Sstevel@tonic-gate 795*7c478bd9Sstevel@tonic-gateVersion 3.1.1 -- December 13, 1979 796*7c478bd9Sstevel@tonic-gate 797*7c478bd9Sstevel@tonic-gate A bug that caused nested macros not to be undoable has been fixed. 798*7c478bd9Sstevel@tonic-gate 799*7c478bd9Sstevel@tonic-gate A bug that caused pounding on the escape key on terminals with 800*7c478bd9Sstevel@tonic-gate arrow keys that send escape sequences to cause undo to mess up 801*7c478bd9Sstevel@tonic-gate has been fixed. 802*7c478bd9Sstevel@tonic-gate 803*7c478bd9Sstevel@tonic-gate It is now acknowledged that macros cannot contain the put command. 804*7c478bd9Sstevel@tonic-gate This is due to the implementation of put - previously a put inside 805*7c478bd9Sstevel@tonic-gate a macro dumped a copy of the buffer instead of the desired text and 806*7c478bd9Sstevel@tonic-gate left the editor in a very strange state. Now such a put just beeps. 807*7c478bd9Sstevel@tonic-gate 808*7c478bd9Sstevel@tonic-gateVersion 3.1 -- November 1, 1979 809*7c478bd9Sstevel@tonic-gate 810*7c478bd9Sstevel@tonic-gate Versions from 3.1 up are too large to fit on pdp-11's. 811*7c478bd9Sstevel@tonic-gate (Special overlay software is expected to be available soon 812*7c478bd9Sstevel@tonic-gate for v7 pdp-11 Unix that will make it fit.) Version 2.9 813*7c478bd9Sstevel@tonic-gate is 3.1 with only the bug fixes and very few of the enhancements. 814*7c478bd9Sstevel@tonic-gate 2.9 will fit on a pdp-11. Version 2.10 will come out and may 815*7c478bd9Sstevel@tonic-gate correspond to 3.2. (It turned out to correspond to 3.3) 816*7c478bd9Sstevel@tonic-gate 817*7c478bd9Sstevel@tonic-gate For compatibility with ed: 's<newline>' may be used as a 818*7c478bd9Sstevel@tonic-gate command and means '&'. If you set the option "edcompatible" 819*7c478bd9Sstevel@tonic-gate (abbr "ed") the presence or absence of g and c suffices is 820*7c478bd9Sstevel@tonic-gate remembered and can be toggled by repeating the suffices. The 821*7c478bd9Sstevel@tonic-gate suffix "r" makes the substitution into "~" instead of "&". 822*7c478bd9Sstevel@tonic-gate 823*7c478bd9Sstevel@tonic-gate A new command line option -w<n> sets the value of window before 824*7c478bd9Sstevel@tonic-gate starting ex. Hence: 'vi -w5 file' makes a quick change to a file 825*7c478bd9Sstevel@tonic-gate easier at 300 baud. 826*7c478bd9Sstevel@tonic-gate 827*7c478bd9Sstevel@tonic-gate Arrow keys on terminals that send more than 1 character now 828*7c478bd9Sstevel@tonic-gate work. Home up keys are supported as are the four directions. 829*7c478bd9Sstevel@tonic-gate Ex no longer looks at the ma= entry in termcap, but uses the 830*7c478bd9Sstevel@tonic-gate ku, kd, kl, kr, and kh entries. (Note that the HP 2621 will 831*7c478bd9Sstevel@tonic-gate turn on function key labels, and even then you have to hold 832*7c478bd9Sstevel@tonic-gate shift down. To avoid turning on the labels, and to give up the 833*7c478bd9Sstevel@tonic-gate function keys, use terminal type 2621nl instead of 2621.) 834*7c478bd9Sstevel@tonic-gate 835*7c478bd9Sstevel@tonic-gate A parameterless macro facility is included from visual. Briefly, 836*7c478bd9Sstevel@tonic-gate there are two flavors of macros: 837*7c478bd9Sstevel@tonic-gate a) Put the macro body in a buffer register, say x. Then 838*7c478bd9Sstevel@tonic-gate type @x to invoke it. @ may be followed by another @ 839*7c478bd9Sstevel@tonic-gate to repeat the last macro. 840*7c478bd9Sstevel@tonic-gate This allows macros up to 512 chars. 841*7c478bd9Sstevel@tonic-gate b) Use the map command from command mode (typically in the 842*7c478bd9Sstevel@tonic-gate .exrc file) as follows: 843*7c478bd9Sstevel@tonic-gate map lhs rhs 844*7c478bd9Sstevel@tonic-gate where lhs will be mapped to rhs. 845*7c478bd9Sstevel@tonic-gate There are restrictions: lhs's should be 1-keystroke 846*7c478bd9Sstevel@tonic-gate (either 1 char or 1 function key) since they must be 847*7c478bd9Sstevel@tonic-gate entered within 1 second. lhs no longer than 10 chars, 848*7c478bd9Sstevel@tonic-gate rhs no longer than 100. To get " ", "\t", "|", or "\n" 849*7c478bd9Sstevel@tonic-gate into lhs or rhs, escape them with ctrl V. (It may be 850*7c478bd9Sstevel@tonic-gate necessary to escape the ctrl V with ctrl V if the map 851*7c478bd9Sstevel@tonic-gate command is given from visual mode.) 852*7c478bd9Sstevel@tonic-gate For 1 shot macros it is best to put the macro in a buffer register 853*7c478bd9Sstevel@tonic-gate and map a key to '@r', since this will allow the macro to be edited. 854*7c478bd9Sstevel@tonic-gate 855*7c478bd9Sstevel@tonic-gate Macros can be deleted with 856*7c478bd9Sstevel@tonic-gate unmap lhs 857*7c478bd9Sstevel@tonic-gate 858*7c478bd9Sstevel@tonic-gate The boolean option "mapinput" (mi) will, if on, cause macros to 859*7c478bd9Sstevel@tonic-gate be mapped in input mode as well as command mode (in visual only). 860*7c478bd9Sstevel@tonic-gate For example, you can define ctrl T to be four spaces with 861*7c478bd9Sstevel@tonic-gate :map ^V^T_^V^V____ 862*7c478bd9Sstevel@tonic-gate :set mi 863*7c478bd9Sstevel@tonic-gate where underlines represent spaces and the ctrl V's are necessary 864*7c478bd9Sstevel@tonic-gate to get ctrl chars and spaces past various levels, and make ^T be 865*7c478bd9Sstevel@tonic-gate a software tab that even works in the middle of a line. 866*7c478bd9Sstevel@tonic-gate 867*7c478bd9Sstevel@tonic-gate If the lhs of a macro is "#0" through "#9", this maps the particular 868*7c478bd9Sstevel@tonic-gate function key instead of the 2 char # sequence, if the terminal has 869*7c478bd9Sstevel@tonic-gate function keys. This only works if termcap has function key entries 870*7c478bd9Sstevel@tonic-gate for the particular terminal. For terminals without function keys, 871*7c478bd9Sstevel@tonic-gate the sequence #x means function key x, as typed. As a special case, 872*7c478bd9Sstevel@tonic-gate on terminals without function keys, the #x sequence need not be 873*7c478bd9Sstevel@tonic-gate typed within one second. The character # can be changed by using 874*7c478bd9Sstevel@tonic-gate a macro in the usual way: 875*7c478bd9Sstevel@tonic-gate map ^V^I # 876*7c478bd9Sstevel@tonic-gate to use tab, for example. (This won't affect the map command, which 877*7c478bd9Sstevel@tonic-gate still uses #, but just the invocation from visual mode.) 878*7c478bd9Sstevel@tonic-gate The undo command will undo an entire macro call as a unit. 879*7c478bd9Sstevel@tonic-gate 880*7c478bd9Sstevel@tonic-gate New commands in visual: ^Y and ^E. These glitch the screen up 881*7c478bd9Sstevel@tonic-gate and down 1 line, respectively. They can be given counts, controlling 882*7c478bd9Sstevel@tonic-gate the number of lines the screen is glitched. They differ from ^U 883*7c478bd9Sstevel@tonic-gate and ^D in that the cursor stays over the same line in the buffer 884*7c478bd9Sstevel@tonic-gate it was over before rather than staying in the same place on the 885*7c478bd9Sstevel@tonic-gate screen. (^Y on a dumb terminal with a full screen will redraw the 886*7c478bd9Sstevel@tonic-gate screen moving the cursor up a few lines.) If you're looking for 887*7c478bd9Sstevel@tonic-gate mnemonic value in the names, try this: Y is right next to U and 888*7c478bd9Sstevel@tonic-gate E is right next to D. 889*7c478bd9Sstevel@tonic-gate 890*7c478bd9Sstevel@tonic-gate More new commands in visual: '&' is a synonym for ':&<cr>'. 891*7c478bd9Sstevel@tonic-gate '~' changes the case of the letter under the cursor and moves 892*7c478bd9Sstevel@tonic-gate to the next character. 893*7c478bd9Sstevel@tonic-gate 894*7c478bd9Sstevel@tonic-gate Ex looks in your environment for EXINIT. If it finds it, that 895*7c478bd9Sstevel@tonic-gate is used instead of looking for your .exrc. This should make 896*7c478bd9Sstevel@tonic-gate entry into ex faster, along with the termlib feature of looking 897*7c478bd9Sstevel@tonic-gate for a termcap entry in TERMCAP. 898*7c478bd9Sstevel@tonic-gate 899*7c478bd9Sstevel@tonic-gateVersion 2.13 -- September 23, 1980 900*7c478bd9Sstevel@tonic-gate 901*7c478bd9Sstevel@tonic-gate The provisions for changing the window size with a numeric 902*7c478bd9Sstevel@tonic-gate prefix argument to certain visual commands have been deleted. 903*7c478bd9Sstevel@tonic-gate The correct way to change the window size is to use the z 904*7c478bd9Sstevel@tonic-gate command, for example z5<cr> to change the window to 5 lines. 905*7c478bd9Sstevel@tonic-gate 906*7c478bd9Sstevel@tonic-gate An undocumented "feature" which caused the ^^ command to return 907*7c478bd9Sstevel@tonic-gate to the previous tag, if in the current file, instead of the 908*7c478bd9Sstevel@tonic-gate previous file, has been removed. 909*7c478bd9Sstevel@tonic-gate 910*7c478bd9Sstevel@tonic-gateVersion 2.12 -- July 23, 1980 911*7c478bd9Sstevel@tonic-gate 912*7c478bd9Sstevel@tonic-gate A change was made to the sys_errlist array in ex_subr.c so that 913*7c478bd9Sstevel@tonic-gate Berkeley V7 quotas will produce the right error message. 914*7c478bd9Sstevel@tonic-gate 915*7c478bd9Sstevel@tonic-gate A couple of minor bug fixes were made to get the editor to 916*7c478bd9Sstevel@tonic-gate compile on version 6. The option to use 1K BUFSIZ has been 917*7c478bd9Sstevel@tonic-gate deleted, since it is no longer used on our 1K system. 918*7c478bd9Sstevel@tonic-gate 919*7c478bd9Sstevel@tonic-gateVersion 2.11 -- June 24, 1980 920*7c478bd9Sstevel@tonic-gate 921*7c478bd9Sstevel@tonic-gate The visual page motion commands ^F and ^B now treat any preceding 922*7c478bd9Sstevel@tonic-gate counts as number of pages to move, instead of changes to the 923*7c478bd9Sstevel@tonic-gate window size. That is, 2^F moves forward 2 pages. 924*7c478bd9Sstevel@tonic-gate 925*7c478bd9Sstevel@tonic-gate A :vi <file> command from visual mode is now treated the same 926*7c478bd9Sstevel@tonic-gate as a :edit <file> or :ex <file> command. The meaning of the 927*7c478bd9Sstevel@tonic-gate vi command from ex command mode is not affected. 928*7c478bd9Sstevel@tonic-gate 929*7c478bd9Sstevel@tonic-gate A read only mode now lets you guarantee you won't clobber your 930*7c478bd9Sstevel@tonic-gate file by accident. You can set the on/off option "readonly" (ro) 931*7c478bd9Sstevel@tonic-gate and writes will fail unless you use an ! after the write. 932*7c478bd9Sstevel@tonic-gate Commands such as x, ZZ, and autowrite, and in general anything 933*7c478bd9Sstevel@tonic-gate that writes is affected. This option is turned on if you invoke 934*7c478bd9Sstevel@tonic-gate ex with the -R flag. A new link called "view" has been created. 935*7c478bd9Sstevel@tonic-gate View is just like vi but it sets readonly. 936*7c478bd9Sstevel@tonic-gate 937*7c478bd9Sstevel@tonic-gate The editor now supports certain terminals that use strings other 938*7c478bd9Sstevel@tonic-gate then \r and \n for return and linefeed by implementing the cr 939*7c478bd9Sstevel@tonic-gate and nl termcap options. (Thanks to UCLA for these enhancements). 940*7c478bd9Sstevel@tonic-gate 941*7c478bd9Sstevel@tonic-gate The termcap attribute ns is now checked for, and ex refuses to 942*7c478bd9Sstevel@tonic-gate go into visual mode on such a terminal unless it has sf. 943*7c478bd9Sstevel@tonic-gate 944*7c478bd9Sstevel@tonic-gate If you change your start and stop characters to something other 945*7c478bd9Sstevel@tonic-gate than the default ^S and ^Q, vi now turns them off. This causes 946*7c478bd9Sstevel@tonic-gate people who change them to escape not to lose so badly. 947*7c478bd9Sstevel@tonic-gate The quit character is once again turned off so that datamedias 948*7c478bd9Sstevel@tonic-gate which send ^\ for the right arrow key work. 949*7c478bd9Sstevel@tonic-gate 950*7c478bd9Sstevel@tonic-gate If you type in an unmatched ) or } in showmatch mode, the editor 951*7c478bd9Sstevel@tonic-gate will now beep to warn you about your mistake. The ) or } is 952*7c478bd9Sstevel@tonic-gate still accepted. 953*7c478bd9Sstevel@tonic-gate 954*7c478bd9Sstevel@tonic-gate Editor scripts can now contain comments. Begin the comments with " 955*7c478bd9Sstevel@tonic-gate (double quote). Comments can be on their own line or come at the 956*7c478bd9Sstevel@tonic-gate end of command lines. The comment continues to the end of the line. 957*7c478bd9Sstevel@tonic-gate 958*7c478bd9Sstevel@tonic-gate The 3rd version of the USG tty driver is now supported, making it 959*7c478bd9Sstevel@tonic-gate possible on USG systems to interrupt redrawing the screen and to 960*7c478bd9Sstevel@tonic-gate not flush output when interruptable commands take place. 961*7c478bd9Sstevel@tonic-gate 962*7c478bd9Sstevel@tonic-gate The rewind command has been added to the list of commands that 963*7c478bd9Sstevel@tonic-gate the autowrite option knows about. 964*7c478bd9Sstevel@tonic-gate 965*7c478bd9Sstevel@tonic-gate A bug on the USG system where hanging up the phone causes more 966*7c478bd9Sstevel@tonic-gate than one SIGHUP to be sent has been compensated for. 967*7c478bd9Sstevel@tonic-gate 968*7c478bd9Sstevel@tonic-gate A bug which caused a file that bombed out in the middle of 969*7c478bd9Sstevel@tonic-gate an edit command to be considered modified has been fixed. 970*7c478bd9Sstevel@tonic-gate 971*7c478bd9Sstevel@tonic-gate The source file ex_io.c has been split into ex_io.c and 972*7c478bd9Sstevel@tonic-gate ex_unix.c to avoid a problem where many C compilers overflowed 973*7c478bd9Sstevel@tonic-gate the symbol table. 974*7c478bd9Sstevel@tonic-gate 975*7c478bd9Sstevel@tonic-gate A bug which prevented turning off your prompt in your .exrc 976*7c478bd9Sstevel@tonic-gate has been fixed. 977*7c478bd9Sstevel@tonic-gate 978*7c478bd9Sstevel@tonic-gate Some of the code internal to the editor has been rearranged 979*7c478bd9Sstevel@tonic-gate and some comments added. 980*7c478bd9Sstevel@tonic-gate 981*7c478bd9Sstevel@tonic-gate The bug fix to the USG tty driver to output a null character 982*7c478bd9Sstevel@tonic-gate as padding at 1200 baud has been improved to output a DEL 983*7c478bd9Sstevel@tonic-gate at 1200 baud or above. 984*7c478bd9Sstevel@tonic-gate 985*7c478bd9Sstevel@tonic-gate Terminals with small screens (less than 20 columns or less 986*7c478bd9Sstevel@tonic-gate than 5 lines) should now work. 987*7c478bd9Sstevel@tonic-gate 988*7c478bd9Sstevel@tonic-gate A bug which prevented you from entering the character DEL 989*7c478bd9Sstevel@tonic-gate into the buffer if you changed your interrupt character to 990*7c478bd9Sstevel@tonic-gate something else besides DEL has been fixed. 991*7c478bd9Sstevel@tonic-gate 992*7c478bd9Sstevel@tonic-gate A bug which caused things like d) and d} to miss the last 993*7c478bd9Sstevel@tonic-gate character when they should have deleted to the end of the 994*7c478bd9Sstevel@tonic-gate buffer has been fixed. 995*7c478bd9Sstevel@tonic-gate 996*7c478bd9Sstevel@tonic-gate A bug which caused the last character to be lost when you 997*7c478bd9Sstevel@tonic-gate read in a file with no newline at the end of the last line 998*7c478bd9Sstevel@tonic-gate has been fixed. 999*7c478bd9Sstevel@tonic-gate 1000*7c478bd9Sstevel@tonic-gate A bug that caused garbage to be in the buffer if the temp file 1001*7c478bd9Sstevel@tonic-gate overflowed has been fixed. 1002*7c478bd9Sstevel@tonic-gate 1003*7c478bd9Sstevel@tonic-gate The character | can now be escaped with \| in file names. 1004*7c478bd9Sstevel@tonic-gate 1005*7c478bd9Sstevel@tonic-gate A bug which caused the editor to not work if the tab stop size 1006*7c478bd9Sstevel@tonic-gate did not divide the screen width has been fixed. 1007*7c478bd9Sstevel@tonic-gate 1008*7c478bd9Sstevel@tonic-gate A bug on HP terminals that caused the screen to be messed up if 1009*7c478bd9Sstevel@tonic-gate you scrolled up something that began the same way as the echo line 1010*7c478bd9Sstevel@tonic-gate has been fixed. 1011*7c478bd9Sstevel@tonic-gate 1012*7c478bd9Sstevel@tonic-gate An old ed bug which caused globals to fail when they did a substitute 1013*7c478bd9Sstevel@tonic-gate on the next line has been fixed. 1014*7c478bd9Sstevel@tonic-gate 1015*7c478bd9Sstevel@tonic-gate The % operator will now find matching square brackets the same way 1016*7c478bd9Sstevel@tonic-gate it does parentheses and braces. It will not display them in 1017*7c478bd9Sstevel@tonic-gate showmatch mode, however, and will not use a ] to match all ('s. 1018*7c478bd9Sstevel@tonic-gate 1019*7c478bd9Sstevel@tonic-gate Ex looks in your environment for EXINIT. If it finds it, that 1020*7c478bd9Sstevel@tonic-gate is used instead of looking for your .exrc. This should make 1021*7c478bd9Sstevel@tonic-gate entry into ex faster, along with the termlib feature of looking 1022*7c478bd9Sstevel@tonic-gate for a termcap entry in TERMCAP. 1023*7c478bd9Sstevel@tonic-gate 1024*7c478bd9Sstevel@tonic-gate Internally, it is possible to turn off about a dozen different 1025*7c478bd9Sstevel@tonic-gate options when compiling the editor to make it fit in 64K. 1026*7c478bd9Sstevel@tonic-gate See the makefile for a list of options. 1027*7c478bd9Sstevel@tonic-gate 1028*7c478bd9Sstevel@tonic-gateVersion 2.10 -- February 2, 1980 (Corresponds to 3.3) 1029*7c478bd9Sstevel@tonic-gate 1030*7c478bd9Sstevel@tonic-gate The default window sizes have been changed. At 300 baud the 1031*7c478bd9Sstevel@tonic-gate window is now 8 lines (was 1/2 the screen size). At 1200 baud 1032*7c478bd9Sstevel@tonic-gate the window is now 16 lines (was 2/3 the screen size, which was 1033*7c478bd9Sstevel@tonic-gate usually also 16 for a typical 24 line CRT). At 9600 baud the 1034*7c478bd9Sstevel@tonic-gate window is still the full screen size. Any baud rate less than 1035*7c478bd9Sstevel@tonic-gate 1200 behaves like 300, any over 1200 like 9600. 1036*7c478bd9Sstevel@tonic-gate 1037*7c478bd9Sstevel@tonic-gate A new command mode command "x" (for "xit") has been added. This 1038*7c478bd9Sstevel@tonic-gate is the same as wq but will not bother to write if there have been 1039*7c478bd9Sstevel@tonic-gate no changes to the file. The command letter was chosen for 1040*7c478bd9Sstevel@tonic-gate convenience and compatibility with hed. 1041*7c478bd9Sstevel@tonic-gate 1042*7c478bd9Sstevel@tonic-gate The command "ZZ" from vi is the same as ":x<cr>". This is 1043*7c478bd9Sstevel@tonic-gate the recommended way to leave the editor. Z must be typed twice 1044*7c478bd9Sstevel@tonic-gate since this is two easy to type by accident and has such severe 1045*7c478bd9Sstevel@tonic-gate effects if unintentional. 1046*7c478bd9Sstevel@tonic-gate 1047*7c478bd9Sstevel@tonic-gate The options w300, w1200, and w9600 can be set. They are synonyms 1048*7c478bd9Sstevel@tonic-gate for "window", but only apply at 300, 1200, or 9600 baud, resp. 1049*7c478bd9Sstevel@tonic-gate Thus you can specify you want a 12 line window at 300 baud and 1050*7c478bd9Sstevel@tonic-gate a 23 line window at 1200 baud with 1051*7c478bd9Sstevel@tonic-gate :set w300=12 w1200=23 1052*7c478bd9Sstevel@tonic-gate 1053*7c478bd9Sstevel@tonic-gate The "q" command from visual no longer works at all. You must 1054*7c478bd9Sstevel@tonic-gate use "Q" to get to ex command mode. 1055*7c478bd9Sstevel@tonic-gate 1056*7c478bd9Sstevel@tonic-gate The editor no longer uses nondestructive space, except when in 1057*7c478bd9Sstevel@tonic-gate insert mode. It instead prints the character it would be 1058*7c478bd9Sstevel@tonic-gate moving over. This is a real win on terminals that use an 1059*7c478bd9Sstevel@tonic-gate escape sequence to nd space. 1060*7c478bd9Sstevel@tonic-gate 1061*7c478bd9Sstevel@tonic-gate A minor incompatibility with the v7 ed has been fixed. Previously, 1062*7c478bd9Sstevel@tonic-gate to do a global substitute with an escaped newline in the rhs, you 1063*7c478bd9Sstevel@tonic-gate had to put two \'s in ex and one in ed. Ex now accepts the single 1064*7c478bd9Sstevel@tonic-gate form as well as the double form. For example, instead of 1065*7c478bd9Sstevel@tonic-gate g/foo/s//foo\\ 1066*7c478bd9Sstevel@tonic-gate bar/g 1067*7c478bd9Sstevel@tonic-gate (which still works), you can now type, as in ed, 1068*7c478bd9Sstevel@tonic-gate g/foo/s//foo\ 1069*7c478bd9Sstevel@tonic-gate bar/g 1070*7c478bd9Sstevel@tonic-gate This means that the following ex command, which used to "work": 1071*7c478bd9Sstevel@tonic-gate g/foo/s//foo bar\ 1072*7c478bd9Sstevel@tonic-gate .+1,/mumble/d 1073*7c478bd9Sstevel@tonic-gate won't work anymore unless you put the trailing / on the substitution. 1074*7c478bd9Sstevel@tonic-gate This usage is pretty obscure anyway. 1075*7c478bd9Sstevel@tonic-gate 1076*7c478bd9Sstevel@tonic-gate A bug which caused the command "g/pattern" to print an error 1077*7c478bd9Sstevel@tonic-gate message if "pattern" occurred on the last line has been fixed. 1078*7c478bd9Sstevel@tonic-gate 1079*7c478bd9Sstevel@tonic-gate Limits have been raised so that an Ann Arbor terminal can be used, 1080*7c478bd9Sstevel@tonic-gate and long tags can now be accommodated. 1081*7c478bd9Sstevel@tonic-gate 1082*7c478bd9Sstevel@tonic-gate A bug that caused HP terminals to mess up in insert mode when inserting 1083*7c478bd9Sstevel@tonic-gate before a tab which follows 7 or fewer characters at the beginning of a 1084*7c478bd9Sstevel@tonic-gate line (such as a tags file) has been fixed. 1085*7c478bd9Sstevel@tonic-gate 1086*7c478bd9Sstevel@tonic-gate A bug which causes term to be displayed incorrectly and which 1087*7c478bd9Sstevel@tonic-gate caused a crash when changing terminal type when there happened 1088*7c478bd9Sstevel@tonic-gate to be several |'s and a long string in genbuf has been fixed. 1089*7c478bd9Sstevel@tonic-gate This bug was introduced in ex 2.9. 1090*7c478bd9Sstevel@tonic-gate 1091*7c478bd9Sstevel@tonic-gate The patch for echo lines longer than 80 characters has been 1092*7c478bd9Sstevel@tonic-gate repaired to do "Hit return to continue" after such lines and 1093*7c478bd9Sstevel@tonic-gate print the entire output. 1094*7c478bd9Sstevel@tonic-gate 1095*7c478bd9Sstevel@tonic-gate A bug that caused a messed up screen after a :sh command from 1096*7c478bd9Sstevel@tonic-gate open mode has been fixed. 1097*7c478bd9Sstevel@tonic-gate 1098*7c478bd9Sstevel@tonic-gate A bug which caused a tag request for a nonexistent tag to leave 1099*7c478bd9Sstevel@tonic-gate the editor in nomagic mode has been fixed. 1100*7c478bd9Sstevel@tonic-gate 1101*7c478bd9Sstevel@tonic-gate A bug which caused strange behavior if there is no default file 1102*7c478bd9Sstevel@tonic-gate name when an autowrite save is attempted has been fixed. 1103*7c478bd9Sstevel@tonic-gate 1104*7c478bd9Sstevel@tonic-gate A bug which caused the cursor to go to the wrong position when 1105*7c478bd9Sstevel@tonic-gate ^^D or 0^D is entered from column 2 in autoindent mode on terminals 1106*7c478bd9Sstevel@tonic-gate that can backspace has been fixed. 1107*7c478bd9Sstevel@tonic-gate 1108*7c478bd9Sstevel@tonic-gate In order to get 2.10 to fit on a v7 pdp-11, the following features 1109*7c478bd9Sstevel@tonic-gate have been deleted: 1110*7c478bd9Sstevel@tonic-gate The MASTERTAGS feature (undocumented use of /usr/lib/tags 1111*7c478bd9Sstevel@tonic-gate as an alternate tag file) 1112*7c478bd9Sstevel@tonic-gate Checking that a file being read in is an ascii file. 1113*7c478bd9Sstevel@tonic-gate Turning off ^Q/^S on a v7 system. 1114*7c478bd9Sstevel@tonic-gate 1115