Path: utzoo!mnetor!tmsoft!torsqnt!news-server.csri.toronto.edu!clyde.concordia.ca!thunder.mcrcim.mcgill.edu!snorkelwacker.mit.edu!apple!usc!cs.utexas.edu!uunet!mcsun!ukc!tcdcs!dce.ie!em From: em@dce.ie (Eamonn McManus) Newsgroups: comp.editors Subject: Re: vi Alternative Required Message-ID: Date: 23 Dec 90 18:23:49 GMT References: <111331@convex.convex.com> <90355.114904FFAAC09@cc1.kuleuven.ac.be> Organization: Datacode Communications Ltd, Dublin, Ireland Lines: 16 FFAAC09@cc1.kuleuven.ac.be (Nicole Delbecque & Paul Bijnens) write(s): >The convention is: cursor-movement is command mode. >Then map cursor movement like this: > > map ^[[A k > map! ^[[A ^[k > etc... When you end an insertion vi backs up one character unless it is already at the start of the line. So the above map! will cause vi to move up and to the left, except at the start of the line where it will work correctly. Of course if you change the RHS to ^[kl it will work everywhere except at the start of the line (and when the line above is too short). , Eamonn