Path: utzoo!attcan!uunet!auspex!guy From: guy@auspex.auspex.com (Guy Harris) Newsgroups: comp.editors Subject: Re: SunOS 4.1 & vi Keywords: BSD SYSV vi tabs Message-ID: <4051@auspex.auspex.com> Date: 12 Sep 90 17:23:15 GMT References: <6246@vanuata.cs.glasgow.ac.uk> <2141@wn1.sci.kun.nl> Distribution: comp Organization: Auspex Systems, Santa Clara Lines: 162 >There must be other differences lurking somewhere. The one that motivated the switchover is that the S5R3.1 version (upon which the SunOS one is based) supports 8-bit character sets. Here's an edited version of the "ex.news" file in the S5R3.1 source directory - edited to remove stuff that either isn't in the SunOS 4.1 version, or that was already in the SunOS 4.1 version, or that isn't relevant (i.e., changes to the source directory names). Some stuff, anyway; others may or may not be there (the 4.2BSD version was version 3.7; the 4.3BSD version is still called 3.7, but has some additional stuff). Also, stuff such as the "tag stack" stuff that was in the SunOS version but not the BSD version was propagated into the 4.1 version. 3. The structure of /usr/preserve has been changed to improve security. The directory /usr/preserve will have read-write-execute permissions for everybody. Recovered files will be saved in a subdirectory in /usr/preserve. The subdirectory name is the same as the user's id, owned by the user, and has read-write-execute permissions for the user only. The recovered file in the subdirectory has read-write permissions for the user only. Expreserve, exrecover, and /usr/preserve all have owner and group of "bin"; setuid bits in expreserve and exrecover have been turned off. 4. the command "vi -r" or "vi -L" used to list recoverable files, now lists the user's files found in /tmp as well as /usr/preserve/user so the user has a complete list. Files are listed under the appropriate directory names. 6. exit code of ex/vi reflects number of error/warning messages incurred 7. ctags (used in conjunction with -t option and ":ta") now installed in /usr/bin/ctags (manual page in Section 1). 8. added ed-like enhancement such that "s/text/%" will replace "text" with the righthand side of the previous substitute command. 9. added argument to case operator "~" so that multiple substitutions per line can occur (e.g. "10~"). BUG FIXES: 1.*if input being read by source'd file and an error is encountered, the user is bumped up to the previous source level, instead of being thrown back into command mode. 2.*ex/vi restores tty state if fork fails. 3.*ex/vi allows backspacing and retyping of conditional responses (in the case of ":s/old/new/c"). 4.*"U" (undo line changes) no longer marks file as modified when no editing has been done. 5.*file not automatically considered modified when "vi +cmd file" syntax used. 6.*actions of "ZZ" altered as follows: COMMAND OLD ACTIONS NEW ACTIONS ------- ----------- ----------- vi newfn; ZZ no file created same as old action vi oldfn; ZZ oldfn unchanged same as old action vi newfn; 1,$d; ZZ no file created write empty file vi newfn; a text (0 char; 0 bytes) 1,$d; ZZ no file created write empty file vi oldfn; 1,$d; ZZ oldfn unchanged write empty file vi oldfn; a text; 1,$d; ZZ oldfn unchanged write empty file vi oldfn; dd all; ZZ write empty file same as old action@ 7.*cursor now moves to column 1 when HOME arrow key pushed in INSERT mode. 8.*if showmode set, it will display APPEND/INSERT/REPLACE(etc.) mode as appropriate. 9.*"novice" option can now be set or unset properly. 10.*yank-put now works when wrapmargin set and user tries to do a put at the end of a line (i.e., overlapping the wrap margin). Similar problem also fixed for ":R" for replacements beyond 80 columns or overlapping wrap margins (whichever comes first). 11.*stop "!" from being expanded within the shell escaped command line. Now ":!!" or any "!!" (after the initial shell escape) will cause substitution of the last command. 12.*code fixed to allow hardtabs set to 0. Now, if hardtabs set to 0 (i.e., terminal does not support hardtabs), ex/vi will use spaces to emulate tabbing. 13.*marks no longer lost after undo 14.*Note that the REPORT variable is 5 by default. For informatory messages when changes have been make for fewer than 5 lines, the user should ":set report=x" where x is a number. 15.*"/" no longer considered a command (for undo purposes) 16.*read done by ":Nr file" command (where N is a line number) now correctly undone (by "undo" command) 17.*added boundary checks so that exceeding maximum permitted map statements does not generate core dump/infinite loops 18.*terminal-dependent mapping removed when the user redefines the terminal by "set term=xxx" from ex editor (i.e., so only one terminal is mapped). 19.*'w' (advance a word) no longer fails on lines with trailing spaces. 20.*newline character not added to empty file. 21.*showmode indicator remains on when arrow keys used (e.g., while in input mode, INPUT MODE indicator is on until the ESC key is pressed). 22.*an interrupt during a write operation will no longer cause truncated file with no backup (happened only if file had NOT been modified during edit session; otherwise, backup was automatically initiated). 25.*abbreviations fixed so they do not loop recursively (i.e., ab yes yes!, or ab O O'Connal). 26.*J, 1J and 2J perform same operation: joining the current line and the next line together. 0J is actually two commands: 0 (meaning go to the beginning of the line) and J (join). 27.*when tmp file becomes too big, line of garbage no longer added to file. 28.*":n +command" no longer infinite loops on 3b2's. 29.*%-matching is now interruptible. Version 3.9 February 10, 1983 A new option "showmode" (smd) causes input mode to be indicated toward the right end of the message line. This is useful for learning vi and for people who get confused about what mode they are in. Only the first letter of the message is shown if "terse" is also set. A new invocation "vedit" is for novices. This is like edit but puts you into visual mode right away. It also sets showmode. The default number of lines to scroll in visual mode on a control D is now the variable scroll, not half the variable window. A bug causing extra CPU usage when vi is reentered after ^Z has been fixed. This also fixes a bug causing a hang until the user types something if you are past column 80 before ^Z. Version 3.8 April 22, 1982 The main change is conversion from termcap to terminfo. More function keys are supported now. Most function keys with a meaning to vi work both in command mode and input mode. A bug in the encryption command causing plain text in the temp file and encrypted text on your screen has been fixed. A new command "crypt" or "X" enters encryption mode once you have started editing, like the ed "x" command. A new command line option "-V" (verbose) is useful for debugging ex scripts. A new boolean set option "flash" allows you to control whether vi uses the visible bell in your terminal (if it has one). The default is "flash", do "set noflash" if the flashing is annoying. The "open" boolean option has been deleted. Ex will no longer prevent the user from entering open mode. This clears up problems with paths and invocations containing the letter "d". If the local system has the Cornell "Fast Timer" driver, vi uses it instead of alarm to detect function keys. This means that the delay after typing escape will usually only be 0.1 second instead of a full second. Of course, if the user continues typing, there is no delay at all.