From owner-freebsd-questions@FreeBSD.ORG Mon Jun 15 20:31:01 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 F27B01065673 for ; Mon, 15 Jun 2009 20:31:01 +0000 (UTC) (envelope-from kline@thought.org) Received: from aristotle.thought.org (aristotle.thought.org [209.180.213.210]) by mx1.freebsd.org (Postfix) with ESMTP id 912A08FC23 for ; Mon, 15 Jun 2009 20:31:01 +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 n5FKUupF014808; Mon, 15 Jun 2009 13:30: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:30:56 -0700 (PDT) Date: Mon, 15 Jun 2009 13:30:56 -0700 From: Gary Kline To: "Paul B. Mahol" Message-ID: <20090615203055.GB37102@thought.org> References: <20090615024643.GA33420@thought.org> <3a142e750906150024v2936759amd5229ccbb2a71daf@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3a142e750906150024v2936759amd5229ccbb2a71daf@mail.gmail.com> 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 Mailing List 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:31:02 -0000 On Mon, Jun 15, 2009 at 09:24:57AM +0200, Paul B. Mahol wrote: > On 6/15/09, 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? > > From vim help: > > 2. Two ways of undo *undo-two-ways* > > How undo and redo commands work depends on the 'u' flag in 'cpoptions'. > There is the Vim way ('u' excluded) and the vi-compatible way ('u' included). > In the Vim way, "uu" undoes two changes. In the Vi-compatible way, "uu" does > nothing (undoes an undo). > > 'u' excluded, the Vim way: > You can go back in time with the undo command. You can then go forward again > with the redo command. If you make a new change after the undo command, > the redo will not be possible anymore. > > 'u' included, the Vi-compatible way: > The undo command undoes the previous change, and also the previous undo command. > The redo command repeats the previous undo command. It does NOT repeat a > change command, use "." for that. > > Examples Vim way Vi-compatible way ~ > "uu" two times undo no-op > "u CTRL-R" no-op two times undo > > Rationale: Nvi uses the "." command instead of CTRL-R. Unfortunately, this > is not Vi compatible. For example "dwdwu." in Vi deletes two > words, in Nvi it does nothing. > strange, but i just tested dwdw in the nvi that keith bostic gave us. it deletes 2 words. and if you type '.', it repeats the dw by deleting each word. no sense in getting into any 'religious war' over vim vs nvi. it may be what you're used to. i've been using vi for over 30 years and am used to its ease ... and its quirks. gary > > Anyway this topic is offtopic. > -- > Paul -- 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