From owner-freebsd-questions Sun May 3 16:25:55 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id QAA21344 for freebsd-questions-outgoing; Sun, 3 May 1998 16:25:55 -0700 (PDT) (envelope-from owner-freebsd-questions@FreeBSD.ORG) Received: from pollux.loco.net (lucy.bedford.net [206.99.145.54]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id QAA21339 for ; Sun, 3 May 1998 16:25:47 -0700 (PDT) (envelope-from listread@bedford.net) Received: (from listread@localhost) by pollux.loco.net (8.8.8/8.8.8) id TAA00670; Sun, 3 May 1998 19:08:19 -0400 (EDT) (envelope-from listread) Message-Id: <199805032308.TAA00670@pollux.loco.net> Subject: Re: vi insert mode In-Reply-To: <199805032218.PAA03197@bubba.whistle.com> from Archie Cobbs at "May 3, 98 03:18:19 pm" To: archie@whistle.com (Archie Cobbs) Date: Sun, 3 May 1998 19:08:19 -0400 (EDT) Cc: freebsd-questions@FreeBSD.ORG From: CyberPeasant Reply-To: djv@bedford.net X-no-archive: yes X-Mailer: ELM [version 2.4ME+ PL38 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > > When editing a file using "vi", if you press "i", then , > i.e., go into insert mode and insert nothing, then the cursor > ends up one character to the left of where you started. Actually > this happens no matter how many characters you insert. > > Is there any way to turn off this non-intuitive behavior? > > Thanks, > -Archie It's only non-intuitive for the first few months. :) Like driving on the other side of the road. This is vi's way, I'm afraid. Changing this would break about 200,000,000 user's hearts, and an untold number of macros. An intuitive handle, perhaps: You edit, enter insert mode, exit insert mode, cursor is over last entered character. It's all nice and ready to be deleted with 'x' now, since that misteak was the reason you stopped insert mode. If you exit insert mode, and decide to keep going, use 'a'. It does the right thing. In fact, it looks like you should be using 'a' anyway... it seems to be what you expect of 'i'. Dave -- <----. mailto/pgpfinger: djv@bedford.net <----|=================================== <----' Crathva fxrjre To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message