vim-jp / vim-vimlparser

Vim script parser
Other
162 stars 25 forks source link

"EVP_E492: Not an editor command" after escaped bar #98

Open blueyed opened 5 years ago

blueyed commented 5 years ago

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)

lervag commented 3 years ago

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 2 years ago

Unfortunate workaround to get this to work in pipelines:

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

Or even:

rm -rf syntax/
vint .