vim-matchup icon indicating copy to clipboard operation
vim-matchup copied to clipboard

Deferring matchparen makes neovim ignore option 'digraph'

Open iagoleal opened this issue 4 years ago • 1 comments
trafficstars

Explain the issue

Hello! I started using vim digraphs and noticed that there seems to be some incompatibilities between the option 'digraph' and vim-matchup. To be more precise, if my vimrc has the line let g:matchup_matchparen_deferred = 1, neovim works as if 'digraph' is off, no matter the value of the option.

A little context: in vim one can enter exotic characters (called digraphs) by writing <C-k><char1><char2> in insert mode. There is also an alternative method, enabled by set digraph that lets you enter the digraph using backspace: <char1><BS><char2>.

Version information

Version: neovim 0.5.0 OS: Arch Linux vim-matchup on master (updated today) $TERM: xterm-256color

Expected vs Observed behavior

By opening any file with neovim and entering ia<BS>^<ESC>, the expected output is

â

but when deferring matchparen is enabled, I get

^

The digraphs work normally using CTRL-K. If I enter i<C-k>a^<ESC>, the output is the expected

â

Minimal vimrc file

set nocompatible

" load match-up
let &rtp  = '~/.vim/bundle/vim-matchup,' . &rtp
let &rtp .= ',~/.vim/bundle/vim-matchup/after'

filetype plugin indent on
syntax enable

"""""""""""""""""""""""""""
" Conflicting Lines
"""""""""""""""""""""""""""
let g:matchup_matchparen_deferred = 1
set digraph

Thanks for the great plugin! I wanted to also test this on vim but unfortunately don't have access to it right now.

iagoleal avatar Aug 06 '21 21:08 iagoleal

Note also that this appears to work correctly in vim. So it maybe a neovim bug.

andymass avatar Aug 10 '21 02:08 andymass

Fixed in https://github.com/neovim/neovim/pull/24258

zeertzjq avatar Jul 05 '23 03:07 zeertzjq

Thank you!

andymass avatar Jul 05 '23 12:07 andymass