jiangmiao / auto-pairs

Vim plugin, insert or delete brackets, parens, quotes in pair
http://www.vim.org/scripts/script.php?script_id=3599
4.11k stars 373 forks source link

E227: mapping already exists #105

Open jrean opened 9 years ago

jrean commented 9 years ago

Hi,

Can you help me to understand the following please. It seems I have a mapping conflict btw auto-pairs and adoy/vim-php-refactoring-toolbox. (I use Vundle to manage my plugins)

When I do BundleUpdate it outputs the following:

Done!
Error detected while processing /xx/xx/xx/vim/vim/bundle/vim-php-refactoring-toolbox/plugin/php-refactoring-toolbox.vim:
line   23:
E227: mapping already exists for  rlv

:verbose map <Leader>rlv outputs:

n  <Space>rlv  * :call PhpRenameLocalVariable()<CR>
        Last set from /xx/xx/xx/vim/vim/bundle/vim-php-refactoring-toolbox/plugin/php-refactoring-toolbox.vim

:verbose imap <Leader>rlv outputs:

n  <Space>rlv  * :call PhpRenameLocalVariable()<CR>
        Last set from /xx/xx/xx/vim/vim/bundle/vim-php-refactoring-toolbox/plugin/php-refactoring-toolbox.vim
i  <Space>     *@<C-]><C-R>=AutoPairsSpace()<CR>
        Last set from /xx/xx/xx/vim/vim/bundle/auto-pairs/plugin/auto-pairs.vim

Thank you for your hard work.

jiangmiao commented 9 years ago

(|) to ( | ) after pressing space. let g:AutoPairsMapSpace = 0 to turn off AutoPairsSpace mapping.

jrean commented 9 years ago

Thank you @jiangmiao for the details. Do you have an idea why the auto-pairs mapping appears when I :verbose <Leader>rlv? It's weird!

jiangmiao commented 9 years ago

I have no idea. AutoPairs doesn't use <Leader>rlv. It might be another script tries to inherit the mapping from <Space> key.