Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 14 Jun 2009 22:51:06 -0600
From:      Chad Perrin <perrin@apotheon.com>
To:        FreeBSD Questions <freebsd-questions@FreeBSD.ORG>
Subject:   Re: vim question...
Message-ID:  <20090615045106.GA56586@kokopelli.hydra>
In-Reply-To: <C65B19B2.7D4BB%mksmith@adhost.com>
References:  <20090615024643.GA33420@thought.org> <C65B19B2.7D4BB%mksmith@adhost.com>

next in thread | previous in thread | raw e-mail | index | archive | help

--gBBFr7Ir9EOA20Yy
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Sun, Jun 14, 2009 at 09:18:42PM -0700, Michael K. Smith wrote:
> On 6/14/09 7:46 PM, "Gary Kline" <kline@thought.org> wrote:
> >=20
> > the main reason i don't use vim is because of its [u]ndo
> > command.  as most of you can understand, there are a whole slew
> > of times when i need to undo something.  too often in vim,
> > hitting 'u' --- sometimes > once accidentally --- has resulted in
> > a small disaster.  [[i have too many current/recent copies of
> > my working files to do TOO much damage!]]  Anyway, is there a
> > means of setting the undo key to mimic vi/nvi?
> >=20
> If you undo something and it was a mistake, just use the period (.).

It's probably better to get in the habit of using :redo than the period
to undo an undo, since :redo (or :red for not-very-short) can advance
through several levels of undos, but the period can only repeat one
single thing over and over again.  If you're six levels back in undos,
and you want to undo all six levels, but you use the period once, I think
that'd wipe out all those levels of undo so they aren't recoverable.

I haven't directly tested that recently, but that's how I recall it
working back when I first learned about multiple undo/redo levels for
Vim, lo these many moons ago when the world was young and dinosaurs
roamed the Earth.

--=20
Chad Perrin [ original content licensed OWL: http://owl.apotheon.org ]
Quoth H. L. Mencken: "Democracy is the theory that the common people
know what they want and deserve to get it good and hard."

--gBBFr7Ir9EOA20Yy
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.10 (FreeBSD)

iEYEARECAAYFAko10zoACgkQ9mn/Pj01uKWwGQCgrTeczVAvGf2AhfAhLSgY7yfd
JbkAnROIn6iXLZGZMIiLpU8AdDDpHLwO
=LIa2
-----END PGP SIGNATURE-----

--gBBFr7Ir9EOA20Yy--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20090615045106.GA56586>