Re: Buffer-local unmap of global mapping
- On 01/13/2013 04:49 PM, Andy Wokula wrote:
> Several plugins (buffer explorers, file explorers) define a lot of shortI run both the bufexplorer and vim-surround plugins, so I've had
> keys (keys like `d' or `y'), but it's awkward to use them because they
> often wait for a longer global sequence (e.g. `ds', `ys' from
to work around the problem you describe. My current solution
for the ``ds`` mapping is:
autocmd BufEnter \[BufExplorer\] unmap ds
autocmd BufLeave \[BufExplorer\] nmap ds <Plug>Dsurround
> First idea: add a new buffer-local option that, when enabled, means:<silent>,...)).
> Only check buffer-local mappings (not global mappings) when waiting
> for a complete left-hand-side.
> Using an option, the mechanism could be turned on and off (how would I
> otherwise access a global mapping?);
> (this is opposed to a new mapping modifier (next to <buffer>,
After thinking about this for a while, your idea seems to cover
the problem cases for me. It's hard to pick a good name for the
option, but I think the functionality fixes this problem.
You received this message from the "vim_use" 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