vim-sneak
vim-sneak copied to clipboard
cchars displayed with label highlighting
Hello!
I notice that when sneak-label-mode is enabled, concealed cchar
s are shown with label highlighting.
Here is an example with .tex
" vimrc
call plug#begin('~/.vim/plugged')
Plug 'lervag/vimtex'
Plug 'justinmk/vim-sneak'
call plug#end()
let g:sneak#label = 1
% tex
$\alpha$ $\beta$
word word word
On the last line, pressing swo
highlights α
and β
, even with set conceallevel=0
.
I noticed that there are similar issues. However, those are specific to the Indent Line plugin. In general, this seems to occur with any buffer that uses cchar
s.
I also noticed that #244 attempted to fix this issue, but the bug still persists.
I had a glance at the code for #244, and my hunch is that getmatches()
only picks up groups defined by matchadd()
and :match
, and does not pick up groups defined by
syntax match {name} {regex} contained conceal cchar={char}
There's no good way to fix this without causing other problems, AFAIK. #252 is a particular case of a general Vim limitation.
https://github.com/justinmk/vim-sneak/pull/303 fixes this for Nvim.