From owner-freebsd-questions@FreeBSD.ORG Mon Jun 15 21:41:36 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 5F77C1065676 for ; Mon, 15 Jun 2009 21:41:36 +0000 (UTC) (envelope-from onemda@gmail.com) Received: from mail-bw0-f228.google.com (mail-bw0-f228.google.com [209.85.218.228]) by mx1.freebsd.org (Postfix) with ESMTP id CEA8C8FC28 for ; Mon, 15 Jun 2009 21:41:35 +0000 (UTC) (envelope-from onemda@gmail.com) Received: by bwz28 with SMTP id 28so934682bwz.43 for ; Mon, 15 Jun 2009 14:41:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=HrDs0uGxLzkSNUS4qoJMX6BR1jhgRWSmD8oCiCvILj0=; b=xe0sSAtn6fyEK91t5R2beo29aYf2QK/14HYx8jEcIMV9Qx39ePgB89xDzKmc+q40Oh oOVrZaEhHOEaOsIAR42VmG8EYwGVQ15pnnOl8udjbORARkxUbR0EBivioSrZT9Fxn1lo UVRXKkOpgaA1a17Rl7+aRrWfXKCGeQ0ZL3gqc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=Kdhjj1j9sDlqlLHFSAbJ1ORb3EHMcChncizAhBCf5fqN0xv7lSTt558hpJ6EYAQF7/ 2a0s0jO9VELUCn9ryjk0xUxwwZRZqowJG14otzCTNzIqqyqP93Pd3jBcoUZIH/jB9d5f kPB9dFzbUkg1tE9i9yO0YRQ24gRoTaB6dFqI4= MIME-Version: 1.0 Received: by 10.204.101.13 with SMTP id a13mr7496859bko.89.1245102094614; Mon, 15 Jun 2009 14:41:34 -0700 (PDT) In-Reply-To: <20090615203055.GB37102@thought.org> References: <20090615024643.GA33420@thought.org> <3a142e750906150024v2936759amd5229ccbb2a71daf@mail.gmail.com> <20090615203055.GB37102@thought.org> Date: Mon, 15 Jun 2009 23:41:34 +0200 Message-ID: <3a142e750906151441p6a9db819r1b9da3f82dd48097@mail.gmail.com> From: "Paul B. Mahol" To: Gary Kline Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit 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 21:41:37 -0000 On 6/15/09, Gary Kline wrote: > 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. Nvi is not Vi, and Vim is not Nvi clone. > 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 > > -- Paul