Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sun-barr!olivea!uunet!mcsun!ukc!tcdcs!dce.ie!em From: em@dce.ie (Eamonn McManus) Newsgroups: comp.editors Subject: Re: vi--backspace past beg-of-line Message-ID: Date: 12 Feb 91 13:30:05 GMT References: <21841@oolong.la.locus.com> <1012@TALOS.UUCP> <1991Feb11.211456.16556@ddsw1.MCS.COM> Organization: Datacode Communications Ltd, Dublin, Ireland Lines: 20 dattier@ddsw1.MCS.COM (David W. Tamkin) writes: >| :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. As I've pointed out before, another problem with macros like these is that it is impossible to get the up and down arrows to work properly at the start of a line. When you leave insert mode, vi backs up one character except if it is already at the start of the line. Hence macros cannot tell if you were on the first or second character. The macros above will move right one character as well as up or down, when invoked at the start of the line. , Eamonn