Newsgroups: comp.editors
Path: utzoo!utgpu!cunews!bnrgate!scrumpy!bnrmtl@bnr.ca!lewis
From: lewis@bnrmtl.bnr.ca (Pierre Lewis)
Subject: Re: One user's editor wish list
Message-ID: <1991Mar25.191821.11019@scrumpy@.bnr.ca>
Sender: news@scrumpy@.bnr.ca (USENET (SY))
Reply-To: bnrmtl!lewis@larry.mcrcim.mcgill.edu
Organization: Bell-Northern Research Montreal, Canada.
References: <1991Feb22.134323.20410@scrumpy@.bnr.ca>
Date: Mon, 25 Mar 91 19:18:21 GMT

Little did I expect, when I submitted my original post, that I would learn
more about vi and emacs (esp. the former) than I ever learned from all other
sources.  Thanks to all for the pointers.  Even if I don't use vi often, I
do use it at times and this is useful information.

On intuitivity...

Yes the C-S example was not so great because it's used as a flow control
character.  Here are two hopefully better examples of what I mean by
intuitive.  For lack of a real definition.

1) vi commands :w :q and :n

   With the vi on our SunOS 4.0.3, I can do the following:
     :w    to write back a file
     :q    to quit the editor
     :wq   to write back a file AND quit the editor

   I can also do:
     :n    to move to next file (if current file has no pending changes)

   So I thought, given previous experience with :wq (which seemed to indicate
   that you can concatenate commands), that
     :wn   to write back a file AND move to next file
   would also be possible.  Filled with blind faith (on one occasion where
   I happened to be cleaning up a few uuencoded files), I tried (after
   editing first file):
     :wn
   and got the message "wn: Not an editor command".  There is surely some
   other command that will do it, but why not the intuitive choice?

   Here's one case where an editor failed to be intuitive.  Anyone can give
   me a good reason why ":wn" should not work if ":wq" works?

2) XEDIT command show

   With XEDIT, it is possible to exclude some lines from the display (e.g.
   to hide some error processing which we are not momentarily interested
   in).  A very useful feature, maximizing information on display.  For
   example, the display might look like:

     =====   if (! (pfcb = (tFcb *)malloc(sizeof (tFcb)))) /* alloc fcb */
     =====   {
     ===== -----------------  6  line(s) not displayed -----------------
     =====   }
     =====   else memset(pfcb, 0, sizeof(tFcb));

   At this point, it is possible to enter in the prefix area (the command
   area in front of a line) the command "s" to make the hidden lines all
   visible again.  Or the command "s3" to make only the first three visible
   again.  But what if one wants to make the LAST three visible.  The first
   thing that came to my mind (I did have quite a bit of experience with the
   editor, but I don't know of any other prefix command where this might be
   useful) is "s-3".  I tried it

     s-3== -----------------  6  line(s) not displayed -----------------

   and it worked as expected.  That an example of an editor being intuitive.

--
Pierre LEWIS
Internet:    bnrmtl!lewis@Larry.McRCIM.McGill.EDU

Lubarsky's law of cybernetic entomology:  There is always one more bug!
