Subject: Re: Using VI
To: Henry Nelson <netb@yuba.kcn.ne.jp>
From: Peter Seebach <seebs@plethora.net>
List: netbsd-help
Date: 01/09/2005 05:57:54
In message <20050109092618.GB248@yuba.kcn.ne.jp>, Henry Nelson writes:
>On Wed, Jan 05, 2005 at 04:20:49AM +0000, Frederick Bruckman wrote:
>> NetBSD's "vi" is "nvi", which sticks mainly to the original except
>> for a couple of new features -- infinite undo, and multiple windows.
>                                  ^^^^^^^^^^^^^
>I'd like this.  When I use "u", though, it just toggles between before
>and after the most recent change.  What command allows infinite undo?
>Many TIA.

u....

If the last command is 'u', then '.' progresses through the undo chain.

(This is absolutely brilliant, BTW; every other vi that has infinite undo
does it in a way that breaks the experienced vi user habit of hitting 'u'
repeatedly to look at a paragraph two ways, or otherwise relying on the
knowledge that you can undo an undo.  Note that 'u' after an undo is a redo,
and '....' then does more redos, going through the chain.  If you want to
do an action you've just undone, but do it elsewhere, 'u<movement>.' does what
you'd expect.)

-s