vim question...

Gary Kline kline at
Mon Jun 15 20:46:04 UTC 2009

On Mon, Jun 15, 2009 at 07:12:01PM +0300, Giorgos Keramidas wrote:
> On Sun, 14 Jun 2009 19:46:45 -0700, Gary Kline <kline at> wrote:
> > 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?
> Hi Gary,
> If you accidentally type 'u' in vim, you can "redo" it by ^R.  There is
> also the "set compatible" option, but it isn't exactly "compatible" with
> the nvi behavior.
> In nvi, typing 'u' can undo the last operation.  Then repeating the undo
> command with '.' keeps undoing changes until the buffer is reverted to
> its original state.
	Thank you, Giorgos.  THIS is what I wanted to know::

> In vim, with "set compatible" enabled", typing 'u' repeatedly toggles
> between the last two states of the buffer.  In "compatible" mode I am
> not sure of how to undo multiple changes.  In "set nocompatible" mode,
> typing 'u' repeatedly undoes multiple changes, and typing '^R' multiple
> times redoes them.

	I've saved this to my vimHelp file.  



 Gary Kline  kline at  Public Service Unix
       For FBSD list:
    The 4.98a release of Jottings:

More information about the freebsd-questions mailing list