[rescue] Re:EMACS

Greg A. Woods rescue at sunhelp.org
Wed Jun 27 17:36:35 CDT 2001

[ On Wednesday, June 27, 2001 at 17:01:10 (-0500), Bill Bradford wrote: ]
> Subject: Re: [rescue] Re:EMACS
> On Wed, Jun 27, 2001 at 05:57:00PM -0400, Kurt Mosiejczuk wrote:
> > Um, nobody has jumped on this one yet, but this is actually VERY easy
> > in vi.  When you cut and paste in vi, you actually use an unnamed cut
> > buffer.  If you precede your Y,yy,D,dd or what have you with the
> > sequence "a then the cut/copy will be placed into cut buffer a.  There
> > are 26 of them, a through z, and they persist between files unlike
> > the default buffer. (When I say between files, they only persist as
> > long as you are in one execution of vi, you can't vi foo, cut, quit
> > and then vi bar and paste).
> *blink*
> I just wrote a chapter on VI for a Solaris 8 certification study
> book, and I didnt even know this.

Well, like was very correctly described before, that's a real
finger-twister.  (And for someone who uses ctrl-alt-meta-compose-foo in
emacs all day to say that, you've really got to believe it's true!  ;-)

Even worse if you've got anywhere close to 20 or more of them in use at
a time it becomes nearly impossible to remember what's in them, and
without defining a macro it's very painful to flip through them until
you find the right one.

One other trick you may not know (one I teach almost every self-
proclaimed vi-expert I've ever met, even the ones who've studied and use
modern variants like 'nvi' daily) is how to do infinite undo.  Infinite
undo was one of the long-time huge benefits of emacs over vi, but
finally with 'nvi' it is available.  (well I'm not sure about the
"infinite" part....)

The trick of course is that it's not actually plainly documented in the
manual -- it's just one of those things that's supposed to be intuitive
to vi users.

As you may know the 'u' key will toggle the most recent modification to
the current line (and 'U' will revert the line to its original state).
Now how do you think you'd implement an infinite undo in a very vi-like


Are you sure?  How about without breaking the 'uu' toggle paradigm?


Got it yet?


How about a 'u' and then as many '.'s as required!  ;-)

Too bad most of the commercial unix users are still stuck by default
with an almost 20-year-old version of vi....  I still say though if
you're going to install a new editor on your system, why not make it a
real one instead of just a new version of the old one!  ;-)

							Greg A. Woods

+1 416 218-0098      VE3TCP      <gwoods at acm.org>     <woods at robohack.ca>
Planix, Inc. <woods at planix.com>;   Secrets of the Weird <woods at weird.com>

More information about the rescue mailing list