kana / vim-arpeggio

Vim plugin: Mappings for simultaneously pressed keys
http://www.vim.org/scripts/script.php?script_id=2425
271 stars 18 forks source link

`:Arpeggioinoremap` and `:Arpeggioiunmap` with `<buffer>` freezes vim #33

Open BertrandSim opened 2 years ago

BertrandSim commented 2 years ago

For specific file types, I use Arpeggioinoremap with the <buffer> argument, for example, Arpeggioinoremap <buffer> {x}{y} When switching to another filetype, I want to remove this key chord, So I use Arpeggioiunmap <buffer> {x}{y}. However, if another Arpeggioinoremap contains {x} in the lhs, vim freezes.

Full example:

" vimrc
Arpeggioinoremap jk ()<Left>
Arpeggioinoremap df {}<Left>
Arpeggioinoremap fj []<Left>
Arpeggioinoremap dj <><Left>
Arpeggioinoremap dk ""<Left>
Arpeggioinoremap gk ''<Left>
Arpeggioinoremap bk ``<Left> " <-- I think that only this line is relevant. It contains 'b'.
" inside vim session
:Arpeggioinoremap <buffer> zb ...
:Arpeggioiunmap <buffer> zb

In insert mode, hit zb together. Vim freezes.

Pressing <C-c> shows

<SNR>107_success:<SNR>107_success:<SNR>107_success:<SNR>107_success:<SNR>107_success:<SNR>107_success:<SNR>107_success:<SNR>107_success:<SNR>107_success:<SNR>107_success:<SNR>107_success:<SNR>107_success:<SNR>107_success:<SNR>107_success:<SNR>107_success:<SNR>107_success:<SNR>107_success:<SNR>107_success:<SNR>107_success:<SNR>107_success:<SNR>107_success:<SNR>107_success:<SNR>107_success:<SNR>107_success:<SNR>107_success:<SNR>107_success:<SNR>107_success:<SNR>107_success:<SNR>107_success:<SNR>107_success:<SNR>107_success:<SNR>107_success:<SNR>107_success:<SNR>107_success:<SNR>107_success:<SNR>107_success:<SNR>107_success:<SNR>107_success:<SNR>107_success:<SNR>107_success:<SNR>107_success:<SNR>107_success:<SNR>107_success:<SNR>107_success:<SNR>107_success:<SNR>107_success:<SNR>107_success:<SNR>107_success:<SNR>107_success:<SNR>107_success:<SNR>107_success:<SNR>107_success:<SNR>107_success:<SNR>107_success:<SNR>107_success:<SNR>107_success:<SNR>107_success:<SNR>107_success:<SNR>107_success:<SNR>107_success:<SNR>107_success:<SNR>107_