[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [vile] An odd buglet with map!

From: Thomas Dickey
Subject: Re: [vile] An odd buglet with map!
Date: Sat, 29 Mar 2008 10:08:09 -0400 (EDT)

On Sat, 29 Mar 2008, Paul Fox wrote:

thomas wrote:
> >
> > As I said the two map! commands do exactly what I want except for the
> > case when I do 'r;' or 'r:', in the single character replace the original
> > unmapped codes are used.  It had me a little confused for a while until
> > I realised what was going on.
> I see that insert (i) and multiple-character replace (R) do mapping.
> At the moment I'm not recalling any other single-character edits than "r".
> I'll change it to use mapped-keystroke unless I get some contrary feedback.

does "real" vi do this?  i tried it in vim, and i get a "recursive map"
error, though maybe there's config to get around that.

nvi does what vile's been doing: uses the original characters.
(vim does give a recursive-map error, though it has lots of config settings - the help screen isn't very useful though).

Using R, nvi goes into an infinite loop...
Ditto for elvis.

Real vi uses the original characters ("r" doesn't use "map!").

the only tricky part i can think of is, what do you do if the map
expands to more than one character.  :map works naturally in 'i' and 'R' modes
because those are multi-character inserts.  with 'r', how would you
restrict it to single character replacement?

I hadn't thought of that - but then I was asking for feedback...

Thomas E. Dickey

reply via email to

[Prev in Thread] Current Thread [Next in Thread]