-
Notifications
You must be signed in to change notification settings - Fork 14
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
Latex files: ex option "hll" doesn't highlight current line #10
Comments
Hi Cedric, change the continuation bit from is that what you want to achieve? |
I'll try to explain it better: I want to use the the syntax highlighting, in particular the Could you briefly summarize what is this continuation bit ? |
Continuation byte defines where syntax highlight continues in a case of a match for a corresponding group. The pattern for hll is "^.+$" (actually the $ isn't needed anymore I should remove it later) When "^.+" matches the whole line, the code in syn_hilight() will check the continuation options The brother anchor $ can also have this property, though there isn't really any tangible use case for it in nextvi other than So what you did there when changing 1 to 0, is basically telling nextvi to be lazy and just go with the first thing that matches. Generally these are the things to consider when determining how things get highlighted:
There are a few implications, when you remove the continuation byte from hll that means nothing else will be able to highlight Dammit, that was way longer than briefly, i'd call it breezily instead, ha. |
Btw, Cedric, I don't use latex so I am not very familiar with whatever syntax it has. If you want to add something to it, like a more sensible default thing feel free to do so. I mean anything if you wanna add new programming language or whatevs I don't really mind you doing so. Adding stuff to conf does not really incur any meaningful performance loss, or some bad memory usage (though it does create a few dead static bytes) it's fine. If you think having 0 there instead of 1 is better default for tex I guess you know better than me. If you want hlp working for tex, gotta copy that set defined in c set with ->func set to 3 |
Thank you very much for this loooonnnnnggg and detailed explanation! I appreciate it a lot and ...... I feel embarassed that you took so much time! Thank you! |
Hi Kyryl,
I had trouble to understand what was the ex option
hll
. Now I understand better. The ex optionhll
works perfectly with ac
file but not with atex
file.In a
tex
it can happens that a line begins with a\
. For example:In that case, it doesn't work. In
vi.c
the match is done byThe
.
matches any character but there is a problem with\
. Moreover, a line can have some spaces/tabs and then a backslash. The following can be found intex
files:Where the spaces at the beginning of the lines can be spaces or tabs. Hhhhmmm, the following can also happen
So I had changed
to
In the class, there is a
space
and atab
. But it wouldn't work for the last example.Do you have any idea how to match
\
with a regex ?The text was updated successfully, but these errors were encountered: