From owner-freebsd-questions Thu Mar 7 13: 8: 7 2002 Delivered-To: freebsd-questions@freebsd.org Received: from post-20.mail.nl.demon.net (post-20.mail.nl.demon.net [194.159.73.1]) by hub.freebsd.org (Postfix) with ESMTP id 0F31F37B400 for ; Thu, 7 Mar 2002 13:07:57 -0800 (PST) Received: from [212.238.194.207] (helo=mailhost.raggedclown.net) by post-20.mail.nl.demon.net with esmtp (Exim 3.35 #2) id 16j57E-000L1N-00 for freebsd-questions@freebsd.org; Thu, 07 Mar 2002 21:07:56 +0000 Received: from angel.raggedclown.net (angel.raggedclown.intra [192.168.1.7]) by mailhost.raggedclown.net (Ragged Clown Mail Gateway [buffy]) with ESMTP id EF9D613048 for ; Thu, 7 Mar 2002 22:07:54 +0100 (CET) Received: by angel.raggedclown.net (Ragged Clown Host [angel], from userid 1005) id D388622598; Thu, 7 Mar 2002 22:05:08 +0100 (CET) Date: Thu, 7 Mar 2002 22:05:08 +0100 From: Cliff Sarginson To: freebsd-questions@freebsd.org Subject: Re: vi question Message-ID: <20020307210508.GB484@raggedclown.net> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.3.27i Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Thu, Mar 07, 2002 at 02:34:51PM -0600, Bob Giesen wrote: > On Thursday 07 March 2002 01:11 pm, Seth Hieronymus wrote: > > Is there any way to stop vi from going back into command mode when > > I arrow over to the first column (while in insert mode)? > > I don't think so. You could use Vim, instead; this seems to work > as you'd like it to. > More to the point is that you're using arrow keys in vi, which is > optimized for fast typing (little wasted motion and little need for > Ctrl- or Alt-key combinations). Personally, I find it faster to just > switch between command and insert modes and use the h,j,k, and l keys > instead of the arrow keys... Ymmv, of course, but you might want to > give it a chance, if you haven't already. > Mmm, this is one of the mysteries of vi. The arrow keys *may* work, they do for me, on most of the computers I use. It depends on terminal type, terminal emulation, and the position of the stars. But on some systems, they exhibit the behaviour you mention. This has to do with the character. The brings you back to command mode as you know. is also the "lead-in" character for "escape-sequences" the left arrow for example is: ^[[D ^[ = . Now vi should wait a little while to see if is just or whether it is a lead in to an escape sequence..which of course happens very fast, so the wait only has to be very short. However sometimes vi just does not seem to wait long enough. Because of this oddity most "vi veterans" use the keyboard movement keys and just switch mode as a matter of habit...because this will always work. As mentioned above I don't think other vi clones suffer from this abberation, try them (vim or nvi). You see "vi" is not a screen editor, it is a front end into a line-editor; this upsets people used to "real" screen editors. -- Regards Cliff Sarginson -- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message