Article View: comp.editors
Article #5Re: Delete key map in vi
From: Jeff Wang
Date: Tue, 27 Oct 1992 16:55
Date: Tue, 27 Oct 1992 16:55
38 lines
2035 bytes
2035 bytes
> legend@cheshire.oxy.edu (Linda A. Malcor) writes:
>
> I am trying to map (and map!) the delete key on my system to delete.
>
> Example:
> :map! {ESC seq for delete} ^[lxi
>
> The problem I run into is that using the "l" to reverse the effect of
> escaping out of input mode works great everywhere except the beginning
> of line. At the begining of a line I end up killing the wrong character!
> Example:
> 123456
> ^Cursor at beginning of the line in input mode and delete map! is hit.
> 13456
> ^Cursor and wrong results
>
> Help! I could be aproching this from the wrong angle.
When you escape out of insert mode at the beginning of the line, the cursor
cannot make the backward hop it usually wants to do. To correct this, just
give it a little breathing space with the following insert mode map...
:map! whatever ^V^V ^[xxi
where ^V^V ^[ is 2 Control-V's followed by a space followed by the escape.
Hope that helps...
--
#====}==) #===(==} #====}==) #===(==} {==)===# (=={====# {==)===# (=={====#
>> Jeff Wang Net : hjiwa@gruc19.nor.chevron.com <<
>> Chevron Petroleum Technology Company Profs : hjiwa (hovmb) <<
>> Geophysical/Geological Applications Phone : (504) 592-6162 <<
>> 935 Gravier Street, Room 1006 Fax : (504) 592-6958 <<
>> New Orleans, Louisiana 70112 Valeo,vales. Die dulci fruimini!! :) <<
>> "Eenie, meenie, chili beanie, your lucky number is... C!" -- Kelly Bundy <<
#===(==} C ... it's not just a language, it's also a chord. {==)===#
Technical Details
Message-ID:
<1992Oct27.105550@gruc19.nor.chevron.com>Path:
arc1-ca.pugleaf.net!sparky!uunet!lhdsy1!nntpserver.chevron.com!gruc19.nor.chevron.com!hjiwaReferences:
<1992Oct27.140128.22124@cheshire.oxy.edu>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!lhdsy1!nntpserver.chevron.com!gruc19.nor.chevron.com!hjiwa From: hjiwa@gruc19.nor.chevron.com (Jeff Wang) Newsgroups: comp.editors Subject: Re: Delete key map in vi Message-ID: <1992Oct27.105550@gruc19.nor.chevron.com> Date: 27 Oct 92 16:55:50 GMT References: <1992Oct27.140128.22124@cheshire.oxy.edu> Sender: hjiwa@grus02.nor.chevron.com (Jeff Wang) Organization: Chevron Lines: 38