Am 29.01.2013 22:33, schrieb Bram Moolenaar:>
Michael Henry wrote:

Andy Wokula suggested a solution to the problem that
buffer-local mappings have to wait if they are prefixes of
global mappings.  Below is a patch that implements his
suggestion.

A new 'localmaplinger' option is introduced.  When set (the
default), Vim behaves in the traditional way.  When reset,
complete buffer-local mappings will be accepted immediately
without waiting for incomplete global mappings.

As I'd commented in a previous thread, it's hard to know what
name to choose for this option; improvements to the name are
welcome.

The patch includes documentation along with the minor code
change.  I didn't know how to implement a test for this
functionality.  If anyone has a suggestion on that front, I'd be
happy to try to implement something.

I do not like the behavior to depend on timing.  I would prefer the
local mapping to always take precedence, also when another character
was already typed that causes a global mapping to match.  Otherwise
the behavior depends on how busy your computer is, or the remote
connection.

"Solution": another option 'shorttimeoutlen', next to 'timeoutlen' and
'ttimeoutlen'.  Defines how long to wait for an "atomic" key sequence.
Ok, just kidding, this is crap.

Even better would be if we do not need an option at all.  Every option
makes it more difficult for a Vim user to understand what's happening.

No problem with that!

So would it be "the right thing to do" to always let local mappings
overrule any matching global mapping?  It's a slightly incompatible
change though.  But the current behavior is bad enough to accept that
(you need to type another character to stop waiting for the
possibility that the global mapping would match).

I think it's the right thing.

Then one can no longer map reliably to the {lhs} of a global mapping,
but it's a good habit anyway to always map to the {rhs}.

--
Andy

--
--
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