Path: utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!uunet!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: <1012@TALOS.UUCP> Date: 8 Feb 91 15:49:10 GMT References: <21841@oolong.la.locus.com> Organization: NPRI, Alexandria VA Lines: 27 stevea@locus.com (Steve Anderson) writes: :Is there any way to backspace past the beginning of the line when :you're in insert or append mode? :For example, I hit i, type "Is there any...". I get to "in", and now :I want to backspace to "line" while still in insert mode. Possible? 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 to enter the first line type :map ! CTL-V CTL-V ka The other lines are entered in a similar manner :-) -- 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