diff --git a/autoload/vimtex/syntax/core.vim b/autoload/vimtex/syntax/core.vim index 97aee30dcc..659dc871d0 100644 --- a/autoload/vimtex/syntax/core.vim +++ b/autoload/vimtex/syntax/core.vim @@ -67,6 +67,8 @@ function! vimtex#syntax#core#init_rules() abort " {{{1 syntax match texSpecialChar "\\[SP@]\ze[^a-zA-Z@]" syntax match texSpecialChar "\^\^\%(\S\|[0-9a-f]\{2}\)" + syntax match texError "[_^]" + " }}}2 " {{{2 Commands: general diff --git a/test/test-syntax/test-core.tex b/test/test-syntax/test-core.tex index efce92b150..02feed76b5 100644 --- a/test/test-syntax/test-core.tex +++ b/test/test-syntax/test-core.tex @@ -40,7 +40,7 @@ \begin{document} -Test accents \v! and \v@ here. +Test accents \v! and \v@ here. And errors: _ ^ Line with inline verbatim: \verb+verb+ Line with inline verbatim: \verb*+verb+