vile
[Top][All Lists]
Advanced

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

Re: [vile] vile map behavior change


From: Thomas Dickey
Subject: Re: [vile] vile map behavior change
Date: Wed, 18 Jan 2012 16:44:37 -0500
User-agent: Mutt/1.5.18 (2008-05-17)

On Wed, Jan 18, 2012 at 09:37:47AM -0500, Paul Fox wrote:
> hi --
> 
> somewhere between 9.7ze and 9.8d, the behavior of the following
> map command (in .vilerc) changed:

perhaps this:

 20100725 (zg)
        > Tom Dickey:
        + correct scripting for map/map! commands to allow ^V to escape any
          character, as well as ignoring single/double quotes and backslashes
          (report by Larry Gensch).
 
There was also a report by Chris Green which might be related (last September)
about escapes in digraphs.rc (I overlooked that in the 9.8f changes).

>     map \t f}
> 
> this used to map the tab character.  now it maps the literal
> two-character sequence "\t".  using the literal character to be mapped
> would work for other control chars, but tab of course is whitespace. 
> doing this (where the character after the control-V is a tab) works:
> 
>     map ^V     f}
> 
> i see the new behavior is matched by vim, so presumably this was
> a compatibility change.  i also see that vim has some extra map
> commands to deal with this, so i guess it's a hard problem.

agree (quoting and escapes are fairly hard to work on).
 
> but the help file still shows this:
>    The left hand side of a map[!] definition may contain the usual backslash
>    escapes: \n, \r, \t, \b, \f, \a (^G), \e (ESC), \s (SPACE), \xNN
>    (hexadecimal), \NNN (octal). The right hand side is taken exactly
>    literally, so special characters must be expressed as themselves.
> 
> i guess that paragraph should be dropped, and a new one describing
> the use of ^V added.  not sure that will work with newline, though.

thanks - I'll have to study this and see how best to improve things
(patches welcome of course ;-)

-- 
Thomas E. Dickey <address@hidden>
http://invisible-island.net
ftp://invisible-island.net

Attachment: signature.asc
Description: Digital signature


reply via email to

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