-
Notifications
You must be signed in to change notification settings - Fork 385
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
improvement in LaTeX3 highlighting #2272
Comments
Appreciated! And sorry for the slow response!
Seems like a good idea.
I'll take your word for this. I don't really use this stuff myself.
Thanks! Could I also ask you to provide a short example file that shows each of these? Perhaps also with a screenshot of how it looks for you with your custom file and how it currently looks with pure VimTeX?
I agree this is sensible. But does it warrant making a breaking change? I don't mind that too much - I often push breaking changes if I think it improves something. |
I was curious about the difference between the statement, type, variable and constant. Could you explain what these are in LaTeX3, more specifically? texL3Statement
This will match things like texL3Type
This matches the texL3Variable
This matches things like texL3Constant
Same as above. |
It's hard to provide a precise example because most LaTeX3 code I write is in package source in
This is how my Vim renders it using a solarized dark color scheme: and the same with the and finally the same with pure VimTeX:
I don't know how much it would break. But renaming things for only cosmetic reasons in the source code does not usually qualify as good practice... Better leave the names as they are.
What I call
It actually matches when there is no colon right after, because variables do not have a argument specifications like functions (this is part of the conventions).
The point of the |
Interesting. This might be worth opening an issue over. Right now, the expl3 syntax is only activated inside e.g.
Thanks!
I assume this is manually expanded, right? IF not, then you must explain what you mean with "
Great - agreed then.
Great - I'll adopt the "correct" conventions, then.
Then
Thanks for the other clarifications as well! I'll make some updates now. I hope it will improve things. |
Could you provide some examples - preferably both "positives" and "negatives"? Would be nice for testing and checking if things work as expected... |
I believe the current version should be good now. But it may not work directly in |
The syntax groups are now vimtex/autoload/vimtex/syntax/core.vim Lines 754 to 761 in 700c40d
|
No, it is expanded by
The cases that strictly follow the convention, and where it must work, are like
Accepting any control sequence name where any occurrence of I can't think of any obvious negative case, where one would not want to match a similar-looking word. The |
Thanks for the explanations! |
Hello,
I see that vimtex includes some support for LaTeX3 notations (since about a year, according to #1834) but I would like to suggest two small improvements to it, based on my experience using this language :
@@
in function and variable names, since that is used when writing packages withl3docstrip
The code I have been using for some years, putting it in
.vim/after/syntax/tex.vim
, is as follows:As a side note, I named these
L3
instead ofE3
because after more than ten years being stable and in practical use, the LaTeX3 programming conventions fromexpl3
can hardly be called experimental nowadays...The text was updated successfully, but these errors were encountered: