-
Notifications
You must be signed in to change notification settings - Fork 395
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Alone [
in command with @
confuses highlight
#2094
Comments
I added support for |
I hope I haven't been guilty of not specifying enough, but there is a series of "ifnextchar" --- the other one I use quite a lot is (Sorry, should have been clearer) |
Ok; perhaps you could provide some reference to the command or family of commands? It is trivial to support |
Yes --- these are commands to "generate" the optional argument in LaTeX (pre-latex3), you can see it there: https://www.texdev.net/2020/08/20/newdocumentcommand-versus-newcommand-versus. When using packages that are multi-format (ie, that should work in LaTeX, TeX and ConTeXt) normally the package provides a wrapper, like for example |
Ok, thanks for the explanation. IIUC, my last commit then resolves the issue for you? |
In (very rare) cases you have a command using
\@ifnextchar
(from the LaTeX kernel routines). When the checked char is[
, the syntax highlighter got confused:Using this minimal vimrc:
Now --- this is a very special case, I know, so it's not high-priority at all. Is there a way to "reset" it? (adding a comment with %] does not suffice...)
Output from VimtexInfo
The text was updated successfully, but these errors were encountered: