vim-jp/vim-vimlparser

"EVP_E492: Not an editor command" after escaped bar

blueyed opened this issue · 2 comments

Given:

syn match foo +\(\\\\\|.\)\{-}[^\\]"+

Results in:

t-synerror.vim:1:25:Error: EVP_E492: Not an editor command: ){-}[^\\]"+

It seems to mistake the (escaped) "|" for a command separator (bar) therein.

(seen in Vim's own syntax/vim.vim: https://github.com/blueyed/vim/blob/a4f4d62696782db3aa336e0bc576ddf5263ff36a/runtime/syntax/vim.vim#L310)

I've been annoyed at this bug for some time now. I'm curious: Is there an easy way to disable the linter temporarily to avoid this false positive? E.g. something like a comment directive?

rbong commented

Unfortunate workaround to get this to work in pipelines:

sed -i 's/^syntax .*//' syntax/*.vim
vint .

Or even:

rm -rf syntax/
vint .