From owner-freebsd-questions Sat Aug 3 23:23:10 1996 Return-Path: owner-questions Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id XAA16473 for questions-outgoing; Sat, 3 Aug 1996 23:23:10 -0700 (PDT) Received: from andrsn.stanford.edu (andrsn.Stanford.EDU [36.33.0.163]) by freefall.freebsd.org (8.7.5/8.7.3) with ESMTP id XAA16465 for ; Sat, 3 Aug 1996 23:23:08 -0700 (PDT) Received: from localhost (localhost.Stanford.EDU [127.0.0.1]) by andrsn.stanford.edu (8.7.5/8.6.12) with SMTP id XAA23568; Sat, 3 Aug 1996 23:01:48 -0700 (PDT) Date: Sat, 3 Aug 1996 23:01:48 -0700 (PDT) From: Annelise Anderson Reply-To: Annelise Anderson To: Robert Eckardt cc: kuku@gilberto.physik.rwth-aachen.de, mrm@Mole.ORG, freebsd-questions@freebsd.org Subject: Re: vi question In-Reply-To: <199608031837.UAA18966@gluon.mep.ruhr-uni-bochum.de> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-questions@freebsd.org X-Loop: FreeBSD.org Precedence: bulk On Sat, 3 Aug 1996, Robert Eckardt wrote: > At the ':' prompt one can enter ex commands as vi(1) says: > " : Execute an ex command > > Under ISC-Unix 2.2 the vi(1) man-page references the ex(1) page which says: > " ex States > " Command Normal and initial state. Input prompted for > " by :. Your line kill character cancels a > " partial command. > " > " Insert Entered by a, i, or c. Arbitrary text may be > " entered. Insert state normally is ter- > " minated by a line having only "." on it, or, > " abnormally, with an interrupt. > " > " Visual Entered by typing vi; terminated by typing Q > " or ^\ (control-\). > > And, as everybody knows, Unix is a very portable system. :-) > > I think this should go into the F-BSD vi/ex man page. > > Robert I have no problem with that, but the vi man page (except for the quick start section, which is quite good) is a comprehensive collection of commands and not a task-oriented description. Some books and the guide in /usr/share/doc/usd (who would know it's there, or that one can read it with zmore?) are better, but still caught up in describing 82 motion commands etc. etc. etc. All the information is there (probably right on the hard drive) but it's difficult to decipher as it relates to a specific task. And these tasks are pretty obvious--how to enter text, delete text, cut and paste, copy text, find text, format text, export text to another file, import a file (or a portion thereof), search and replace, spell-check the text, save changes, exit, exit without savings changes, and (especially important with vi) recover from errors--like typing :a and not having the escape key or the arrow keys work as expected; or typing ??? and having the arrow keys turn into delete or repeat keys. Plus a few pointers on *major* motion commands, special features, how to write and execute a macro, how to exit temporarily to the command line (shell)...how to do footnotes (?), or what vi won't do. I think referencing the ex man page and expecting people to figure out whether the commands they're using are vi commands or ex commands is .... well, maybe just unrealistic. I would not have bothered to write this reply were it not that people who learn Unix really ought to learn vi, since it is the universal Unix text editor; pico seems to be a poor little thing by comparison; and one can hardly expect a new user to learn emacs just to edit a few files in /etc. So vi seems more or less inevitable, and it really deserves a task-oriented three or four pages. Actually I like vi, and I've figured out how to make it do most of the listed tasks. Annelise > Robert Eckardt (