Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!zaphod.mps.ohio-state.edu!rpi!uupsi!pbs.org!TALOS!jerry From: jerry@TALOS.UUCP (Jerry Gitomer) Newsgroups: comp.editors Subject: Re: vi--backspace past beg-of-line Message-ID: <1055@TALOS.UUCP> Date: 12 Feb 91 14:53:02 GMT References: <21841@oolong.la.locus.com> <1012@TALOS.UUCP> <1991Feb11.211456.16556@ddsw1.MCS.COM> Organization: NPRI, Alexandria VA Lines: 32 dattier@ddsw1.MCS.COM (David W. Tamkin) writes: |jerry@TALOS.UUCP (Jerry Gitomer) wrote in <1012@TALOS.UUCP>: || Yes, using the :map facility of vi. I picked this trick up || from Tom Christenson's articles here. Just do the following || (I used the four arrow keys since most of us have modern || keyboards): || || :map! ^[0A ^[ka || :map! ^[0B ^[ja || :map! ^[0C ^[lli || :map! ^[0D ^[i |^[lli? That won't work aif you started out at the end of the line. True, |cursoring right from the end of a line makes no sense, but if you bump into |the right arrow key you'll be in trouble. |Try :map! ^[0C ^[la instead. Tom Christiansen should have known that ... |unless Tom Christenson is some other person. Mea culpa, mea culpa, mea culpa. I apologize for not spelling Tom Christiansen's name incorrectly. As far as the action of the right arrow key is concerned, neither alternative is ideal, but vi gives us the liberty to pick that which is least evil :-) to the definer. -- Jerry Gitomer at National Political Resources Inc, Alexandria, VA USA I am apolitical, have no resources, and speak only for myself. Ma Bell (703)683-9090 (UUCP: ...{uupsi,vrdxhq}!pbs!npri6!jerry