From owner-freebsd-questions@FreeBSD.ORG Mon Jun 15 20:46:03 2009 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D8B2B1065694 for ; Mon, 15 Jun 2009 20:46:03 +0000 (UTC) (envelope-from kline@thought.org) Received: from aristotle.thought.org (ns1.thought.org [209.180.213.210]) by mx1.freebsd.org (Postfix) with ESMTP id AEAB58FC15 for ; Mon, 15 Jun 2009 20:46:02 +0000 (UTC) (envelope-from kline@thought.org) Received: from thought.org (tao.thought.org [10.47.0.250]) (authenticated bits=0) by aristotle.thought.org (8.14.2/8.14.2) with ESMTP id n5FKjt4p014994; Mon, 15 Jun 2009 13:45:56 -0700 (PDT) (envelope-from kline@thought.org) Received: by thought.org (nbSMTP-1.00) for uid 1002 kline@thought.org; Mon, 15 Jun 2009 13:45:55 -0700 (PDT) Date: Mon, 15 Jun 2009 13:45:54 -0700 From: Gary Kline To: Giorgos Keramidas Message-ID: <20090615204554.GC37102@thought.org> References: <20090615024643.GA33420@thought.org> <87fxe179ym.fsf@kobe.laptop> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87fxe179ym.fsf@kobe.laptop> User-Agent: Mutt/1.4.2.3i X-Organization: Thought Unlimited. Public service Unix since 1986. X-Of_Interest: With 22++ years of service to the Unix community. X-Spam-Status: No, score=-4.4 required=3.6 tests=ALL_TRUSTED,BAYES_00 autolearn=ham version=3.2.3 X-Spam-Checker-Version: SpamAssassin 3.2.3 (2007-08-08) on aristotle.thought.org Cc: freebsd-questions@freebsd.org Subject: Re: vim question... X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Jun 2009 20:46:04 -0000 On Mon, Jun 15, 2009 at 07:12:01PM +0300, Giorgos Keramidas wrote: > On Sun, 14 Jun 2009 19:46:45 -0700, Gary Kline 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