On 07/12/13 16:55, Tony Mechelynck wrote:
On 07/12/13 15:41, Bram Moolenaar wrote:

Brook Hong wrote:

Could we add {lhs} to mapclear so that only the key mappings starting
with {lhs} are cleared?

Just like map,

:map    {lhs}            |mapmode-nvo|        *:map_l*
            List the key mappings for the key sequences starting
            with {lhs} in the modes where the map command applies.
            {not in Vi}

As if it's :unmap with a wildcard?  Yes, that could be useful.


But then, if you have two mappings, one whose {lhs} is the beginning of
the other's, you couldn't anymore unmap only the shorter one (which is
the present behaviour, thus breaking compatibility). Or else, only unmap
with wildcard if an explicit wildcard is present? But / * etc. can be
mapped, so would ":unmap abc*" or even ":unmap /abc.*/" (without the
quotes of course) unmap only the exact string, or abc followed by
anything? I guess we need a new command for unmap-with-regexp. :eunmap
maybe?

sorry, I read too fast. :unmap would keep its present behaviour, and ":mapclear abc" would clear any mappings whose {lhs} starts with abc. Yes, in that case my objection falls.


Best regards,
Tony.
--
Nobody is one block of harmony.  We are all afraid of something, or feel
limited in something.  We all need somebody to talk to.  It would be good
if we talked to each other--not just pitter-patter, but real talk.  We
shouldn't be so afraid, because most people really like this contact;
that you show you are vulnerable makes them free to be vulnerable too.
It's so much easier to be together when we drop our masks.
                -- Liv Ullman

--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- You received this message because you are subscribed to the Google Groups "vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Raspunde prin e-mail lui