Date: Mon, 15 Jun 2009 13:45:54 -0700 From: Gary Kline <kline@thought.org> To: Giorgos Keramidas <keramida@ceid.upatras.gr> Cc: freebsd-questions@freebsd.org Subject: Re: vim question... Message-ID: <20090615204554.GC37102@thought.org> In-Reply-To: <87fxe179ym.fsf@kobe.laptop> References: <20090615024643.GA33420@thought.org> <87fxe179ym.fsf@kobe.laptop>
next in thread | previous in thread | raw e-mail | index | archive | help
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@thought.org> 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 -- Gary Kline kline@thought.org http://www.thought.org Public Service Unix http://jottings.thought.org http://transfinite.thought.org For FBSD list: http://transfinite.thought.org/slicejourney.php The 4.98a release of Jottings: http://jottings.thought.org/index.php
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20090615204554.GC37102>