Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 3 May 1998 19:08:19 -0400 (EDT)
From:      CyberPeasant <djv@bedford.net>
To:        archie@whistle.com (Archie Cobbs)
Cc:        freebsd-questions@FreeBSD.ORG
Subject:   Re: vi insert mode
Message-ID:  <199805032308.TAA00670@pollux.loco.net>
In-Reply-To: <199805032218.PAA03197@bubba.whistle.com> from Archie Cobbs at "May 3, 98 03:18:19 pm"

next in thread | previous in thread | raw e-mail | index | archive | help
> 
> When editing a file using "vi", if you press "i", then <escape>,
> 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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199805032308.TAA00670>